Implemented interface functions in base classes.

This commit is contained in:
Markus Lampert
2017-09-24 16:03:31 -07:00
committed by Yorik van Havre
parent 18a3fc0580
commit 567f592d84
5 changed files with 46 additions and 0 deletions

View File

@@ -60,6 +60,11 @@ class ObjectOp(PathOp.ObjectOp):
Do not overwrite, implement areaOpFeatures(obj) instead.'''
return PathOp.FeatureTool | PathOp.FeatureDepths | PathOp.FeatureStepDown | PathOp.FeatureHeights | PathOp.FeatureStartPoint | self.areaOpFeatures(obj)
def areaOpFeatures(self, obj):
'''areaOpFeatures(obj) ... overwrite to add operation specific features.
Can safely be overwritten by subclasses.'''
return 0
def initOperation(self, obj):
'''initOperation(obj) ... sets up standard Path.Area properties and calls initAreaOp().
Do not overwrite, overwrite initAreaOp(obj) instead.'''
@@ -75,6 +80,11 @@ class ObjectOp(PathOp.ObjectOp):
self.initAreaOp(obj)
def initAreaOp(self, obj):
'''initAreaOp(obj) ... overwrite if the receiver class needs initialisation.
Can safely be overwritten by subclasses.'''
pass
def areaOpShapeForDepths(self, obj):
'''areaOpShapeForDepths(obj) ... returns the shape used to make an initial calculation for the depths being used.
The default implementation returns the job's Base.Shape'''