Add a task panel page for controlling turning diameters
This commit is contained in:
@@ -64,6 +64,7 @@ FeatureBaseFaces = 0x0400 # Base
|
||||
FeatureBasePanels = 0x0800 # Base
|
||||
FeatureLocations = 0x1000 # Locations
|
||||
FeatureCoolant = 0x2000 # Coolant
|
||||
FeatureDiameters = 0x4000 # Turning Diameters
|
||||
|
||||
FeatureBaseGeometry = FeatureBaseVertexes | FeatureBaseFaces | FeatureBaseEdges | FeatureBasePanels
|
||||
|
||||
@@ -91,6 +92,7 @@ class ObjectOp(object):
|
||||
FeatureBasePanels ... Base geometry support for Arch.Panels
|
||||
FeatureLocations ... Base location support
|
||||
FeatureCoolant ... Support for operation coolant
|
||||
FeatureDiameters ... Support for turning operation diameters
|
||||
|
||||
The base class handles all base API and forwards calls to subclasses with
|
||||
an op prefix. For instance, an op is not expected to overwrite onChanged(),
|
||||
@@ -169,6 +171,10 @@ class ObjectOp(object):
|
||||
obj.addProperty("App::PropertyVectorDistance", "StartPoint", "Start Point", QtCore.QT_TRANSLATE_NOOP("PathOp", "The start point of this path"))
|
||||
obj.addProperty("App::PropertyBool", "UseStartPoint", "Start Point", QtCore.QT_TRANSLATE_NOOP("PathOp", "Make True, if specifying a Start Point"))
|
||||
|
||||
if FeatureDiameters & features:
|
||||
obj.addProperty("App::PropertyDistance", "MinDiameter", "Diameter", QtCore.QT_TRANSLATE_NOOP("PathOp", "Lower limit of the turning diameter"))
|
||||
obj.addProperty("App::PropertyDistance", "MaxDiameter", "Diameter", QtCore.QT_TRANSLATE_NOOP("PathOp", "Upper limit of the turning diameter."))
|
||||
|
||||
# members being set later
|
||||
self.commandlist = None
|
||||
self.horizFeed = None
|
||||
@@ -352,6 +358,10 @@ class ObjectOp(object):
|
||||
if not self.applyExpression(obj, 'ClearanceHeight', job.SetupSheet.ClearanceHeightExpression):
|
||||
obj.ClearanceHeight = '5 mm'
|
||||
|
||||
if FeatureDiameters & features:
|
||||
obj.MinDiameter = '0 mm'
|
||||
obj.MaxDiameter = '0 mm'
|
||||
|
||||
if FeatureStartPoint & features:
|
||||
obj.UseStartPoint = False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user