From afdbce81b693c9fa0f5757cb364ff3d4f9b50707 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Tue, 1 Feb 2022 04:52:00 +0200 Subject: [PATCH] - wip --- CHANGELOG.md | 1 + tclCommands/TclCommandCncjob.py | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d5015237..17c69d6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ CHANGELOG for FlatCAM beta - fixed the `cncjob` Tcl command: forgot to pop the arguments that are not recognized by the non-multigeo handler - fixed the multi-color feature in the Gerber object UI - fixed the marking of apertures in Gerber object UI and in Extract plugin +- minor changes in `cncjob` Tcl command 31.02.2022 diff --git a/tclCommands/TclCommandCncjob.py b/tclCommands/TclCommandCncjob.py index c6314fa1..bb443010 100644 --- a/tclCommands/TclCommandCncjob.py +++ b/tclCommands/TclCommandCncjob.py @@ -112,6 +112,7 @@ class TclCommandCncjob(TclCommandSignaled): except KeyError: if muted is False: self.raise_tcl_error("Object name is missing") + return "fail" else: return "fail" @@ -130,6 +131,7 @@ class TclCommandCncjob(TclCommandSignaled): if obj.kind != 'geometry': if muted is False: self.raise_tcl_error('Expected GeometryObject, got %s %s.' % (str(name), type(obj))) + return "fail" else: return @@ -228,6 +230,7 @@ class TclCommandCncjob(TclCommandSignaled): if len(eval(args["toolchangexy"])) != 2: self.raise_tcl_error("The entered value for 'toolchangexy' needs to have the format x,y or " "in format (x, y) - no spaces allowed. But always two comma separated values.") + return "fail" args.pop('name', None) args.pop('las_power', None) @@ -238,13 +241,14 @@ class TclCommandCncjob(TclCommandSignaled): continue else: if args[arg] is None: - print("None parameters: %s is None" % arg) + self.app.log.error("None parameters: %s is None" % arg) if muted is False: self.raise_tcl_error('One of the command parameters that have to be not None, is None.\n' 'The parameter that is None is in the default values found in the list \n' 'generated by the TclCommand "list_sys geom". or in the arguments.') + return "fail" else: - return + return "fail" # HACK !!! Should be solved elsewhere!!! # default option for multidepth is False