From e18690baf0e29a0a7615947651dc50df1d59c108 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Mon, 17 Jan 2022 12:35:36 +0200 Subject: [PATCH] - fixed issues in the 'millslots' and 'milldrills' Tcl commands for the case when some parameters are not used --- CHANGELOG.md | 4 ++++ app_Main.py | 2 +- defaults.py | 2 +- tclCommands/TclCommandMillDrills.py | 6 ++++-- tclCommands/TclCommandMillSlots.py | 7 +++++++ 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f88de63..b34fcef4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ CHANGELOG for FlatCAM beta ================================================= +17.01.2022 + +- fixed issues in the 'millslots' and 'milldrills' Tcl commands for the case when some parameters are not used + 15.01.2022 - All FCColorEntry GUI element instances have now a set icon for the title (and taskbar) diff --git a/app_Main.py b/app_Main.py index 7adde73b..72765469 100644 --- a/app_Main.py +++ b/app_Main.py @@ -654,7 +654,7 @@ class App(QtCore.QObject): 'feedrate_z', 'GRBL_11', 'GRBL_laser', 'gridoffsety', 'gridx', 'gridy', 'has_offset', 'holes', 'hpgl', 'iso_type', 'Line_xyz', 'margin', 'marlin', 'method', 'milled_dias', 'minoffset', 'name', 'offset', 'opt_type', 'order', - 'outname', 'overlap', 'passes', 'postamble', 'pp', 'ppname_e', 'ppname_g', + 'outname', 'overlap', 'obj_name', 'passes', 'postamble', 'pp', 'ppname_e', 'ppname_g', 'preamble', 'radius', 'ref', 'rest', 'rows', 'shellvar_', 'scale_factor', 'spacing_columns', 'spacing_rows', 'spindlespeed', 'startz', 'startxy', diff --git a/defaults.py b/defaults.py index d43fb130..fed2b7b2 100644 --- a/defaults.py +++ b/defaults.py @@ -800,7 +800,7 @@ class FlatCAMDefaults: 'endxy, endz, extracut_length, f, feedrate, ' 'feedrate_z, grbl_11, GRBL_laser, gridoffsety, gridx, gridy, has_offset, ' 'holes, hpgl, iso_type, line_xyz, margin, marlin, method, milled_dias, ' - 'minoffset, name, offset, opt_type, order, outname, overlap, ' + 'minoffset, name, offset, opt_type, order, outname, overlap, obj_name' 'passes, postamble, pp, ppname_e, ppname_g, preamble, radius, ref, rest, ' 'rows, shellvar_, scale_factor, spacing_columns, spacing_rows, spindlespeed, ' 'startz, startxy, toolchange_xy, toolchangez, ' diff --git a/tclCommands/TclCommandMillDrills.py b/tclCommands/TclCommandMillDrills.py index 9c398925..8a616668 100644 --- a/tclCommands/TclCommandMillDrills.py +++ b/tclCommands/TclCommandMillDrills.py @@ -132,8 +132,10 @@ class TclCommandMillDrills(TclCommandSignaled): args['tools'] = 'all' # no longer needed - del args['milled_dias'] - del args['diatol'] + if 'milled_dias' in args: + del args['milled_dias'] + if 'diatol' in args: + del args['diatol'] except Exception as e: self.raise_tcl_error("Bad tools: %s" % str(e)) diff --git a/tclCommands/TclCommandMillSlots.py b/tclCommands/TclCommandMillSlots.py index 833a0542..e2c8f7a8 100644 --- a/tclCommands/TclCommandMillSlots.py +++ b/tclCommands/TclCommandMillSlots.py @@ -135,6 +135,13 @@ class TclCommandMillSlots(TclCommandSignaled): # args['milled_dias'] = [x.strip() for x in args['tools'].split(",")] else: args['tools'] = 'all' + + # no longer needed + if 'milled_dias' in args: + del args['milled_dias'] + if 'diatol' in args: + del args['diatol'] + except Exception as e: self.raise_tcl_error("Bad tools: %s" % str(e))