- fixed the Tcl command export_gcode to return the actual gcode

This commit is contained in:
Marius Stanciu
2020-12-18 01:12:14 +02:00
committed by Marius
parent 3a95e53d59
commit 88b4a4dbba
2 changed files with 6 additions and 4 deletions

View File

@@ -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 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 - Gerber parser - when simplification is used, the tolerance value will be adjusted by dividing it with 25.4 if the file units are imperial

View File

@@ -22,7 +22,6 @@ class TclCommandExportGcode(TclCommandSignaled):
open_gerber tests/gerber_files/simple1.gbr -outname margin open_gerber tests/gerber_files/simple1.gbr -outname margin
isolate margin -dia 3 isolate margin -dia 3
cncjob margin_iso cncjob margin_iso
cncjob margin_iso
set EXPORT [export_gcode margin_iso_cnc] set EXPORT [export_gcode margin_iso_cnc]
write_gcode margin_iso_cnc_1 /tmp/file.gcode ${EXPORT} write_gcode margin_iso_cnc_1 /tmp/file.gcode ${EXPORT}
@@ -73,12 +72,11 @@ class TclCommandExportGcode(TclCommandSignaled):
if obj is None: if obj is None:
self.raise_tcl_error("Object not found: %s" % name) 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))) self.raise_tcl_error('Expected CNCjob, got %s %s.' % (name, type(obj)))
if self.app.collection.has_promises(): if self.app.collection.has_promises():
self.raise_tcl_error('!!!Promises exists, but should not here!!!') self.raise_tcl_error('!!!Promises exists, but should not here!!!')
del args['name'] del args['name']
obj.get_gcode(**args) return obj.get_gcode(**args)
return