From a68dc429e311043ed39eee084c3dc4507b1da45f Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Wed, 10 Feb 2021 14:43:17 +0200 Subject: [PATCH] - fix of Tcl command AlignDrill by Bogusz Jagoda - small changes in FlatCAMExcellon.py file to fix milling the drill holes (due of the new changes in Geometry data structure) --- CHANGELOG.md | 5 +++++ appObjects/FlatCAMExcellon.py | 2 +- app_Main.py | 3 +-- tclCommands/TclCommandAlignDrill.py | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index db04bd5b..5286d35a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ CHANGELOG for FlatCAM beta ================================================= +10.02.2021 + +- fix of Tcl command AlignDrill by Bogusz Jagoda +- small changes in FlatCAMExcellon.py file to fix milling the drill holes (due of the new changes in Geometry data structure) + 29.01.2021 - some refactoring diff --git a/appObjects/FlatCAMExcellon.py b/appObjects/FlatCAMExcellon.py index feadf444..db1a7311 100644 --- a/appObjects/FlatCAMExcellon.py +++ b/appObjects/FlatCAMExcellon.py @@ -964,7 +964,7 @@ class ExcellonObject(FlatCAMObj, Excellon): geo_obj.options['Tools_in_use'] = plugin_table_items geo_obj.options['type'] = 'Excellon Geometry' geo_obj.options["tools_mill_tooldia"] = str(tooldia) - geo_obj.options["multidepth"] = app_obj.defaults["geometry_multidepth"] + geo_obj.options["multidepth"] = app_obj.defaults["tools_mill_multidepth"] geo_obj.solid_geometry = [] # in case that the tool used has the same diameter with the hole, and since the maximum resolution diff --git a/app_Main.py b/app_Main.py index 67e07322..dd3f3e06 100644 --- a/app_Main.py +++ b/app_Main.py @@ -9329,7 +9329,7 @@ class MenuFileHandlers(QtCore.QObject): return # Check for more compatible types and add as required - if not isinstance(obj, GeometryObject): + if obj.kind != 'geometry': msg = '[ERROR_NOTCL] %s' % _("Only Geometry objects can be used.") msgbox = QtWidgets.QMessageBox() msgbox.setIcon(QtWidgets.QMessageBox.Warning) @@ -9338,7 +9338,6 @@ class MenuFileHandlers(QtCore.QObject): bt_ok = msgbox.addButton(_('Ok'), QtWidgets.QMessageBox.AcceptRole) msgbox.setDefaultButton(bt_ok) msgbox.exec() - return name = self.app.collection.get_active().options["name"] diff --git a/tclCommands/TclCommandAlignDrill.py b/tclCommands/TclCommandAlignDrill.py index 260fa9c9..d63e01ba 100644 --- a/tclCommands/TclCommandAlignDrill.py +++ b/tclCommands/TclCommandAlignDrill.py @@ -178,7 +178,7 @@ class TclCommandAlignDrill(TclCommandSignaled): # populate init_obj.tools dict init_obj.tools = { - '1': { + 1: { 'tooldia': tooldia, 'drills': deepcopy(drills), 'solid_geometry': init_obj.solid_geometry