Merge pull request #3706 from etrombly/emptyPath

[PATH] don't generate gcode if op isn't valid. Don't plunge to start height if safe and clearance height are the same.
This commit is contained in:
sliptonic
2020-08-04 10:20:13 -05:00
committed by GitHub
3 changed files with 11 additions and 15 deletions

View File

@@ -487,7 +487,7 @@ class ObjectOp(PathOp.ObjectOp):
sims.append(sim)
# Eif
if self.areaOpRetractTool(obj) and self.endVector is not None:
if self.areaOpRetractTool(obj) and self.endVector is not None and len(self.commandlist) > 1:
self.endVector[2] = obj.ClearanceHeight.Value
self.commandlist.append(Path.Command('G0', {'Z': obj.ClearanceHeight.Value, 'F': self.vertRapid}))

View File

@@ -514,10 +514,6 @@ class ObjectOp(object):
result = self.opExecute(obj) # pylint: disable=assignment-from-no-return
if FeatureHeights & self.opFeatures(obj):
# Let's finish by rapid to clearance...just for safety
self.commandlist.append(Path.Command("G0", {"Z": obj.ClearanceHeight.Value}))
path = Path.Path(self.commandlist)
obj.Path = path
obj.CycleTime = self.getCycleTimeEstimate(obj)