LGTM: various fixes for using string operator instead of numeric
This commit is contained in:
@@ -56,10 +56,9 @@ class DistanceBolt:
|
||||
|
||||
def makeDistanceBolt():
|
||||
doc = FreeCAD.activeDocument()
|
||||
if doc == None:
|
||||
if doc is None:
|
||||
doc = FreeCAD.newDocument()
|
||||
bolt=doc.addObject("Part::FeaturePython","Distance_Bolt")
|
||||
bolt.Label = "Distance bolt"
|
||||
DistanceBolt(bolt)
|
||||
bolt.ViewObject.Proxy=0
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ class Epitrochoid:
|
||||
|
||||
def makeEpitrochoid():
|
||||
doc = FreeCAD.activeDocument()
|
||||
if doc == None:
|
||||
if doc is None:
|
||||
doc = FreeCAD.newDocument()
|
||||
epitrochoid=doc.addObject("Part::FeaturePython","Epitrochoid") #add object to document
|
||||
epitrochoid.Label = "Epitrochoid"
|
||||
|
||||
@@ -17,8 +17,8 @@ def proceed():
|
||||
|
||||
def compute():
|
||||
QtGui.QApplication.setOverrideCursor(QtCore.Qt.WaitCursor)
|
||||
|
||||
if FreeCAD.ActiveDocument==None:
|
||||
|
||||
if FreeCAD.ActiveDocument is None:
|
||||
FreeCAD.newDocument("Gear")
|
||||
|
||||
oldDocumentObjects=App.ActiveDocument.Objects
|
||||
|
||||
@@ -64,7 +64,7 @@ class BoxCylinder:
|
||||
|
||||
def makeParallelepiped():
|
||||
doc = FreeCAD.activeDocument()
|
||||
if doc == None:
|
||||
if doc is None:
|
||||
doc = FreeCAD.newDocument()
|
||||
obj=doc.addObject("Part::FeaturePython","Parallelepiped")
|
||||
obj.Label = "Parallelepiped"
|
||||
@@ -74,7 +74,7 @@ def makeParallelepiped():
|
||||
|
||||
def makeBoxCylinder():
|
||||
doc = FreeCAD.activeDocument()
|
||||
if doc == None:
|
||||
if doc is None:
|
||||
doc = FreeCAD.newDocument()
|
||||
cyl=doc.addObject("Part::Cylinder","Cylinder")
|
||||
cyl.Radius=16.0
|
||||
|
||||
@@ -39,7 +39,7 @@ class MySpring:
|
||||
|
||||
def makeMySpring():
|
||||
doc = FreeCAD.activeDocument()
|
||||
if doc == None:
|
||||
if doc is None:
|
||||
doc = FreeCAD.newDocument()
|
||||
spring=doc.addObject("Part::FeaturePython","My_Spring")
|
||||
spring.Label = "My Spring"
|
||||
|
||||
Reference in New Issue
Block a user