Skip to content

Commit

Permalink
add boundary enforcement to the task panel
Browse files Browse the repository at this point in the history
  • Loading branch information
sliptonic committed Oct 15, 2020
1 parent 71cd301 commit 053b8e9
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/Mod/Path/Gui/Resources/panels/PageOpSurfaceEdit.ui
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>368</width>
<height>442</height>
<width>420</width>
<height>541</height>
</rect>
</property>
<property name="windowTitle">
Expand Down Expand Up @@ -366,6 +366,19 @@
</property>
</widget>
</item>
<item row="15" column="0">
<widget class="QCheckBox" name="boundaryEnforcement">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;If true, the cutter will remain inside the boundaries of the model or selected face(s)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Boundary Enforcement</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
Expand Down
9 changes: 9 additions & 0 deletions src/Mod/Path/PathScripts/PathSurfaceGui.py
Expand Up @@ -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()

Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 053b8e9

Please sign in to comment.