Skip to content

Commit

Permalink
Misc. typos and whitespace fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
luzpaz committed Aug 31, 2018
1 parent a216c84 commit 1eafc31
Show file tree
Hide file tree
Showing 7 changed files with 99 additions and 63 deletions.
17 changes: 14 additions & 3 deletions CartoucheFC.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# It is necessary that the page (drawing viewer) is called "Page", which is the default name of the Drawing module
# ver 0.3
# Created: 02/07/2014
# Created: by mario52
# Created: by mario52
# PyQt and PySide

#OS: Windows Vista
Expand All @@ -22,7 +22,18 @@
#Coin version: 3.1.0
#SoQt version: 1.4.1

# see http://www.freecadweb.org/wiki/Macro_CartoucheFC
__Name__ = 'CartoucheFC'
__Comment__ = ''
__License__ = ''
__Web__ = ''
__Wiki__ = 'http://www.freecadweb.org/wiki/Macro_CartoucheFC'
__Icon__ = ''
__Help__ = ''
__Author__ = 'mario52'
__Version__ = '0.3'
__Status__ = ''
__Requires__ = ''
__Files__ = ''

try:
import PyQt4
Expand Down Expand Up @@ -659,7 +670,7 @@ def on_pushButton06_clicked(self): # Bouton date/ checked
else:
self.lineEdit_02.setText(str(dateEu()))
def on_pushButton05_clicked(self): # Bouton Appliquer
DESIGNED_BY = self.lineEdit_01.text()
DESIGNED_BY = self.lineEdit_01.text()
CREATION_DATE = self.lineEdit_02.text()+" - "+self.lineEdit_02h.text()
CHECKED_BY = self.lineEdit_03.text()
CHECK_DATE = self.lineEdit_04.text()+" - "+self.lineEdit_04h.text()
Expand Down
67 changes: 40 additions & 27 deletions FCRotateViewAbsolute.FCMacro
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
__Name__ = 'FCRotateViewAbsolute'
__Comment__ = ''
__License__ = ''
__Web__ = ''
__Wiki__ = ''
__Icon__ = ''
__Help__ = ''
__Author__ = ''
__Version__ = ''
__Status__ = ''
__Requires__ = ''
__Files__ = ''

from FreeCAD import Base
import FreeCADGui as Gui

Expand All @@ -23,9 +36,9 @@ class Form(QDialog):
self.dial=dial
dial.setMaximum(360)
dial.setValue(self.alpha)



dial2 = QDial()
dial2.setNotchesVisible(True)
self.dial2=dial2
Expand All @@ -36,22 +49,22 @@ class Form(QDialog):
spinbox.setMaximum(360)

layout = QHBoxLayout()


self.pushButton00 = QPushButton(QIcon('icons:freecad.svg'),"Dimetric")
self.pushButton01 = QPushButton(QIcon('icons:freecad.svg'),"Trimetric")
self.pushButton02 = QPushButton(QIcon('icons:freecad.svg'),"Isometric")
self.pushButton03 = QPushButton(QIcon('icons:freecad.svg'),"Front")
self.pushButton00.clicked.connect(self.dimetric)
self.pushButton01.clicked.connect(self.trimetric)
self.pushButton02.clicked.connect(self.isometric)
self.pushButton03.clicked.connect(self.front)
self.pushButton00.clicked.connect(self.dimetric)
self.pushButton01.clicked.connect(self.trimetric)
self.pushButton02.clicked.connect(self.isometric)
self.pushButton03.clicked.connect(self.front)
layout.addWidget(self.pushButton03)
layout.addWidget(self.pushButton00)
layout.addWidget(self.pushButton01)
layout.addWidget(self.pushButton02)


layout.addWidget(dial)
layout.addWidget(dial2)
# layout.addWidget(spinbox)
Expand All @@ -60,7 +73,7 @@ class Form(QDialog):
#self.connect(dial, SIGNAL("valueChanged(int)"), spinbox.setValue)
#self.connect(spinbox, SIGNAL("valueChanged(int)"), dial.setValue)
dial.valueChanged.connect(spinbox.setValue);

dial.valueChanged.connect(self.dreher);
dial2.valueChanged.connect(self.heber);

Expand Down Expand Up @@ -92,7 +105,7 @@ class Form(QDialog):
self.beta=1
FreeCAD.Console.PrintMessage(str(self.beta)+" # ");
self.dial2.setValue(self.beta)


def rotZ(self,delta=10):
self.alpha += delta
Expand All @@ -107,7 +120,7 @@ class Form(QDialog):
from pivy import coin
alpha=self.alpha
beta=self.beta

camera = FreeCADGui.ActiveDocument.ActiveView.getCameraNode()

Gui=FreeCADGui
Expand All @@ -119,50 +132,50 @@ class Form(QDialog):
Gui.activeDocument().activeView().setCameraType("Perspective")

campos=Base.Vector( 1000 * cos (pi*alpha/360*2)*sin(pi*beta/360*1), 1000*sin(pi*alpha/360*2)*sin(pi*beta/360*1), 1000*cos(pi*beta/360*1))
camera.position.setValue( campos)
camera.position.setValue( campos)

pos3=FreeCAD.Vector(0,0,0)
pos3.sub(campos)
#if False:

#if False:
camera.pointAt(coin.SbVec3f(pos3),coin.SbVec3f(0,0,1))

App.ActiveDocument.recompute()
FreeCADGui.updateGui()
FreeCADGui.updateGui()

def front(self):
from pivy import coin
pos3=FreeCAD.Vector(0,0,0)
campos=FreeCAD.Vector(0,-10,0)
camera = FreeCADGui.ActiveDocument.ActiveView.getCameraNode()
camera.position.setValue( campos)
camera.position.setValue( campos)
camera.pointAt(coin.SbVec3f(pos3),coin.SbVec3f(0,0,1))

def isometric(self):

pos3=FreeCAD.Vector(0,0,0)
campos=FreeCAD.Vector(100,-100,100)
camera = FreeCADGui.ActiveDocument.ActiveView.getCameraNode()
camera.position.setValue( campos)
camera.position.setValue( campos)
pos3.sub(campos)
camera.pointAt(coin.SbVec3f(pos3),coin.SbVec3f(0,0,1))

def dimetric(self):
pos3=FreeCAD.Vector(0,0,0)
campos=FreeCAD.Vector(68,-68,27)
camera = FreeCADGui.ActiveDocument.ActiveView.getCameraNode()
camera.position.setValue( campos)
camera.position.setValue( campos)
pos3.sub(campos)
camera.pointAt(coin.SbVec3f(pos3),coin.SbVec3f(0,0,1))
App.ActiveDocument.recompute()
FreeCADGui.updateGui()
FreeCADGui.updateGui()


def trimetric(self):
pos3=FreeCAD.Vector(0,0,0)
campos=FreeCAD.Vector(210,-790,580)
camera = FreeCADGui.ActiveDocument.ActiveView.getCameraNode()
camera.position.setValue( campos)
camera.position.setValue( campos)
pos3.sub(campos)
camera.pointAt(coin.SbVec3f(pos3),coin.SbVec3f(0,0,1))

Expand Down
1 change: 1 addition & 0 deletions Foto.FCMacro
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ __Icon__ = ''
__Help__ = 'Select an object'
__Status__ = 'alpha'
__Requires__ = ''
__Contact__ = 'https://forum.freecadweb.org/memberlist.php?mode=viewprofile&u=2364'
__Communication__ = ''
__Files__ = ''

Expand Down
13 changes: 6 additions & 7 deletions ObjectCreation/HyperbolaCreater.FCMacro
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ __IconW__ = "C:/Documents and Settings/YourUserName/Application Data/FreeCAD"
__Help__ = "start the macro and follow the instructions"
__Status__ = ""
__Requires__ = ""
__Communication__ = "http://www.freecadweb.org/wiki/User:??"
__Communication__ = "https://forum.freecadweb.org/memberlist.php?mode=viewprofile&u=2030"


import FreeCAD, FreeCADGui, Part, PySide
Expand All @@ -62,15 +62,15 @@ def sayexc(mess=''):
class p():

def makeHyp(self):

if self.radio1.isChecked():
try:

Mi = float(self.r1.text())
Ma = float(self.r2.text())
tS1 = float(self.s1.text())
tS2 = float(self.s2.text())

hyp=Part.Hyperbola()
hyp.MinorRadius=Mi
hyp.MajorRadius=Ma
Expand All @@ -87,7 +87,7 @@ class p():

if self.radio2.isChecked():
try:

Mi = float(self.r1.text())
Ma = float(self.r2.text())
tS1 = float(self.s1.text())
Expand Down Expand Up @@ -120,7 +120,7 @@ class p():

self.dialog.setWindowTitle("Hyperbola Creator")
la = QtGui.QVBoxLayout(self.dialog)

self.radio1 = QRadioButton("Make 2D Shape")
self.radio2 = QRadioButton("Make 3D Revolution")

Expand Down Expand Up @@ -174,4 +174,3 @@ class p():
self.dialog.exec_()

p()

12 changes: 6 additions & 6 deletions ObjectCreation/Macro_FCCircularText.FCMacro
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ cm=ConfigManager("circular text")
PolicePath=cm.get("PolicePath","/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-M.ttf","C:/Windows/Fonts/ARIAL.TTF",".../macfontdir/macfont.ttf")

global rayon ;rayon = 10.0 # radius
global texte ;texte = "FreeCAD the best" #FreeCad The Best your text
global texte ;texte = "FreeCAD the best" # FreeCad The Best your text
global debut ;debut = 0 # begin text
global rotation ;rotation = 360 # must exceed the number of characters of text
global SizeCaractere ;SizeCaractere = 2.0 # size font
Expand All @@ -168,7 +168,7 @@ global pasHelix ;pasHelix = 2.0 # Pas of helix
global nombreCarParTour ;nombreCarParTour= 10 # number char by Pas

global PlacementX ;PlacementX = 0.0 # Placement character axis X
global PlacementY ;PlacementY = 0.0 # Placement characher axis Y
global PlacementY ;PlacementY = 0.0 # Placement character axis Y
global PlacementZ ;PlacementZ = 0.0 # Placement character axis Z

global inclinaisonX ;inclinaisonX = 0 # inclination character axis X
Expand Down Expand Up @@ -264,7 +264,7 @@ class Ui_MainWindow(object):
self.DS_Extrude = QtGui.QDoubleSpinBox(self.groupBox_02)
self.DS_Extrude.setEnabled(False)
self.DS_Extrude.setGeometry(QtCore.QRect(140, 210, 81, 22))
self.DS_Extrude.setToolTip(_fromUtf8("Thickness of the extrude of character. If thickness = 0 then not extrude"))
self.DS_Extrude.setToolTip(_fromUtf8("Thickness of the extrude of character. If thickness = 0 then don't extrude"))
self.DS_Extrude.setAccessibleDescription(_fromUtf8(""))
self.DS_Extrude.setMinimum(-99999999.0)
self.DS_Extrude.setMaximum(99999999.0)
Expand All @@ -280,7 +280,7 @@ class Ui_MainWindow(object):

self.DS_Correction_Angle = QtGui.QDoubleSpinBox(self.groupBox_02)
self.DS_Correction_Angle.setGeometry(QtCore.QRect(140, 150, 81, 22))
self.DS_Correction_Angle.setToolTip(_fromUtf8("Correct angle for tangent the text of thr circle or give a tilt angle "))
self.DS_Correction_Angle.setToolTip(_fromUtf8("Correct angle for tangent the text of the circle or give a tilt angle "))
self.DS_Correction_Angle.setAccessibleDescription(_fromUtf8(""))
self.DS_Correction_Angle.setMinimum(-359.00)
self.DS_Correction_Angle.setMaximum(359.00)
Expand Down Expand Up @@ -523,7 +523,7 @@ class Ui_MainWindow(object):

self.DS_Extrude_Support = QtGui.QDoubleSpinBox(self.groupBox_05)
self.DS_Extrude_Support.setGeometry(QtCore.QRect(10, 80, 81, 22))
self.DS_Extrude_Support.setToolTip(_fromUtf8("Thickness of the extrude the support. If thickness = 0 then not extrude"))
self.DS_Extrude_Support.setToolTip(_fromUtf8("Thickness of the extrude the support. If thickness = 0 then don't extrude"))
self.DS_Extrude_Support.setAccessibleDescription(_fromUtf8(""))
self.DS_Extrude_Support.setMaximum(99999999.0)
self.DS_Extrude_Support.setEnabled(False)
Expand All @@ -545,7 +545,7 @@ class Ui_MainWindow(object):

self.DS_Base_Helix = QtGui.QDoubleSpinBox(self.groupBox_04)
self.DS_Base_Helix.setGeometry(QtCore.QRect(10, 50, 81, 22))
self.DS_Base_Helix.setToolTip(_fromUtf8("Base (begin) of helix (to activate Step of Helix must be zero)"))
self.DS_Base_Helix.setToolTip(_fromUtf8("Base (beginning) of helix (to activate Step of Helix must be zero)"))
self.DS_Base_Helix.setEnabled(False)
self.DS_Base_Helix.setAccessibleDescription(_fromUtf8(""))
self.DS_Base_Helix.setMinimum(-99999999.0)
Expand Down
2 changes: 1 addition & 1 deletion ObjectCreation/ScrewMaker.FCMacro
Original file line number Diff line number Diff line change
Expand Up @@ -3340,7 +3340,7 @@ class Screw(object):
t_mean = t
else: #still need the data from iso2009def, but this screw can not created here
P, a, b, dk_theo, dk_mean, k, n_min, r, t_mean, x = iso2009def[ThreadType]
ht = 0.0 # Head heigth of flat head
ht = 0.0 # Head height of flat head
if SType == 'ISO7046':
cT, mH, mZ = iso7046def[ThreadType]
if (SType == 'ISO7047'):
Expand Down
Loading

0 comments on commit 1eafc31

Please sign in to comment.