[Path] disable wire sorting for ZigZagOffset and Offset

Also enable the Min Travel checkbox unconditionally, since it can now be
used to override this "disable" feature and enable wire sorting
This commit is contained in:
David Kaufman
2024-02-19 08:04:04 -05:00
parent 5763ac32b0
commit 8807106ab8
2 changed files with 4 additions and 9 deletions

View File

@@ -272,6 +272,10 @@ class ObjectOp(PathOp.ObjectOp):
# Note that emitting preambles between moves breaks some dressups and prevents path optimization on some controllers
pathParams["preamble"] = False
# disable path sorting for offset and zigzag-offset paths
if hasattr(obj, "OffsetPattern") and obj.OffsetPattern in ["ZigZagOffset", "Offset"] and hasattr(obj, "MinTravel") and not obj.MinTravel:
pathParams["sort_mode"] = 0
if not self.areaOpRetractTool(obj):
pathParams["threshold"] = 2.001 * self.radius

View File

@@ -93,19 +93,10 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage):
if not (FeatureRestMachining & self.pocketFeatures()):
form.useRestMachining.hide()
# if True:
# # currently doesn't have an effect or is experimental
# form.minTravel.hide()
return form
def updateMinTravel(self, obj, setModel=True):
if obj.UseStartPoint:
self.form.minTravel.setEnabled(True)
else:
self.form.minTravel.setChecked(False)
self.form.minTravel.setEnabled(False)
if setModel and obj.MinTravel != self.form.minTravel.isChecked():
obj.MinTravel = self.form.minTravel.isChecked()