From fd696b00a2f23914ebf9d68c1a335ccc335350d0 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Mon, 17 Jan 2022 14:08:44 +0200 Subject: [PATCH] - fixed the 'isolate' Tcl command: updated to the new tools data structure elements --- CHANGELOG.md | 1 + appObjects/FlatCAMGerber.py | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a03c436..7be425a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ CHANGELOG for FlatCAM beta - fixed issues in the 'millslots' and 'milldrills' Tcl commands for the case when some parameters are not used - made sure that in Tcl commands deleting argument keys will not raise an error +- fixed the 'isolate' Tcl command: updated to the new tools data structure elements 15.01.2022 diff --git a/appObjects/FlatCAMGerber.py b/appObjects/FlatCAMGerber.py index 72f40349..672dd1b8 100644 --- a/appObjects/FlatCAMGerber.py +++ b/appObjects/FlatCAMGerber.py @@ -555,7 +555,7 @@ class GerberObject(FlatCAMObj, Gerber): def iso_init(geo_obj, app_obj): # Propagate options geo_obj.options["tools_mill_tooldia"] = str(dia) - geo_obj.tool_type = self.app.defaults["tools_iso_tool_type"] + geo_obj.tool_type = self.app.defaults["tools_iso_tool_shape"] geo_obj.solid_geometry = [] @@ -569,7 +569,7 @@ class GerberObject(FlatCAMObj, Gerber): default_data[opt_key] = self.app.options[opt_key] geo_obj.tools = { - '1': { + 1: { 'tooldia': dia, 'data': default_data, 'solid_geometry': geo_obj.solid_geometry @@ -591,7 +591,7 @@ class GerberObject(FlatCAMObj, Gerber): geo_obj.solid_geometry.append(geom) # update the geometry in the tools - geo_obj.tools['1']['solid_geometry'] = geo_obj.solid_geometry + geo_obj.tools[1]['solid_geometry'] = geo_obj.solid_geometry # detect if solid_geometry is empty and this require list flattening which is "heavy" # or just looking in the lists (they are one level depth) and if any is not empty @@ -654,7 +654,7 @@ class GerberObject(FlatCAMObj, Gerber): def iso_init(geo_obj, app_obj): # Propagate options geo_obj.options["tools_mill_tooldia"] = str(dia) - geo_obj.tool_type = self.app.defaults["tools_iso_tool_type"] + geo_obj.tool_type = self.app.defaults["tools_iso_tool_shape"] # if milling type is climb then the move is counter-clockwise around features mill_dir = 1 if milling_type == 'cl' else 0 @@ -677,7 +677,7 @@ class GerberObject(FlatCAMObj, Gerber): default_data[opt_key] = self.app.options[opt_key] geo_obj.tools = { - '1': { + 1: { 'tooldia': dia, 'data': default_data, 'solid_geometry': geo_obj.solid_geometry