black
This commit is contained in:
@@ -173,7 +173,7 @@ def SetupProperties():
|
||||
|
||||
|
||||
def Create(name, obj=None, parentJob=None):
|
||||
'''Create(name) ... Creates and returns an Engrave operation.'''
|
||||
"""Create(name) ... Creates and returns an Engrave operation."""
|
||||
if obj is None:
|
||||
obj = FreeCAD.ActiveDocument.addObject("Path::FeaturePython", name)
|
||||
obj.Proxy = ObjectEngrave(obj, name, parentJob)
|
||||
|
||||
@@ -230,10 +230,7 @@ class ViewProvider:
|
||||
# make sure the resource view providers are setup properly
|
||||
if prop == "Model" and self.obj.Model:
|
||||
for base in self.obj.Model.Group:
|
||||
if (
|
||||
base.ViewObject
|
||||
and base.ViewObject.Proxy
|
||||
):
|
||||
if base.ViewObject and base.ViewObject.Proxy:
|
||||
base.ViewObject.Proxy.onEdit(_OpenCloseResourceEditor)
|
||||
if (
|
||||
prop == "Stock"
|
||||
|
||||
@@ -51,20 +51,20 @@ def translate(context, text, disambig=None):
|
||||
return QtCore.QCoreApplication.translate(context, text, disambig)
|
||||
|
||||
|
||||
FeatureTool = 0x0001 # ToolController
|
||||
FeatureDepths = 0x0002 # FinalDepth, StartDepth
|
||||
FeatureHeights = 0x0004 # ClearanceHeight, SafeHeight
|
||||
FeatureStartPoint = 0x0008 # StartPoint
|
||||
FeatureFinishDepth = 0x0010 # FinishDepth
|
||||
FeatureStepDown = 0x0020 # StepDown
|
||||
FeatureNoFinalDepth = 0x0040 # edit or not edit FinalDepth
|
||||
FeatureBaseVertexes = 0x0100 # Base
|
||||
FeatureBaseEdges = 0x0200 # Base
|
||||
FeatureBaseFaces = 0x0400 # Base
|
||||
FeatureBasePanels = 0x0800 # Base
|
||||
FeatureLocations = 0x1000 # Locations
|
||||
FeatureCoolant = 0x2000 # Coolant
|
||||
FeatureDiameters = 0x4000 # Turning Diameters
|
||||
FeatureTool = 0x0001 # ToolController
|
||||
FeatureDepths = 0x0002 # FinalDepth, StartDepth
|
||||
FeatureHeights = 0x0004 # ClearanceHeight, SafeHeight
|
||||
FeatureStartPoint = 0x0008 # StartPoint
|
||||
FeatureFinishDepth = 0x0010 # FinishDepth
|
||||
FeatureStepDown = 0x0020 # StepDown
|
||||
FeatureNoFinalDepth = 0x0040 # edit or not edit FinalDepth
|
||||
FeatureBaseVertexes = 0x0100 # Base
|
||||
FeatureBaseEdges = 0x0200 # Base
|
||||
FeatureBaseFaces = 0x0400 # Base
|
||||
FeatureBasePanels = 0x0800 # Base
|
||||
FeatureLocations = 0x1000 # Locations
|
||||
FeatureCoolant = 0x2000 # Coolant
|
||||
FeatureDiameters = 0x4000 # Turning Diameters
|
||||
|
||||
FeatureBaseGeometry = FeatureBaseVertexes | FeatureBaseFaces | FeatureBaseEdges
|
||||
|
||||
@@ -338,7 +338,7 @@ class ObjectOp(object):
|
||||
|
||||
self.initOperation(obj)
|
||||
|
||||
if not hasattr(obj, 'DoNotSetDefaultValues') or not obj.DoNotSetDefaultValues:
|
||||
if not hasattr(obj, "DoNotSetDefaultValues") or not obj.DoNotSetDefaultValues:
|
||||
if parentJob:
|
||||
self.job = PathUtils.addToJob(obj, jobname=parentJob.Name)
|
||||
job = self.setDefaultValues(obj)
|
||||
|
||||
@@ -1432,7 +1432,9 @@ class ObjectProfile(PathAreaOp.ObjectOp):
|
||||
# Method to add temporary debug object
|
||||
def _addDebugObject(self, objName, objShape):
|
||||
if self.isDebug:
|
||||
newDocObj = FreeCAD.ActiveDocument.addObject("Part::Feature", "tmp_" + objName)
|
||||
newDocObj = FreeCAD.ActiveDocument.addObject(
|
||||
"Part::Feature", "tmp_" + objName
|
||||
)
|
||||
newDocObj.Shape = objShape
|
||||
newDocObj.purgeTouched()
|
||||
self.tmpGrp.addObject(newDocObj)
|
||||
|
||||
Reference in New Issue
Block a user