Rapid to safe height above the hole

This commit is contained in:
Daniel Wood
2021-05-04 14:06:30 +01:00
parent ac13b55666
commit 5ff5b11e3c

View File

@@ -87,6 +87,7 @@ class ObjectDrilling(PathCircularHoleBase.ObjectOp):
lastAxis = None
lastAngle = 0.0
parentJob = PathUtils.findParentJob(obj)
self.commandlist.append(Path.Command("(Begin Drilling)"))
@@ -151,7 +152,10 @@ class ObjectDrilling(PathCircularHoleBase.ObjectOp):
self.opSetDefaultRetractHeight(obj)
cmdParams['R'] = obj.RetractHeight.Value
# move to hole location
self.commandlist.append(Path.Command('G0', {'X': p['x'], 'Y': p['y'], 'F': self.horizRapid}))
startHeight = obj.StartDepth.Value + parentJob.SetupSheet.SafeHeightOffset.Value
self.commandlist.append(Path.Command('G0', {'Z': startHeight, 'F': self.vertFeed}))
self.commandlist.append(Path.Command('G1', {'Z': obj.StartDepth.Value, 'F': self.vertFeed}))
# Update changes to parameters