Skip to content

Commit

Permalink
Path: Convert SetupProperties() to dynamic code
Browse files Browse the repository at this point in the history
This method will always synchronize with operation's class properties.
  • Loading branch information
Russ4262 committed Jun 16, 2020
1 parent f4e522c commit 33d1d28
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.
12 changes: 2 additions & 10 deletions src/Mod/Path/PathScripts/PathSurface.py
Expand Up @@ -2129,18 +2129,10 @@ def showDebugObject(self, objShape, objName):
self.tempGroup.addObject(do)
# Eclass


def SetupProperties():
''' SetupProperties() ... Return list of properties required for operation.'''
setup = ['AvoidLastX_Faces', 'AvoidLastX_InternalFeatures', 'BoundBox']
setup.extend(['BoundaryAdjustment', 'PatternCenterAt', 'PatternCenterCustom'])
setup.extend(['CircularUseG2G3', 'InternalFeaturesCut', 'InternalFeaturesAdjustment'])
setup.extend(['CutMode', 'CutPattern', 'CutPatternAngle', 'CutPatternReversed'])
setup.extend(['CutterTilt', 'DepthOffset', 'DropCutterDir', 'GapSizes', 'GapThreshold'])
setup.extend(['HandleMultipleFeatures', 'LayerMode', 'OptimizeStepOverTransitions'])
setup.extend(['ProfileEdges', 'BoundaryEnforcement', 'RotationAxis', 'SampleInterval'])
setup.extend(['ScanType', 'StartIndex', 'StartPoint', 'StepOver', 'StopIndex'])
setup.extend(['UseStartPoint', 'AngularDeflection', 'LinearDeflection', 'ShowTempObjects'])
return setup
return [tup[1] for tup in ObjectSurface.opPropertyDefinitions(False)]


def Create(name, obj=None):
Expand Down
12 changes: 2 additions & 10 deletions src/Mod/Path/PathScripts/PathWaterline.py
Expand Up @@ -1788,19 +1788,11 @@ def showDebugObject(self, objShape, objName):
do.Shape = objShape
do.purgeTouched()
self.tempGroup.addObject(do)

# Eclass

def SetupProperties():
''' SetupProperties() ... Return list of properties required for operation.'''
setup = ['Algorithm', 'AvoidLastX_Faces', 'AvoidLastX_InternalFeatures', 'BoundBox']
setup.extend(['BoundaryAdjustment', 'PatternCenterAt', 'PatternCenterCustom'])
setup.extend(['ClearLastLayer', 'InternalFeaturesCut', 'InternalFeaturesAdjustment'])
setup.extend(['CutMode', 'CutPattern', 'CutPatternAngle', 'CutPatternReversed'])
setup.extend(['DepthOffset', 'GapSizes', 'GapThreshold', 'StepOver'])
setup.extend(['HandleMultipleFeatures', 'LayerMode', 'OptimizeStepOverTransitions'])
setup.extend(['BoundaryEnforcement', 'SampleInterval', 'StartPoint', 'IgnoreOuterAbove'])
setup.extend(['UseStartPoint', 'AngularDeflection', 'LinearDeflection', 'ShowTempObjects'])
return setup
return [tup[1] for tup in ObjectWaterline.opPropertyDefinitions(False)]


def Create(name, obj=None):
Expand Down

0 comments on commit 33d1d28

Please sign in to comment.