Path: UI changes to job edit
.gitignore More UI work checkpoint
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -8,6 +8,8 @@
|
||||
*.exp
|
||||
*.dep
|
||||
*.manifest
|
||||
*.o
|
||||
*.orig
|
||||
qrc_*.cpp
|
||||
BuildLog.htm
|
||||
cmake_install.cmake
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>458</width>
|
||||
<height>1186</height>
|
||||
<width>456</width>
|
||||
<height>1203</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="label">
|
||||
@@ -112,8 +112,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>100</width>
|
||||
<height>30</height>
|
||||
<width>96</width>
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="label">
|
||||
@@ -144,6 +144,26 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="2">
|
||||
<widget class="QLineEdit" name="postProcessorArguments">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Optional arguments passed to the Post Processor. The arguments are specific for each Post Processor, please see it's documentation for details.</p></body></html></string>
|
||||
</property>
|
||||
</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>
|
||||
<item row="0" column="2">
|
||||
<widget class="QToolButton" name="postProcessorSetOutputFile">
|
||||
<property name="text">
|
||||
@@ -168,25 +188,186 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="2">
|
||||
<widget class="QLineEdit" name="postProcessorArguments">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Optional arguments passed to the Post Processor. The arguments are specific for each Post Processor, please see it's documentation for details.</p></body></html></string>
|
||||
<item row="3" column="1">
|
||||
<widget class="QCheckBox" name="checkBox">
|
||||
<property name="text">
|
||||
<string>Split Output</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
<item row="4" column="0" colspan="3">
|
||||
<widget class="QGroupBox" name="groupBox_7">
|
||||
<property name="title">
|
||||
<string>Work Coordinate Systems</string>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>747</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
<layout class="QFormLayout" name="formLayout_4">
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="orderBy">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Operation</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Work Coordinate System</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Tool</string>
|
||||
</property>
|
||||
</item>
|
||||
</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">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>G53</string>
|
||||
</property>
|
||||
<property name="checkState">
|
||||
<enum>Unchecked</enum>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>G54</string>
|
||||
</property>
|
||||
<property name="checkState">
|
||||
<enum>Checked</enum>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>G55</string>
|
||||
</property>
|
||||
<property name="checkState">
|
||||
<enum>Unchecked</enum>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>G56</string>
|
||||
</property>
|
||||
<property name="checkState">
|
||||
<enum>Unchecked</enum>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>G57</string>
|
||||
</property>
|
||||
<property name="checkState">
|
||||
<enum>Unchecked</enum>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>G58</string>
|
||||
</property>
|
||||
<property name="checkState">
|
||||
<enum>Unchecked</enum>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>G59</string>
|
||||
</property>
|
||||
<property name="checkState">
|
||||
<enum>Unchecked</enum>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>G59.1</string>
|
||||
</property>
|
||||
<property name="checkState">
|
||||
<enum>Unchecked</enum>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>G59.2</string>
|
||||
</property>
|
||||
<property name="checkState">
|
||||
<enum>Unchecked</enum>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>G59.3</string>
|
||||
</property>
|
||||
<property name="checkState">
|
||||
<enum>Unchecked</enum>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>G59.4</string>
|
||||
</property>
|
||||
<property name="checkState">
|
||||
<enum>Unchecked</enum>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>G59.5</string>
|
||||
</property>
|
||||
<property name="checkState">
|
||||
<enum>Unchecked</enum>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>G59.6</string>
|
||||
</property>
|
||||
<property name="checkState">
|
||||
<enum>Unchecked</enum>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>G59.7</string>
|
||||
</property>
|
||||
<property name="checkState">
|
||||
<enum>Unchecked</enum>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>G59.8</string>
|
||||
</property>
|
||||
<property name="checkState">
|
||||
<enum>Unchecked</enum>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>G59.9</string>
|
||||
</property>
|
||||
<property name="checkState">
|
||||
<enum>Unchecked</enum>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@@ -205,8 +386,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>458</width>
|
||||
<height>1186</height>
|
||||
<width>356</width>
|
||||
<height>893</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="label">
|
||||
@@ -760,8 +941,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>458</width>
|
||||
<height>1186</height>
|
||||
<width>244</width>
|
||||
<height>256</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="label">
|
||||
@@ -924,8 +1105,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>458</width>
|
||||
<height>1186</height>
|
||||
<width>325</width>
|
||||
<height>180</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="label">
|
||||
@@ -962,8 +1143,7 @@
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="object-flip-horizontal">
|
||||
<normaloff/>
|
||||
</iconset>
|
||||
<normaloff>../../../../../../../../.designer/backup</normaloff>../../../../../../../../.designer/backup</iconset>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
@@ -972,8 +1152,7 @@
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="object-flip-vertical">
|
||||
<normaloff/>
|
||||
</iconset>
|
||||
<normaloff>../../../../../../../../.designer/backup</normaloff>../../../../../../../../.designer/backup</iconset>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
@@ -1026,8 +1205,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>244</width>
|
||||
<height>145</height>
|
||||
<width>168</width>
|
||||
<height>112</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="label">
|
||||
@@ -1253,8 +1432,8 @@
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Gui::QuantitySpinBox</class>
|
||||
<extends>QDoubleSpinBox</extends>
|
||||
<header>gui_quantityspinbox.h</header>
|
||||
<extends>QWidget</extends>
|
||||
<header>Gui/QuantitySpinBox.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
|
||||
@@ -103,6 +103,12 @@ class ObjectJob:
|
||||
obj.addProperty("App::PropertyLink", "Operations", "Base", QtCore.QT_TRANSLATE_NOOP("PathJob", "Compound path of all operations in the order they are processed."))
|
||||
obj.addProperty("App::PropertyLinkList", "ToolController", "Base", QtCore.QT_TRANSLATE_NOOP("PathJob", "Collection of tool controllers available for this job."))
|
||||
|
||||
obj.addProperty("App::PropertyBool", "SplitOutput", "Output", QtCore.QT_TRANSLATE_NOOP("PathJob","Split output into multiple gcode files"))
|
||||
obj.addProperty("App::PropertyEnumeration", "OrderOutputBy", "WCS", QtCore.QT_TRANSLATE_NOOP("PathJob", "If multiple WCS, order the output this way"))
|
||||
obj.addProperty("App::PropertyStringList", "Fixtures", "WCS", QtCore.QT_TRANSLATE_NOOP("PathJob", "The Work Coordinate Systems for the Job"))
|
||||
obj.OrderOutputBy = ['Fixture', 'Tool', 'Operation']
|
||||
obj.Fixtures = ['G54']
|
||||
|
||||
obj.PostProcessorOutputFile = PathPreferences.defaultOutputFile()
|
||||
#obj.setEditorMode("PostProcessorOutputFile", 0) # set to default mode
|
||||
obj.PostProcessor = postProcessors = PathPreferences.allEnabledPostProcessors()
|
||||
|
||||
@@ -27,10 +27,11 @@ from __future__ import print_function
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
import Path
|
||||
import PathScripts.PathJob as PathJob
|
||||
import PathScripts.PathLog as PathLog
|
||||
import PathScripts.PathPreferences as PathPreferences
|
||||
import PathScripts.PathToolController as PathToolController
|
||||
#import PathScripts.PathToolController as PathToolController
|
||||
import PathScripts.PathUtil as PathUtil
|
||||
import PathScripts.PathUtils as PathUtils
|
||||
import os
|
||||
@@ -244,16 +245,41 @@ class CommandPathPost:
|
||||
|
||||
# Build up an ordered list of operations and tool changes.
|
||||
# Then post-the ordered list
|
||||
if hasattr(job, "Fixtures"):
|
||||
wcslist = job.Fixtures
|
||||
else:
|
||||
wcslist = ['G54']
|
||||
PathLog.debug("processing fixtures: {}".format(wcslist))
|
||||
|
||||
if hasattr(job, "OrderOutputBy"):
|
||||
orderby = job.OrderOutputBy
|
||||
else:
|
||||
orderby = "Operation"
|
||||
PathLog.debug("Order Output by: {}".format(orderby))
|
||||
|
||||
if hasattr(job, "SplitOutput"):
|
||||
split = job.SplitOutput
|
||||
else:
|
||||
split = False
|
||||
PathLog.debug("Splitting Output: {}".format(split))
|
||||
|
||||
postlist = []
|
||||
currTool = None
|
||||
for obj in job.Operations.Group:
|
||||
PathLog.debug("obj: {}".format(obj.Name))
|
||||
tc = PathUtil.toolControllerForOp(obj)
|
||||
if tc is not None:
|
||||
if tc.ToolNumber != currTool:
|
||||
postlist.append(tc)
|
||||
currTool = tc.ToolNumber
|
||||
postlist.append(obj)
|
||||
|
||||
if orderby == 'Fixture':
|
||||
for f in wcslist:
|
||||
c1 = Path.Command(f)
|
||||
c2 = Path.Command("G0 Z" + str(job.Stock.Shape.BoundBox.ZMax))
|
||||
postlist.append(Path.Path([c1, c2]))
|
||||
|
||||
currTool = None
|
||||
for obj in job.Operations.Group:
|
||||
PathLog.debug("obj: {}".format(obj.Name))
|
||||
tc = PathUtil.toolControllerForOp(obj)
|
||||
if tc is not None:
|
||||
if tc.ToolNumber != currTool:
|
||||
postlist.append(tc)
|
||||
currTool = tc.ToolNumber
|
||||
postlist.append(obj)
|
||||
|
||||
fail = True
|
||||
rc = ''
|
||||
|
||||
Reference in New Issue
Block a user