diff --git a/.gitignore b/.gitignore
index ab656b6738..7cb7c65ab6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,6 +8,8 @@
*.exp
*.dep
*.manifest
+*.o
+*.orig
qrc_*.cpp
BuildLog.htm
cmake_install.cmake
diff --git a/src/Mod/Path/Gui/Resources/panels/PathEdit.ui b/src/Mod/Path/Gui/Resources/panels/PathEdit.ui
index 44eaed9f63..6159a4239c 100644
--- a/src/Mod/Path/Gui/Resources/panels/PathEdit.ui
+++ b/src/Mod/Path/Gui/Resources/panels/PathEdit.ui
@@ -31,8 +31,8 @@
0
0
- 458
- 1186
+ 456
+ 1203
@@ -112,8 +112,8 @@
0
0
- 100
- 30
+ 96
+ 26
@@ -144,6 +144,26 @@
+ -
+
+
+ <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>
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 747
+
+
+
+
-
@@ -168,25 +188,186 @@
- -
-
-
- <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>
+
-
+
+
+ Split Output
- -
-
-
- Qt::Vertical
+
-
+
+
+ Work Coordinate Systems
-
-
- 20
- 747
-
-
-
+
+ -
+
+
-
+
+ Operation
+
+
+ -
+
+ Work Coordinate System
+
+
+ -
+
+ Tool
+
+
+
+
+ -
+
+
+ Systems
+
+
+
+ -
+
+
+ Order By
+
+
+
+ -
+
+
-
+
+ G53
+
+
+ Unchecked
+
+
+ -
+
+ G54
+
+
+ Checked
+
+
+ -
+
+ G55
+
+
+ Unchecked
+
+
+ -
+
+ G56
+
+
+ Unchecked
+
+
+ -
+
+ G57
+
+
+ Unchecked
+
+
+ -
+
+ G58
+
+
+ Unchecked
+
+
+ -
+
+ G59
+
+
+ Unchecked
+
+
+ -
+
+ G59.1
+
+
+ Unchecked
+
+
+ -
+
+ G59.2
+
+
+ Unchecked
+
+
+ -
+
+ G59.3
+
+
+ Unchecked
+
+
+ -
+
+ G59.4
+
+
+ Unchecked
+
+
+ -
+
+ G59.5
+
+
+ Unchecked
+
+
+ -
+
+ G59.6
+
+
+ Unchecked
+
+
+ -
+
+ G59.7
+
+
+ Unchecked
+
+
+ -
+
+ G59.8
+
+
+ Unchecked
+
+
+ -
+
+ G59.9
+
+
+ Unchecked
+
+
+
+
+
+
@@ -205,8 +386,8 @@
0
0
- 458
- 1186
+ 356
+ 893
@@ -760,8 +941,8 @@
0
0
- 458
- 1186
+ 244
+ 256
@@ -924,8 +1105,8 @@
0
0
- 458
- 1186
+ 325
+ 180
@@ -962,8 +1143,7 @@
-
-
+ ../../../../../../../../.designer/backup../../../../../../../../.designer/backup
@@ -972,8 +1152,7 @@
-
-
+ ../../../../../../../../.designer/backup../../../../../../../../.designer/backup
@@ -1026,8 +1205,8 @@
0
0
- 244
- 145
+ 168
+ 112
@@ -1253,8 +1432,8 @@
Gui::QuantitySpinBox
- QDoubleSpinBox
-
+ QWidget
+
diff --git a/src/Mod/Path/PathScripts/PathJob.py b/src/Mod/Path/PathScripts/PathJob.py
index b73e8a44ae..b4b9f98246 100644
--- a/src/Mod/Path/PathScripts/PathJob.py
+++ b/src/Mod/Path/PathScripts/PathJob.py
@@ -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()
diff --git a/src/Mod/Path/PathScripts/PathPost.py b/src/Mod/Path/PathScripts/PathPost.py
index 0976ad2d64..71ed227f7a 100644
--- a/src/Mod/Path/PathScripts/PathPost.py
+++ b/src/Mod/Path/PathScripts/PathPost.py
@@ -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 = ''