[CAM] reorder job tabs to put Setup first

This commit is contained in:
David Kaufman
2025-09-19 18:26:46 -04:00
committed by Chris Hennes
parent 9f2d212b12
commit a85f53d0bb
2 changed files with 418 additions and 418 deletions

View File

@@ -14,420 +14,8 @@
<string>Job Edit</string>
</property>
<property name="currentIndex">
<number>2</number>
<number>0</number>
</property>
<widget class="QWidget" name="tabGeneral">
<attribute name="title">
<string>General</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_12">
<item>
<widget class="QToolBox" name="jobBox">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="page_5">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>707</width>
<height>648</height>
</rect>
</property>
<attribute name="label">
<string>Job</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_17">
<item>
<widget class="QGroupBox" name="groupBox_6">
<property name="title">
<string>Label</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_16">
<item>
<widget class="QLineEdit" name="jobLabel"/>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>Model</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_14">
<item>
<widget class="QListWidget" name="jobModel">
<property name="selectionMode">
<enum>QAbstractItemView::MultiSelection</enum>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>334</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="jobModelEdit">
<property name="text">
<string>Edit</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_5">
<property name="title">
<string>Description</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_15">
<item>
<widget class="QPlainTextEdit" name="jobDescription"/>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="templateExport">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>100</width>
<height>30</height>
</rect>
</property>
<attribute name="label">
<string>Template export</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_13"/>
</widget>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabOutput">
<attribute name="title">
<string>Output</string>
</attribute>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Output file</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="postProcessorOutputFile">
<property name="toolTip">
<string>Enter a path and optionally file name (see below) to be used as the default for the post processor export.
The following substitutions are performed before the name is resolved at the time of the post processing:
Substitution allows the following:
%D ... directory of the active document
%d ... name of the active document (with extension)
%M ... user macro directory
%j ... name of the active Job object
The Following can be used if output is being split. If Output is not split
these will be ignored.
%T ... Tool Number
%t ... Tool Controller label
%W ... Work Coordinate System
%O ... Operation Label
When splitting output, a sequence number will always be added.
if %S is included, you can specify where the number occurs. Without it, the number will be added to the end of the string.
%S ... Sequence Number
The following example stores all files with the same name as the document in the directory /home/freecad (please remove quotes):
&quot;/home/cnc/%d.g-code&quot;
See the file save policy below on how to deal with name conflicts.</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QToolButton" name="postProcessorSetOutputFile">
<property name="text">
<string notr="true">…</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>Processor</string>
</property>
</widget>
</item>
<item row="1" column="1" colspan="2">
<widget class="QComboBox" name="postProcessor"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_11">
<property name="text">
<string>Arguments</string>
</property>
</widget>
</item>
<item row="2" column="1" colspan="2">
<widget class="QLineEdit" name="postProcessorArguments">
<property name="toolTip">
<string>Optional arguments passed to the post processor. The arguments are specific for each post processor, please see its documentation for details.</string>
</property>
</widget>
</item>
<item row="4" column="0" colspan="3">
<widget class="QGroupBox" name="groupBox_7">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Work Coordinate Systems</string>
</property>
<layout class="QFormLayout" name="formLayout_4">
<item row="2" column="1">
<widget class="QComboBox" name="orderBy">
<property name="toolTip">
<string>Ordering by Fixture, will cause all operations to be performed in the first coordinate system before switching to the second. Then all operations will be performed there in the same order.
This is useful if the operator can safely load work into one coordinate system while the machine is doing work in another.
Ordering by Tool, will minimize the Tool Changes. A tool change will be done, then all operations in all coordinate systems before changing tools.
Ordering by operation will do each operation in all coordinate systems before moving to the next operation. This is especially useful in conjunction with the 'split output' even with only a single work coordinate system since it will put each operation into a separate file.</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Systems</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Order by</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QListWidget" name="wcslist">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;Work Coordinate Systems&lt;/span&gt; also called &lt;span style=&quot; font-style:italic;&quot;&gt;Work Offsets&lt;/span&gt;, &lt;span style=&quot; font-style:italic;&quot;&gt;Fixture Offsets&lt;/span&gt;, or &lt;span style=&quot; font-style:italic;&quot;&gt;Fixtures &lt;/span&gt;are useful for building efficient production jobs where the same part is done many times on the machine.
FreeCAD has no knowledge of where a particular coordinate system exists within the machine coordinate system so adding additional coordinate systems to your job will have no visual change within your job. It will, however, change your G-code output. The exact way in which the output is affected is controlled by the 'order by' setting.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="resizeMode">
<enum>QListView::Adjust</enum>
</property>
<property name="spacing">
<number>0</number>
</property>
<property name="viewMode">
<enum>QListView::IconMode</enum>
</property>
<property name="modelColumn">
<number>0</number>
</property>
<property name="uniformItemSizes">
<bool>true</bool>
</property>
<item>
<property name="text">
<string notr="true">G54</string>
</property>
<property name="checkState">
<enum>Unchecked</enum>
</property>
</item>
<item>
<property name="text">
<string notr="true">G55</string>
</property>
<property name="checkState">
<enum>Unchecked</enum>
</property>
</item>
<item>
<property name="text">
<string notr="true">G56</string>
</property>
<property name="checkState">
<enum>Unchecked</enum>
</property>
</item>
<item>
<property name="text">
<string notr="true">G57</string>
</property>
<property name="checkState">
<enum>Unchecked</enum>
</property>
</item>
<item>
<property name="text">
<string notr="true">G58</string>
</property>
<property name="checkState">
<enum>Unchecked</enum>
</property>
</item>
<item>
<property name="text">
<string notr="true">G59</string>
</property>
<property name="checkState">
<enum>Unchecked</enum>
</property>
</item>
<item>
<property name="text">
<string notr="true">G59.1</string>
</property>
<property name="checkState">
<enum>Unchecked</enum>
</property>
</item>
<item>
<property name="text">
<string notr="true">G59.2</string>
</property>
<property name="checkState">
<enum>Unchecked</enum>
</property>
</item>
<item>
<property name="text">
<string notr="true">G59.3</string>
</property>
<property name="checkState">
<enum>Unchecked</enum>
</property>
</item>
<item>
<property name="text">
<string notr="true">G59.4</string>
</property>
<property name="checkState">
<enum>Unchecked</enum>
</property>
</item>
<item>
<property name="text">
<string notr="true">G59.5</string>
</property>
<property name="checkState">
<enum>Unchecked</enum>
</property>
</item>
<item>
<property name="text">
<string notr="true">G59.6</string>
</property>
<property name="checkState">
<enum>Unchecked</enum>
</property>
</item>
<item>
<property name="text">
<string notr="true">G59.7</string>
</property>
<property name="checkState">
<enum>Unchecked</enum>
</property>
</item>
<item>
<property name="text">
<string notr="true">G59.8</string>
</property>
<property name="checkState">
<enum>Unchecked</enum>
</property>
</item>
<item>
<property name="text">
<string notr="true">G59.9</string>
</property>
<property name="checkState">
<enum>Unchecked</enum>
</property>
</item>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="splitOutput">
<property name="toolTip">
<string>If multiple coordinate systems are in use, setting this to TRUE will cause the G-code to be written to multiple output files as controlled by the 'order by' property. For example, if ordering by fixture, the first output file will be for the first fixture and separate file for the second.</string>
</property>
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;If True, post processing will create multiple output files based on the &lt;span style=&quot; font-style:italic;&quot;&gt;order by&lt;/span&gt; setting.
For example, if &lt;span style=&quot; font-style:italic;&quot;&gt;order by&lt;/span&gt; is set to Tool, the first output file will contain the first tool change and all operations, in all coordinate systems, that can be done with that tool before the next tool change is called.
If &lt;span style=&quot; font-style:italic;&quot;&gt;order by&lt;/span&gt; is set to &lt;span style=&quot; font-style:italic;&quot;&gt;operation&lt;/span&gt; and &lt;span style=&quot; font-style:italic;&quot;&gt;split output&lt;/span&gt; is true, each operation will be written to a separate file.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Split Output</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="5" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>747</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabSetup">
<attribute name="title">
<string>Setup</string>
@@ -1215,6 +803,418 @@ Default: &quot;5mm&quot;</string>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabGeneral">
<attribute name="title">
<string>General</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_12">
<item>
<widget class="QToolBox" name="jobBox">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="page_5">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>707</width>
<height>648</height>
</rect>
</property>
<attribute name="label">
<string>Job</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_17">
<item>
<widget class="QGroupBox" name="groupBox_6">
<property name="title">
<string>Label</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_16">
<item>
<widget class="QLineEdit" name="jobLabel"/>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>Model</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_14">
<item>
<widget class="QListWidget" name="jobModel">
<property name="selectionMode">
<enum>QAbstractItemView::MultiSelection</enum>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>334</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="jobModelEdit">
<property name="text">
<string>Edit</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_5">
<property name="title">
<string>Description</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_15">
<item>
<widget class="QPlainTextEdit" name="jobDescription"/>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="templateExport">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>100</width>
<height>30</height>
</rect>
</property>
<attribute name="label">
<string>Template export</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_13"/>
</widget>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabOutput">
<attribute name="title">
<string>Output</string>
</attribute>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Output file</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="postProcessorOutputFile">
<property name="toolTip">
<string>Enter a path and optionally file name (see below) to be used as the default for the post processor export.
The following substitutions are performed before the name is resolved at the time of the post processing:
Substitution allows the following:
%D ... directory of the active document
%d ... name of the active document (with extension)
%M ... user macro directory
%j ... name of the active Job object
The Following can be used if output is being split. If Output is not split
these will be ignored.
%T ... Tool Number
%t ... Tool Controller label
%W ... Work Coordinate System
%O ... Operation Label
When splitting output, a sequence number will always be added.
if %S is included, you can specify where the number occurs. Without it, the number will be added to the end of the string.
%S ... Sequence Number
The following example stores all files with the same name as the document in the directory /home/freecad (please remove quotes):
&quot;/home/cnc/%d.g-code&quot;
See the file save policy below on how to deal with name conflicts.</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QToolButton" name="postProcessorSetOutputFile">
<property name="text">
<string notr="true">…</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>Processor</string>
</property>
</widget>
</item>
<item row="1" column="1" colspan="2">
<widget class="QComboBox" name="postProcessor"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_11">
<property name="text">
<string>Arguments</string>
</property>
</widget>
</item>
<item row="2" column="1" colspan="2">
<widget class="QLineEdit" name="postProcessorArguments">
<property name="toolTip">
<string>Optional arguments passed to the post processor. The arguments are specific for each post processor, please see its documentation for details.</string>
</property>
</widget>
</item>
<item row="4" column="0" colspan="3">
<widget class="QGroupBox" name="groupBox_7">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Work Coordinate Systems</string>
</property>
<layout class="QFormLayout" name="formLayout_4">
<item row="2" column="1">
<widget class="QComboBox" name="orderBy">
<property name="toolTip">
<string>Ordering by Fixture, will cause all operations to be performed in the first coordinate system before switching to the second. Then all operations will be performed there in the same order.
This is useful if the operator can safely load work into one coordinate system while the machine is doing work in another.
Ordering by Tool, will minimize the Tool Changes. A tool change will be done, then all operations in all coordinate systems before changing tools.
Ordering by operation will do each operation in all coordinate systems before moving to the next operation. This is especially useful in conjunction with the 'split output' even with only a single work coordinate system since it will put each operation into a separate file.</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Systems</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Order by</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QListWidget" name="wcslist">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;Work Coordinate Systems&lt;/span&gt; also called &lt;span style=&quot; font-style:italic;&quot;&gt;Work Offsets&lt;/span&gt;, &lt;span style=&quot; font-style:italic;&quot;&gt;Fixture Offsets&lt;/span&gt;, or &lt;span style=&quot; font-style:italic;&quot;&gt;Fixtures &lt;/span&gt;are useful for building efficient production jobs where the same part is done many times on the machine.
FreeCAD has no knowledge of where a particular coordinate system exists within the machine coordinate system so adding additional coordinate systems to your job will have no visual change within your job. It will, however, change your G-code output. The exact way in which the output is affected is controlled by the 'order by' setting.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="resizeMode">
<enum>QListView::Adjust</enum>
</property>
<property name="spacing">
<number>0</number>
</property>
<property name="viewMode">
<enum>QListView::IconMode</enum>
</property>
<property name="modelColumn">
<number>0</number>
</property>
<property name="uniformItemSizes">
<bool>true</bool>
</property>
<item>
<property name="text">
<string notr="true">G54</string>
</property>
<property name="checkState">
<enum>Unchecked</enum>
</property>
</item>
<item>
<property name="text">
<string notr="true">G55</string>
</property>
<property name="checkState">
<enum>Unchecked</enum>
</property>
</item>
<item>
<property name="text">
<string notr="true">G56</string>
</property>
<property name="checkState">
<enum>Unchecked</enum>
</property>
</item>
<item>
<property name="text">
<string notr="true">G57</string>
</property>
<property name="checkState">
<enum>Unchecked</enum>
</property>
</item>
<item>
<property name="text">
<string notr="true">G58</string>
</property>
<property name="checkState">
<enum>Unchecked</enum>
</property>
</item>
<item>
<property name="text">
<string notr="true">G59</string>
</property>
<property name="checkState">
<enum>Unchecked</enum>
</property>
</item>
<item>
<property name="text">
<string notr="true">G59.1</string>
</property>
<property name="checkState">
<enum>Unchecked</enum>
</property>
</item>
<item>
<property name="text">
<string notr="true">G59.2</string>
</property>
<property name="checkState">
<enum>Unchecked</enum>
</property>
</item>
<item>
<property name="text">
<string notr="true">G59.3</string>
</property>
<property name="checkState">
<enum>Unchecked</enum>
</property>
</item>
<item>
<property name="text">
<string notr="true">G59.4</string>
</property>
<property name="checkState">
<enum>Unchecked</enum>
</property>
</item>
<item>
<property name="text">
<string notr="true">G59.5</string>
</property>
<property name="checkState">
<enum>Unchecked</enum>
</property>
</item>
<item>
<property name="text">
<string notr="true">G59.6</string>
</property>
<property name="checkState">
<enum>Unchecked</enum>
</property>
</item>
<item>
<property name="text">
<string notr="true">G59.7</string>
</property>
<property name="checkState">
<enum>Unchecked</enum>
</property>
</item>
<item>
<property name="text">
<string notr="true">G59.8</string>
</property>
<property name="checkState">
<enum>Unchecked</enum>
</property>
</item>
<item>
<property name="text">
<string notr="true">G59.9</string>
</property>
<property name="checkState">
<enum>Unchecked</enum>
</property>
</item>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="splitOutput">
<property name="toolTip">
<string>If multiple coordinate systems are in use, setting this to TRUE will cause the G-code to be written to multiple output files as controlled by the 'order by' property. For example, if ordering by fixture, the first output file will be for the first fixture and separate file for the second.</string>
</property>
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;If True, post processing will create multiple output files based on the &lt;span style=&quot; font-style:italic;&quot;&gt;order by&lt;/span&gt; setting.
For example, if &lt;span style=&quot; font-style:italic;&quot;&gt;order by&lt;/span&gt; is set to Tool, the first output file will contain the first tool change and all operations, in all coordinate systems, that can be done with that tool before the next tool change is called.
If &lt;span style=&quot; font-style:italic;&quot;&gt;order by&lt;/span&gt; is set to &lt;span style=&quot; font-style:italic;&quot;&gt;operation&lt;/span&gt; and &lt;span style=&quot; font-style:italic;&quot;&gt;split output&lt;/span&gt; is true, each operation will be written to a separate file.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Split Output</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="5" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>747</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabTools">
<attribute name="title">
<string>Tools</string>

View File

@@ -1627,11 +1627,11 @@ class TaskPanel:
self.updateSelection()
# set active page
if activate in ["General", "Model"]:
self.form.setCurrentIndex(0)
if activate in ["Output", "Post Processor"]:
self.form.setCurrentIndex(1)
if activate in ["Layout", "Stock"]:
self.form.setCurrentIndex(0)
if activate in ["General", "Model"]:
self.form.setCurrentIndex(1)
if activate in ["Output", "Post Processor"]:
self.form.setCurrentIndex(2)
if activate in ["Tools", "Tool Controller"]:
self.form.setCurrentIndex(3)
@@ -1670,7 +1670,7 @@ class TaskPanel:
# Check if at least on base model is present
if len(self.obj.Model.Group) == 0:
self.form.setCurrentIndex(0) # Change tab to General tab
self.form.setCurrentIndex(1) # Change tab to General tab
no_model_txt = translate("CAM_Job", "This job has no base model.")
if _displayWarningWindow(no_model_txt) == 1:
self.jobModelEdit()