From 8a950055869ad083f653252fc160ef6fc7a4c0b4 Mon Sep 17 00:00:00 2001 From: Markus Lampert Date: Mon, 28 Dec 2020 16:09:14 -0800 Subject: [PATCH 1/5] Added ToolTable to job and convert old ToolController property on the fly. --- src/Mod/Path/PathScripts/PathJob.py | 30 ++++++++++++++++++++------ src/Mod/Path/PathScripts/PathJobGui.py | 8 ++++--- 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/src/Mod/Path/PathScripts/PathJob.py b/src/Mod/Path/PathScripts/PathJob.py index d68b24cdcb..f2d41ec205 100644 --- a/src/Mod/Path/PathScripts/PathJob.py +++ b/src/Mod/Path/PathScripts/PathJob.py @@ -58,6 +58,7 @@ class JobTemplate: PostProcessorOutputFile = 'Output' SetupSheet = 'SetupSheet' Stock = 'Stock' + # TCs are grouped under ToolTable in a job, the template refers to them directly though ToolController = 'ToolController' Version = 'Version' @@ -120,7 +121,7 @@ class ObjectJob: obj.addProperty("App::PropertyLink", "Stock", "Base", QtCore.QT_TRANSLATE_NOOP("PathJob", "Solid object to be used as stock.")) 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::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")) @@ -150,6 +151,7 @@ class ObjectJob: self.setupSetupSheet(obj) self.setupBaseModel(obj, models) + self.setupToolTable(obj) self.tooltip = None self.tooltipArgs = None @@ -191,6 +193,18 @@ class ObjectJob: obj.Base = None obj.removeProperty('Base') + def setupToolTable(self, obj): + if not hasattr(obj, 'ToolTable'): + obj.addProperty("App::PropertyLink", "ToolTable", "Base", QtCore.QT_TRANSLATE_NOOP("PathJob", "Collection of all tool controllers for the job")) + toolTable = FreeCAD.ActiveDocument.addObject("App::DocumentObjectGroup", "ToolTable") + toolTable.Label = 'ToolTable' + if toolTable.ViewObject: + toolTable.ViewObject.Visibility = False + if hasattr(obj, 'ToolController'): + toolTable.addObjects(obj.ToolController) + obj.removeProperty('ToolController') + obj.ToolTable = toolTable + def removeBase(self, obj, base, removeFromModel): if isResourceClone(obj, base, None): PathUtil.clearExpressionEngine(base) @@ -234,14 +248,16 @@ class ObjectJob: # Tool controllers might refer to either legacy tool or toolbit PathLog.debug('taking down tool controller') - for tc in obj.ToolController: + for tc in obj.ToolTable.Group: if hasattr(tc.Tool, "Proxy"): PathUtil.clearExpressionEngine(tc.Tool) doc.removeObject(tc.Tool.Name) PathUtil.clearExpressionEngine(tc) tc.Proxy.onDelete(tc) doc.removeObject(tc.Name) - obj.ToolController = [] + obj.ToolTable = [] + doc.removeObject(obj.ToolTable.Name) + obj.ToolTable = None # SetupSheet PathUtil.clearExpressionEngine(obj.SetupSheet) @@ -268,6 +284,7 @@ class ObjectJob: self.setupBaseModel(obj) self.fixupOperations(obj) self.setupSetupSheet(obj) + self.setupToolTable(obj) obj.setEditorMode('Operations', 2) # hide obj.setEditorMode('Placement', 2) @@ -334,7 +351,7 @@ class ObjectJob: obj.Stock = PathStock.CreateFromTemplate(obj, attrs.get(JobTemplate.Stock)) PathLog.debug("setting tool controllers (%d)" % len(tcs)) - obj.ToolController = tcs + obj.ToolTable.Group = tcs else: PathLog.error(translate('PathJob', "Unsupported PathJob template version %s") % attrs.get(JobTemplate.Version)) if not tcs: @@ -414,13 +431,12 @@ class ObjectJob: op.Path.Center = self.obj.Operations.Path.Center def addToolController(self, tc): - group = self.obj.ToolController + group = self.obj.ToolTable.Group PathLog.debug("addToolController(%s): %s" % (tc.Label, [t.Label for t in group])) if tc.Name not in [str(t.Name) for t in group]: tc.setExpression('VertRapid', "%s.%s" % (self.setupSheet.expressionReference(), PathSetupSheet.Template.VertRapid)) tc.setExpression('HorizRapid', "%s.%s" % (self.setupSheet.expressionReference(), PathSetupSheet.Template.HorizRapid)) - group.append(tc) - self.obj.ToolController = group + self.obj.ToolTable.addObject(tc) Notification.updateTC.emit(self.obj, tc) def allOperations(self): diff --git a/src/Mod/Path/PathScripts/PathJobGui.py b/src/Mod/Path/PathScripts/PathJobGui.py index a85c437fdf..cbdb125ea7 100644 --- a/src/Mod/Path/PathScripts/PathJobGui.py +++ b/src/Mod/Path/PathScripts/PathJobGui.py @@ -210,7 +210,7 @@ class ViewProvider: return ":/icons/Path_Job.svg" def claimChildren(self): - children = self.obj.ToolController + children = [] children.append(self.obj.Operations) if hasattr(self.obj, 'Model'): # unfortunately this function is called before the object has been fully loaded @@ -222,6 +222,8 @@ class ViewProvider: if hasattr(self.obj, 'SetupSheet'): # when loading a job that didn't have a setup sheet they might not've been created yet children.append(self.obj.SetupSheet) + if hasattr(self.obj, 'ToolTable'): + children.append(self.obj.ToolTable) return children def onDelete(self, vobj, arg2=None): @@ -707,7 +709,7 @@ class TaskPanel: vUnit = FreeCAD.Units.Quantity(1, FreeCAD.Units.Velocity).getUserPreferred()[2] - for row, tc in enumerate(sorted(self.obj.ToolController, key=lambda tc: tc.Label)): + for row, tc in enumerate(sorted(self.obj.ToolTable.Group, key=lambda tc: tc.Label)): self.form.activeToolController.addItem(tc.Label, tc) if tc == select: index = row @@ -847,7 +849,7 @@ class TaskPanel: # can only delete what is selected delete = edit # ... but we want to make sure there's at least one TC left - if len(self.obj.ToolController) == len(self.form.toolControllerList.selectedItems()): + if len(self.obj.ToolTable.Group) == len(self.form.toolControllerList.selectedItems()): delete = False # ... also don't want to delete any TCs that are already used if delete: From 121152deb954ef6aa296dad11a8770c6d2ae62de Mon Sep 17 00:00:00 2001 From: Markus Lampert Date: Mon, 28 Dec 2020 17:13:10 -0800 Subject: [PATCH 2/5] Use job.ToolTable.Group instead of job.ToolController. --- src/Mod/Path/PathScripts/PathJobCmd.py | 2 +- src/Mod/Path/PathScripts/PathJobDlg.py | 2 +- src/Mod/Path/PathScripts/PathSanity.py | 2 +- src/Mod/Path/PathScripts/PathToolControllerGui.py | 4 ++-- src/Mod/Path/PathScripts/PathUtils.py | 2 +- src/Mod/Path/PathTests/TestPathHelix.py | 6 +++--- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Mod/Path/PathScripts/PathJobCmd.py b/src/Mod/Path/PathScripts/PathJobCmd.py index 9b600dc32b..b452304d79 100644 --- a/src/Mod/Path/PathScripts/PathJobCmd.py +++ b/src/Mod/Path/PathScripts/PathJobCmd.py @@ -146,7 +146,7 @@ class CommandJobTemplateExport: attrs.pop(PathJob.JobTemplate.PostProcessorOutputFile, None) # tool controller settings - toolControllers = dialog.includeToolControllers() if dialog else job.ToolController + toolControllers = dialog.includeToolControllers() if dialog else job.ToolTable.Group if toolControllers: tcAttrs = [tc.Proxy.templateAttrs(tc) for tc in toolControllers] attrs[PathJob.JobTemplate.ToolController] = tcAttrs diff --git a/src/Mod/Path/PathScripts/PathJobDlg.py b/src/Mod/Path/PathScripts/PathJobDlg.py index a28466eb3c..e54a990e8f 100644 --- a/src/Mod/Path/PathScripts/PathJobDlg.py +++ b/src/Mod/Path/PathScripts/PathJobDlg.py @@ -338,7 +338,7 @@ class JobTemplateExport: self.dialog.settingsOpsList.addItem(item) self.dialog.toolsList.clear() - for tc in sorted(job.ToolController, key=lambda o: o.Label): + for tc in sorted(job.ToolTable.Group, key=lambda o: o.Label): item = QtGui.QListWidgetItem(tc.Label) item.setData(self.DataObject, tc) item.setCheckState(QtCore.Qt.CheckState.Checked) diff --git a/src/Mod/Path/PathScripts/PathSanity.py b/src/Mod/Path/PathScripts/PathSanity.py index 09664be146..1207891168 100644 --- a/src/Mod/Path/PathScripts/PathSanity.py +++ b/src/Mod/Path/PathScripts/PathSanity.py @@ -517,7 +517,7 @@ class CommandPathSanity: data = {} try: - for TC in obj.ToolController: + for TC in obj.ToolTable.Group: if not hasattr(TC.Tool, 'BitBody'): self.squawk("PathSanity", "Tool number {} is a legacy tool. Legacy tools not \ diff --git a/src/Mod/Path/PathScripts/PathToolControllerGui.py b/src/Mod/Path/PathScripts/PathToolControllerGui.py index 62709086e0..8f72838df9 100644 --- a/src/Mod/Path/PathScripts/PathToolControllerGui.py +++ b/src/Mod/Path/PathScripts/PathToolControllerGui.py @@ -165,12 +165,12 @@ class CommandPathToolController(object): tool = PathToolBitGui.ToolBitSelector().getTool() if tool: toolNr = None - for tc in job.ToolController: + for tc in job.ToolTable.Group: if tc.Tool == tool: toolNr = tc.ToolNumber break if not toolNr: - toolNr = max([tc.ToolNumber for tc in job.ToolController]) + 1 + toolNr = max([tc.ToolNumber for tc in job.ToolTable.Group]) + 1 tc = Create("TC: {}".format(tool.Label), tool, toolNr) job.Proxy.addToolController(tc) FreeCAD.ActiveDocument.recompute() diff --git a/src/Mod/Path/PathScripts/PathUtils.py b/src/Mod/Path/PathScripts/PathUtils.py index 5bc5011756..1b8aba0950 100644 --- a/src/Mod/Path/PathScripts/PathUtils.py +++ b/src/Mod/Path/PathScripts/PathUtils.py @@ -403,7 +403,7 @@ def getToolControllers(obj, proxy=None): PathLog.debug("op={} ({})".format(obj.Label, type(obj))) if job: - return [c for c in job.ToolController if proxy.isToolSupported(obj, c.Tool)] + return [tc for tc in job.ToolTable.Group if proxy.isToolSupported(obj, tc.Tool)] return [] diff --git a/src/Mod/Path/PathTests/TestPathHelix.py b/src/Mod/Path/PathTests/TestPathHelix.py index 0fb76c9f1a..28dc4b7d18 100644 --- a/src/Mod/Path/PathTests/TestPathHelix.py +++ b/src/Mod/Path/PathTests/TestPathHelix.py @@ -62,7 +62,7 @@ class TestPathHelix(PathTestUtils.PathTestBase): def test02(self): '''Verify Helix generates proper holes for rotated model''' - self.job.ToolController[0].Tool.Diameter = 0.5 + self.job.ToolTable.Group[0].Tool.Diameter = 0.5 op = PathHelix.Create('Helix') proxy = op.Proxy @@ -87,7 +87,7 @@ class TestPathHelix(PathTestUtils.PathTestBase): self.doc.Body.Placement.Rotation = FreeCAD.Rotation(deg, 0, 0) self.job = PathJob.Create('Job', [self.doc.Body]) - self.job.ToolController[0].Tool.Diameter = 0.5 + self.job.ToolTable.Group[0].Tool.Diameter = 0.5 op = PathHelix.Create('Helix') proxy = op.Proxy @@ -109,7 +109,7 @@ class TestPathHelix(PathTestUtils.PathTestBase): self.clone.Placement.Rotation = FreeCAD.Rotation(deg, 0, 0) self.job = PathJob.Create('Job', [self.clone]) - self.job.ToolController[0].Tool.Diameter = 0.5 + self.job.ToolTable.Group[0].Tool.Diameter = 0.5 op = PathHelix.Create('Helix') proxy = op.Proxy From b92660086b6e83e9f1b7813cde62a9a6b618331c Mon Sep 17 00:00:00 2001 From: Markus Lampert Date: Mon, 28 Dec 2020 17:16:31 -0800 Subject: [PATCH 3/5] Fixed job deletion. --- src/Mod/Path/PathScripts/PathJob.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Path/PathScripts/PathJob.py b/src/Mod/Path/PathScripts/PathJob.py index f2d41ec205..eadf2884cc 100644 --- a/src/Mod/Path/PathScripts/PathJob.py +++ b/src/Mod/Path/PathScripts/PathJob.py @@ -255,7 +255,7 @@ class ObjectJob: PathUtil.clearExpressionEngine(tc) tc.Proxy.onDelete(tc) doc.removeObject(tc.Name) - obj.ToolTable = [] + obj.ToolTable.Group = [] doc.removeObject(obj.ToolTable.Name) obj.ToolTable = None From 8e6f964e0d1fa341b633b8ab2a6fabb694ab7782 Mon Sep 17 00:00:00 2001 From: Markus Lampert Date: Thu, 31 Dec 2020 18:40:23 -0800 Subject: [PATCH 4/5] Renamed ToolTable group to Tools in order to (not) set expectations. --- src/Mod/Path/PathScripts/PathJob.py | 26 +++++++++---------- src/Mod/Path/PathScripts/PathJobCmd.py | 2 +- src/Mod/Path/PathScripts/PathJobDlg.py | 2 +- src/Mod/Path/PathScripts/PathJobGui.py | 8 +++--- src/Mod/Path/PathScripts/PathSanity.py | 2 +- .../Path/PathScripts/PathToolControllerGui.py | 4 +-- src/Mod/Path/PathScripts/PathUtils.py | 2 +- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/Mod/Path/PathScripts/PathJob.py b/src/Mod/Path/PathScripts/PathJob.py index eadf2884cc..a6c027b722 100644 --- a/src/Mod/Path/PathScripts/PathJob.py +++ b/src/Mod/Path/PathScripts/PathJob.py @@ -58,7 +58,7 @@ class JobTemplate: PostProcessorOutputFile = 'Output' SetupSheet = 'SetupSheet' Stock = 'Stock' - # TCs are grouped under ToolTable in a job, the template refers to them directly though + # TCs are grouped under Tools in a job, the template refers to them directly though ToolController = 'ToolController' Version = 'Version' @@ -194,16 +194,16 @@ class ObjectJob: obj.removeProperty('Base') def setupToolTable(self, obj): - if not hasattr(obj, 'ToolTable'): - obj.addProperty("App::PropertyLink", "ToolTable", "Base", QtCore.QT_TRANSLATE_NOOP("PathJob", "Collection of all tool controllers for the job")) - toolTable = FreeCAD.ActiveDocument.addObject("App::DocumentObjectGroup", "ToolTable") - toolTable.Label = 'ToolTable' + if not hasattr(obj, 'Tools'): + obj.addProperty("App::PropertyLink", "Tools", "Base", QtCore.QT_TRANSLATE_NOOP("PathJob", "Collection of all tool controllers for the job")) + toolTable = FreeCAD.ActiveDocument.addObject("App::DocumentObjectGroup", "Tools") + toolTable.Label = 'Tools' if toolTable.ViewObject: toolTable.ViewObject.Visibility = False if hasattr(obj, 'ToolController'): toolTable.addObjects(obj.ToolController) obj.removeProperty('ToolController') - obj.ToolTable = toolTable + obj.Tools = toolTable def removeBase(self, obj, base, removeFromModel): if isResourceClone(obj, base, None): @@ -248,16 +248,16 @@ class ObjectJob: # Tool controllers might refer to either legacy tool or toolbit PathLog.debug('taking down tool controller') - for tc in obj.ToolTable.Group: + for tc in obj.Tools.Group: if hasattr(tc.Tool, "Proxy"): PathUtil.clearExpressionEngine(tc.Tool) doc.removeObject(tc.Tool.Name) PathUtil.clearExpressionEngine(tc) tc.Proxy.onDelete(tc) doc.removeObject(tc.Name) - obj.ToolTable.Group = [] - doc.removeObject(obj.ToolTable.Name) - obj.ToolTable = None + obj.Tools.Group = [] + doc.removeObject(obj.Tools.Name) + obj.Tools = None # SetupSheet PathUtil.clearExpressionEngine(obj.SetupSheet) @@ -351,7 +351,7 @@ class ObjectJob: obj.Stock = PathStock.CreateFromTemplate(obj, attrs.get(JobTemplate.Stock)) PathLog.debug("setting tool controllers (%d)" % len(tcs)) - obj.ToolTable.Group = tcs + obj.Tools.Group = tcs else: PathLog.error(translate('PathJob', "Unsupported PathJob template version %s") % attrs.get(JobTemplate.Version)) if not tcs: @@ -431,12 +431,12 @@ class ObjectJob: op.Path.Center = self.obj.Operations.Path.Center def addToolController(self, tc): - group = self.obj.ToolTable.Group + group = self.obj.Tools.Group PathLog.debug("addToolController(%s): %s" % (tc.Label, [t.Label for t in group])) if tc.Name not in [str(t.Name) for t in group]: tc.setExpression('VertRapid', "%s.%s" % (self.setupSheet.expressionReference(), PathSetupSheet.Template.VertRapid)) tc.setExpression('HorizRapid', "%s.%s" % (self.setupSheet.expressionReference(), PathSetupSheet.Template.HorizRapid)) - self.obj.ToolTable.addObject(tc) + self.obj.Tools.addObject(tc) Notification.updateTC.emit(self.obj, tc) def allOperations(self): diff --git a/src/Mod/Path/PathScripts/PathJobCmd.py b/src/Mod/Path/PathScripts/PathJobCmd.py index b452304d79..a3b26ac128 100644 --- a/src/Mod/Path/PathScripts/PathJobCmd.py +++ b/src/Mod/Path/PathScripts/PathJobCmd.py @@ -146,7 +146,7 @@ class CommandJobTemplateExport: attrs.pop(PathJob.JobTemplate.PostProcessorOutputFile, None) # tool controller settings - toolControllers = dialog.includeToolControllers() if dialog else job.ToolTable.Group + toolControllers = dialog.includeToolControllers() if dialog else job.Tools.Group if toolControllers: tcAttrs = [tc.Proxy.templateAttrs(tc) for tc in toolControllers] attrs[PathJob.JobTemplate.ToolController] = tcAttrs diff --git a/src/Mod/Path/PathScripts/PathJobDlg.py b/src/Mod/Path/PathScripts/PathJobDlg.py index e54a990e8f..c7e98edda5 100644 --- a/src/Mod/Path/PathScripts/PathJobDlg.py +++ b/src/Mod/Path/PathScripts/PathJobDlg.py @@ -338,7 +338,7 @@ class JobTemplateExport: self.dialog.settingsOpsList.addItem(item) self.dialog.toolsList.clear() - for tc in sorted(job.ToolTable.Group, key=lambda o: o.Label): + for tc in sorted(job.Tools.Group, key=lambda o: o.Label): item = QtGui.QListWidgetItem(tc.Label) item.setData(self.DataObject, tc) item.setCheckState(QtCore.Qt.CheckState.Checked) diff --git a/src/Mod/Path/PathScripts/PathJobGui.py b/src/Mod/Path/PathScripts/PathJobGui.py index cbdb125ea7..f5d2fa9db2 100644 --- a/src/Mod/Path/PathScripts/PathJobGui.py +++ b/src/Mod/Path/PathScripts/PathJobGui.py @@ -222,8 +222,8 @@ class ViewProvider: if hasattr(self.obj, 'SetupSheet'): # when loading a job that didn't have a setup sheet they might not've been created yet children.append(self.obj.SetupSheet) - if hasattr(self.obj, 'ToolTable'): - children.append(self.obj.ToolTable) + if hasattr(self.obj, 'Tools'): + children.append(self.obj.Tools) return children def onDelete(self, vobj, arg2=None): @@ -709,7 +709,7 @@ class TaskPanel: vUnit = FreeCAD.Units.Quantity(1, FreeCAD.Units.Velocity).getUserPreferred()[2] - for row, tc in enumerate(sorted(self.obj.ToolTable.Group, key=lambda tc: tc.Label)): + for row, tc in enumerate(sorted(self.obj.Tools.Group, key=lambda tc: tc.Label)): self.form.activeToolController.addItem(tc.Label, tc) if tc == select: index = row @@ -849,7 +849,7 @@ class TaskPanel: # can only delete what is selected delete = edit # ... but we want to make sure there's at least one TC left - if len(self.obj.ToolTable.Group) == len(self.form.toolControllerList.selectedItems()): + if len(self.obj.Tools.Group) == len(self.form.toolControllerList.selectedItems()): delete = False # ... also don't want to delete any TCs that are already used if delete: diff --git a/src/Mod/Path/PathScripts/PathSanity.py b/src/Mod/Path/PathScripts/PathSanity.py index 1207891168..0d1517e4f7 100644 --- a/src/Mod/Path/PathScripts/PathSanity.py +++ b/src/Mod/Path/PathScripts/PathSanity.py @@ -517,7 +517,7 @@ class CommandPathSanity: data = {} try: - for TC in obj.ToolTable.Group: + for TC in obj.Tools.Group: if not hasattr(TC.Tool, 'BitBody'): self.squawk("PathSanity", "Tool number {} is a legacy tool. Legacy tools not \ diff --git a/src/Mod/Path/PathScripts/PathToolControllerGui.py b/src/Mod/Path/PathScripts/PathToolControllerGui.py index 8f72838df9..33e735a08d 100644 --- a/src/Mod/Path/PathScripts/PathToolControllerGui.py +++ b/src/Mod/Path/PathScripts/PathToolControllerGui.py @@ -165,12 +165,12 @@ class CommandPathToolController(object): tool = PathToolBitGui.ToolBitSelector().getTool() if tool: toolNr = None - for tc in job.ToolTable.Group: + for tc in job.Tools.Group: if tc.Tool == tool: toolNr = tc.ToolNumber break if not toolNr: - toolNr = max([tc.ToolNumber for tc in job.ToolTable.Group]) + 1 + toolNr = max([tc.ToolNumber for tc in job.Tools.Group]) + 1 tc = Create("TC: {}".format(tool.Label), tool, toolNr) job.Proxy.addToolController(tc) FreeCAD.ActiveDocument.recompute() diff --git a/src/Mod/Path/PathScripts/PathUtils.py b/src/Mod/Path/PathScripts/PathUtils.py index 1b8aba0950..b27251ce0c 100644 --- a/src/Mod/Path/PathScripts/PathUtils.py +++ b/src/Mod/Path/PathScripts/PathUtils.py @@ -403,7 +403,7 @@ def getToolControllers(obj, proxy=None): PathLog.debug("op={} ({})".format(obj.Label, type(obj))) if job: - return [tc for tc in job.ToolTable.Group if proxy.isToolSupported(obj, tc.Tool)] + return [tc for tc in job.Tools.Group if proxy.isToolSupported(obj, tc.Tool)] return [] From 83b431d0b75b39619f69e0d269d40edf08662684 Mon Sep 17 00:00:00 2001 From: Markus Lampert Date: Thu, 31 Dec 2020 20:43:40 -0800 Subject: [PATCH 5/5] Fixed unit test for ToolTable rename --- src/Mod/Path/PathTests/TestPathHelix.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Mod/Path/PathTests/TestPathHelix.py b/src/Mod/Path/PathTests/TestPathHelix.py index 28dc4b7d18..a3dc545156 100644 --- a/src/Mod/Path/PathTests/TestPathHelix.py +++ b/src/Mod/Path/PathTests/TestPathHelix.py @@ -62,7 +62,7 @@ class TestPathHelix(PathTestUtils.PathTestBase): def test02(self): '''Verify Helix generates proper holes for rotated model''' - self.job.ToolTable.Group[0].Tool.Diameter = 0.5 + self.job.Tools.Group[0].Tool.Diameter = 0.5 op = PathHelix.Create('Helix') proxy = op.Proxy @@ -87,7 +87,7 @@ class TestPathHelix(PathTestUtils.PathTestBase): self.doc.Body.Placement.Rotation = FreeCAD.Rotation(deg, 0, 0) self.job = PathJob.Create('Job', [self.doc.Body]) - self.job.ToolTable.Group[0].Tool.Diameter = 0.5 + self.job.Tools.Group[0].Tool.Diameter = 0.5 op = PathHelix.Create('Helix') proxy = op.Proxy @@ -109,7 +109,7 @@ class TestPathHelix(PathTestUtils.PathTestBase): self.clone.Placement.Rotation = FreeCAD.Rotation(deg, 0, 0) self.job = PathJob.Create('Job', [self.clone]) - self.job.ToolTable.Group[0].Tool.Diameter = 0.5 + self.job.Tools.Group[0].Tool.Diameter = 0.5 op = PathHelix.Create('Helix') proxy = op.Proxy