Fixed retraction of tool when profiling multiple holes.
This commit is contained in:
committed by
Yorik van Havre
parent
90952b1c5d
commit
8c70c3abcd
@@ -218,7 +218,7 @@ class ObjectOp(PathOp.ObjectOp):
|
||||
|
||||
if self.endVector is not None:
|
||||
pathParams['start'] = self.endVector
|
||||
elif obj.UseStartPoint:
|
||||
elif PathOp.FeatureStartPoint & self.opFeatures(obj) and obj.UseStartPoint:
|
||||
pathParams['start'] = obj.StartPoint
|
||||
|
||||
obj.PathParams = str({key: value for key, value in pathParams.items() if key != 'shapes'})
|
||||
@@ -259,10 +259,10 @@ class ObjectOp(PathOp.ObjectOp):
|
||||
final_depth=obj.FinalDepth.Value,
|
||||
user_depths=None)
|
||||
|
||||
if PathOp.FeatureStartPoint and obj.UseStartPoint:
|
||||
if PathOp.FeatureStartPoint & self.opFeatures(obj) and obj.UseStartPoint:
|
||||
start = obj.StartPoint
|
||||
else:
|
||||
start = FreeCAD.Vector()
|
||||
start = None
|
||||
|
||||
shapes = self.areaOpShapes(obj)
|
||||
|
||||
@@ -276,8 +276,15 @@ class ObjectOp(PathOp.ObjectOp):
|
||||
FreeCAD.Console.PrintError(e)
|
||||
FreeCAD.Console.PrintError("Something unexpected happened. Check project and tool config.")
|
||||
|
||||
if self.areaOpRetractTool(obj):
|
||||
self.endVector = None
|
||||
|
||||
return sims
|
||||
|
||||
def areaOpRetractTool(self, obj):
|
||||
'''areaOpRetractTool(obj) ... return False to keep the tool at current level between shapes. Default is True.'''
|
||||
return True
|
||||
|
||||
def areaOpAreaParams(self, obj, isHole):
|
||||
'''areaOpAreaParams(obj, isHole) ... return operation specific area parameters in a dictionary.
|
||||
Note that the resulting parameters are stored in the property AreaParams.
|
||||
|
||||
@@ -214,7 +214,7 @@ class ObjectOp(object):
|
||||
self.commandlist ... a list for collecting all commands produced by the operation
|
||||
|
||||
Once everything is validated and above variables are set the implementation calls
|
||||
opExectue(obj) - which is expected to add the generated commands to self.commandlist
|
||||
opExecute(obj) - which is expected to add the generated commands to self.commandlist
|
||||
Finally the base implementation adds a rapid move to clearance height and assigns
|
||||
the receiver's Path property from the command list.
|
||||
'''
|
||||
|
||||
@@ -60,7 +60,7 @@ class ObjectProfile(PathProfileBase.ObjectProfile):
|
||||
def areaOpFeatures(self, obj):
|
||||
'''baseObject() ... returns super of receiver
|
||||
Used to call base implementation in overwritten functions.'''
|
||||
return PathOp.FeatureBaseFaces
|
||||
return PathOp.FeatureBaseFaces | PathOp.FeatureBasePanels
|
||||
|
||||
def initAreaOp(self, obj):
|
||||
'''initAreaOp(obj) ... adds properties for hole, circle and perimeter processing.'''
|
||||
@@ -127,6 +127,7 @@ class ObjectProfile(PathProfileBase.ObjectProfile):
|
||||
env = PathUtils.getEnvelope(self.baseobject.Shape, subshape=f, depthparams=self.depthparams)
|
||||
shapes.append((env, False))
|
||||
|
||||
PathLog.debug("%d shapes" % len(shapes))
|
||||
return shapes
|
||||
|
||||
def areaOpSetDefaultValues(self, obj):
|
||||
|
||||
Reference in New Issue
Block a user