From 053b8e9e32bf0dc7c1beb8c8aad1250535475c1f Mon Sep 17 00:00:00 2001 From: sliptonic Date: Wed, 14 Oct 2020 22:09:23 -0500 Subject: [PATCH] add boundary enforcement to the task panel --- .../Gui/Resources/panels/PageOpSurfaceEdit.ui | 17 +++++++++++++++-- src/Mod/Path/PathScripts/PathSurfaceGui.py | 9 +++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/Mod/Path/Gui/Resources/panels/PageOpSurfaceEdit.ui b/src/Mod/Path/Gui/Resources/panels/PageOpSurfaceEdit.ui index e39c46b7bc00..926b9effde07 100644 --- a/src/Mod/Path/Gui/Resources/panels/PageOpSurfaceEdit.ui +++ b/src/Mod/Path/Gui/Resources/panels/PageOpSurfaceEdit.ui @@ -6,8 +6,8 @@ 0 0 - 368 - 442 + 420 + 541 @@ -366,6 +366,19 @@ + + + + <html><head/><body><p>If true, the cutter will remain inside the boundaries of the model or selected face(s)</p></body></html> + + + Boundary Enforcement + + + true + + + diff --git a/src/Mod/Path/PathScripts/PathSurfaceGui.py b/src/Mod/Path/PathScripts/PathSurfaceGui.py index 0472885c20d2..bd428b90c78a 100644 --- a/src/Mod/Path/PathScripts/PathSurfaceGui.py +++ b/src/Mod/Path/PathScripts/PathSurfaceGui.py @@ -102,6 +102,9 @@ def getFields(self, obj): if obj.UseStartPoint != self.form.useStartPoint.isChecked(): obj.UseStartPoint = self.form.useStartPoint.isChecked() + if obj.BoundaryEnforcement != self.form.boundaryEnforcement.isChecked(): + obj.BoundaryEnforcement = self.form.boundaryEnforcement.isChecked() + if obj.OptimizeLinearPaths != self.form.optimizeEnabled.isChecked(): obj.OptimizeLinearPaths = self.form.optimizeEnabled.isChecked() @@ -144,6 +147,11 @@ def setFields(self, obj): else: self.form.useStartPoint.setCheckState(QtCore.Qt.Unchecked) + if obj.BoundaryEnforcement: + self.form.boundaryEnforcement.setCheckState(QtCore.Qt.Checked) + else: + self.form.boundaryEnforcement.setCheckState(QtCore.Qt.Unchecked) + if obj.OptimizeLinearPaths: self.form.optimizeEnabled.setCheckState(QtCore.Qt.Checked) else: @@ -174,6 +182,7 @@ def getSignalsForUpdate(self, obj): signals.append(self.form.stepOver.editingFinished) signals.append(self.form.sampleInterval.editingFinished) signals.append(self.form.useStartPoint.stateChanged) + signals.append(self.form.boundaryEnforcement.stateChanged) signals.append(self.form.optimizeEnabled.stateChanged) signals.append(self.form.optimizeStepOverTransitions.stateChanged)