From 101edb33f5f1c7707a7c488a78c2ab58ba51567a Mon Sep 17 00:00:00 2001 From: Daniel Wood Date: Sun, 1 Mar 2020 16:46:29 +0000 Subject: [PATCH] Only post tools for active operations Only post tools and tool changes for active operations. --- src/Mod/Path/PathScripts/PathPost.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Mod/Path/PathScripts/PathPost.py b/src/Mod/Path/PathScripts/PathPost.py index 9799a2d201..4a7cf1da5e 100644 --- a/src/Mod/Path/PathScripts/PathPost.py +++ b/src/Mod/Path/PathScripts/PathPost.py @@ -299,7 +299,7 @@ class CommandPathPost: # Now generate the gcode for obj in job.Operations.Group: tc = PathUtil.toolControllerForOp(obj) - if tc is not None: + if tc is not None and obj.Active: if tc.ToolNumber != currTool: sublist.append(tc) PathLog.debug("Appending TC: {}".format(tc.Name)) @@ -330,13 +330,13 @@ class CommandPathPost: for idx, obj in enumerate(job.Operations.Group): tc = PathUtil.toolControllerForOp(obj) - if tc is None or tc.ToolNumber == currTool: + if tc is None or tc.ToolNumber == currTool or not obj.Active: curlist.append(obj) - elif tc.ToolNumber != currTool and currTool is None: # first TC + elif tc.ToolNumber != currTool and currTool is None and obj.Active: # first TC sublist.append(tc) curlist.append(obj) currTool = tc.ToolNumber - elif tc.ToolNumber != currTool and currTool is not None: # TC + elif tc.ToolNumber != currTool and currTool is not None and obj.Active: # TC for fixture in fixturelist: sublist.append(fixture) sublist.extend(curlist) @@ -373,7 +373,7 @@ class CommandPathPost: for fixture in fixturelist: sublist.append(fixture) tc = PathUtil.toolControllerForOp(obj) - if tc is not None: + if tc is not None and obj.Active: if tc.ToolNumber != currTool: sublist.append(tc) currTool = tc.ToolNumber