From 88b4a4dbbac588133c24fe76a69439f626fc90fc Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Fri, 18 Dec 2020 01:12:14 +0200 Subject: [PATCH] - fixed the Tcl command export_gcode to return the actual gcode --- CHANGELOG.md | 4 ++++ tclCommands/TclCommandExportGcode.py | 6 ++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7467065..3cc03f8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ CHANGELOG for FlatCAM beta ================================================= +18.12.2020 + +- fixed the Tcl command export_gcode to return the actual gcode + 17.12.2020 - Gerber parser - when simplification is used, the tolerance value will be adjusted by dividing it with 25.4 if the file units are imperial diff --git a/tclCommands/TclCommandExportGcode.py b/tclCommands/TclCommandExportGcode.py index d983ca99..ae6e0c9e 100644 --- a/tclCommands/TclCommandExportGcode.py +++ b/tclCommands/TclCommandExportGcode.py @@ -22,7 +22,6 @@ class TclCommandExportGcode(TclCommandSignaled): open_gerber tests/gerber_files/simple1.gbr -outname margin isolate margin -dia 3 cncjob margin_iso - cncjob margin_iso set EXPORT [export_gcode margin_iso_cnc] write_gcode margin_iso_cnc_1 /tmp/file.gcode ${EXPORT} @@ -73,12 +72,11 @@ class TclCommandExportGcode(TclCommandSignaled): if obj is None: self.raise_tcl_error("Object not found: %s" % name) - if not isinstance(obj, CNCjob): + if obj.kind != 'cncjob': self.raise_tcl_error('Expected CNCjob, got %s %s.' % (name, type(obj))) if self.app.collection.has_promises(): self.raise_tcl_error('!!!Promises exists, but should not here!!!') del args['name'] - obj.get_gcode(**args) - return + return obj.get_gcode(**args)