Path: Add ProfileEdges and AvoidLastX_Faces inputs to GUI

Path: Set min & max values for `StepOver`
This commit is contained in:
Russell Johnson
2020-05-14 10:18:13 -05:00
parent 691c3900c1
commit e8c9483201
2 changed files with 203 additions and 150 deletions

View File

@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>368</width>
<height>400</height>
<height>442</height>
</rect>
</property>
<property name="windowTitle">
@@ -57,142 +57,24 @@
<item row="1" column="0">
<widget class="QWidget" name="widget" native="true">
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="1" colspan="2">
<widget class="QComboBox" name="scanType">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Planar: Flat, 3D surface scan. Rotational: 4th-axis rotational scan.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<item>
<property name="text">
<string>Planar</string>
</property>
</item>
<item>
<property name="text">
<string>Rotational</string>
</property>
</item>
</widget>
</item>
<item row="2" column="1" colspan="2">
<widget class="QComboBox" name="layerMode">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Complete the operation in a single pass at depth, or mulitiple passes to final depth.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<item>
<property name="text">
<string>Single-pass</string>
</property>
</item>
<item>
<property name="text">
<string>Multi-pass</string>
</property>
</item>
</widget>
</item>
<item row="8" column="1" colspan="2">
<widget class="QSpinBox" name="stepOver">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The amount by which the tool is laterally displaced on each cycle of the pattern, specified in percent of the tool diameter.&lt;/p&gt;&lt;p&gt;A step over of 100% results in no overlap between two different cycles.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="singleStep">
<number>10</number>
</property>
<property name="value">
<number>100</number>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="stepOver_label">
<item row="3" column="0">
<widget class="QLabel" name="cutPattern_label">
<property name="text">
<string>Step over</string>
<string>Cut Pattern</string>
</property>
</widget>
</item>
<item row="10" column="0">
<item row="12" column="0">
<widget class="QLabel" name="sampleInterval_label">
<property name="text">
<string>Sample interval</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="layerMode_label">
<property name="text">
<string>Layer Mode</string>
</property>
</widget>
</item>
<item row="12" column="1">
<widget class="QCheckBox" name="optimizeEnabled">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Enable optimization of linear paths (co-linear points). Removes unnecessary co-linear points from G-Code output.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Optimize Linear Paths</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="dropCutterDirSelect_label">
<property name="text">
<string>Drop Cutter Direction</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="boundBoxExtraOffset_label">
<property name="text">
<string>BoundBox extra offset X, Y</string>
</property>
</widget>
</item>
<item row="12" column="0">
<widget class="QCheckBox" name="useStartPoint">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Make True, if specifying a Start Point&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Use Start Point</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="scanType_label">
<property name="text">
<string>Scan Type</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="boundBoxSelect_label">
<property name="text">
<string>BoundBox</string>
</property>
</widget>
</item>
<item row="7" column="1" colspan="2">
<widget class="Gui::InputField" name="depthOffset" native="true">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Set the Z-axis depth offset from the target surface.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="unit" stdset="0">
<string notr="true">mm</string>
</property>
</widget>
</item>
<item row="4" column="1" colspan="2">
<item row="6" column="1" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="Gui::InputField" name="boundBoxExtraOffsetX" native="true">
<widget class="Gui::InputField" name="boundBoxExtraOffsetX">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
@@ -208,7 +90,7 @@
</widget>
</item>
<item>
<widget class="Gui::InputField" name="boundBoxExtraOffsetY" native="true">
<widget class="Gui::InputField" name="boundBoxExtraOffsetY">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Additional offset to the selected bounding box along the Y axis.&quot;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
@@ -219,8 +101,8 @@
</item>
</layout>
</item>
<item row="10" column="1" colspan="2">
<widget class="Gui::InputField" name="sampleInterval" native="true">
<item row="12" column="1" colspan="2">
<widget class="Gui::InputField" name="sampleInterval">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Set the sampling resolution. Smaller values quickly increase processing time.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
@@ -229,28 +111,21 @@
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="depthOffset_label">
<item row="14" column="1">
<widget class="QCheckBox" name="optimizeEnabled">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Enable optimization of linear paths (co-linear points). Removes unnecessary co-linear points from G-Code output.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Depth offset</string>
<string>Optimize Linear Paths</string>
</property>
</widget>
</item>
<item row="6" column="1" colspan="2">
<widget class="QComboBox" name="dropCutterDirSelect">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Dropcutter lines are created parallel to this axis.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<item row="0" column="0">
<widget class="QLabel" name="boundBoxSelect_label">
<property name="text">
<string>BoundBox</string>
</property>
<item>
<property name="text">
<string>X</string>
</property>
</item>
<item>
<property name="text">
<string>Y</string>
</property>
</item>
</widget>
</item>
<item row="0" column="1" colspan="2">
@@ -270,7 +145,7 @@
</item>
</widget>
</item>
<item row="13" column="1">
<item row="15" column="1">
<widget class="QCheckBox" name="optimizeStepOverTransitions">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Enable separate optimization of transitions between, and breaks within, each step over path.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
@@ -280,10 +155,37 @@
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="cutPattern_label">
<item row="4" column="1" colspan="2">
<widget class="QComboBox" name="comboBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Profile the edges of the selection.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<item>
<property name="text">
<string>None</string>
</property>
</item>
<item>
<property name="text">
<string>Only</string>
</property>
</item>
<item>
<property name="text">
<string>First</string>
</property>
</item>
<item>
<property name="text">
<string>Last</string>
</property>
</item>
</widget>
</item>
<item row="10" column="0">
<widget class="QLabel" name="stepOver_label">
<property name="text">
<string>Cut Pattern</string>
<string>Step over</string>
</property>
</widget>
</item>
@@ -324,6 +226,146 @@
</item>
</widget>
</item>
<item row="1" column="1" colspan="2">
<widget class="QComboBox" name="scanType">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Planar: Flat, 3D surface scan. Rotational: 4th-axis rotational scan.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<item>
<property name="text">
<string>Planar</string>
</property>
</item>
<item>
<property name="text">
<string>Rotational</string>
</property>
</item>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="boundBoxExtraOffset_label">
<property name="text">
<string>BoundBox extra offset X, Y</string>
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="QLabel" name="depthOffset_label">
<property name="text">
<string>Depth offset</string>
</property>
</widget>
</item>
<item row="2" column="1" colspan="2">
<widget class="QComboBox" name="layerMode">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Complete the operation in a single pass at depth, or mulitiple passes to final depth.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<item>
<property name="text">
<string>Single-pass</string>
</property>
</item>
<item>
<property name="text">
<string>Multi-pass</string>
</property>
</item>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="layerMode_label">
<property name="text">
<string>Layer Mode</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="scanType_label">
<property name="text">
<string>Scan Type</string>
</property>
</widget>
</item>
<item row="8" column="1" colspan="2">
<widget class="QComboBox" name="dropCutterDirSelect">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Dropcutter lines are created parallel to this axis.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<item>
<property name="text">
<string>X</string>
</property>
</item>
<item>
<property name="text">
<string>Y</string>
</property>
</item>
</widget>
</item>
<item row="9" column="1" colspan="2">
<widget class="Gui::InputField" name="depthOffset">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Set the Z-axis depth offset from the target surface.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="unit" stdset="0">
<string notr="true">mm</string>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="dropCutterDirSelect_label">
<property name="text">
<string>Drop Cutter Direction</string>
</property>
</widget>
</item>
<item row="14" column="0">
<widget class="QCheckBox" name="useStartPoint">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Make True, if specifying a Start Point&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Use Start Point</string>
</property>
</widget>
</item>
<item row="5" column="1" colspan="2">
<widget class="QSpinBox" name="avoidLastX_Faces">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Avoid cutting the last 'N' faces in the Base Geometry list of selected faces.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="profileEdges_label">
<property name="text">
<string>Profile Edges</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="avoidLastX_Faces_label">
<property name="text">
<string>Avoid Last X Faces</string>
</property>
</widget>
</item>
<item row="10" column="1" colspan="2">
<widget class="QSpinBox" name="stepOver">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The amount by which the tool is laterally displaced on each cycle of the pattern, specified in percent of the tool diameter.&lt;/p&gt;&lt;p&gt;A step over of 100% results in no overlap between two different cycles.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>100</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>

View File

@@ -141,11 +141,17 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage):
return signals
def updateVisibility(self):
def updateVisibility(self, sentObj=None):
'''updateVisibility(sentObj=None)... Updates visibility of Tasks panel objects.'''
if self.form.scanType.currentText() == 'Planar':
self.form.cutPattern.show()
self.form.cutPattern_label.show()
self.form.optimizeStepOverTransitions.show()
if hasattr(self.form, 'profileEdges'):
self.form.profileEdges.show()
self.form.profileEdges_label.show()
self.form.avoidLastX_Faces.show()
self.form.avoidLastX_Faces_label.show()
self.form.boundBoxExtraOffsetX.hide()
self.form.boundBoxExtraOffsetY.hide()
@@ -156,6 +162,11 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage):
self.form.cutPattern.hide()
self.form.cutPattern_label.hide()
self.form.optimizeStepOverTransitions.hide()
if hasattr(self.form, 'profileEdges'):
self.form.profileEdges.hide()
self.form.profileEdges_label.hide()
self.form.avoidLastX_Faces.hide()
self.form.avoidLastX_Faces_label.hide()
self.form.boundBoxExtraOffsetX.show()
self.form.boundBoxExtraOffsetY.show()