diff --git a/FlatCAMApp.py b/FlatCAMApp.py index 72f3b36c..57fec76a 100644 --- a/FlatCAMApp.py +++ b/FlatCAMApp.py @@ -5948,15 +5948,14 @@ class App(QtCore.QObject): except tk.TclError as e: log.debug("App.handleRunCode() --> %s" % str(e)) old_line = old_line + tcl_command_line + '\n' + except Exception as e: + log.debug("App.handleRunCode() --> %s" % str(e)) if old_line != '': # it means that the script finished with an error result = self.tcl.eval("set errorInfo") self.log.error("Exec command Exception: %s" % (result + '\n')) self.shell.append_error('ERROR: ' + result + '\n') - else: - # success! plot all objects - self.plot_all() self.shell.close_proccessing() @@ -8310,6 +8309,10 @@ class App(QtCore.QObject): self.ui.buttonOpen.clicked.connect(lambda: self.handleOpen(filt=flt)) self.ui.buttonSave.clicked.connect(lambda: self.handleSaveGCode(filt=flt)) self.ui.buttonRun.show() + try: + self.ui.buttonRun.clicked.disconnect(self.handleRunCode) + except TypeError: + pass self.ui.buttonRun.clicked.connect(self.handleRunCode) self.handleTextChanged() diff --git a/FlatCAMObj.py b/FlatCAMObj.py index d1b8373f..ee851354 100644 --- a/FlatCAMObj.py +++ b/FlatCAMObj.py @@ -924,7 +924,7 @@ class FlatCAMGerber(FlatCAMObj, Gerber): return "Operation failed: %s" % str(e) def isolate(self, iso_type=None, dia=None, passes=None, overlap=None, outname=None, combine=None, - milling_type=None, follow=None): + milling_type=None, follow=None, plot=True): """ Creates an isolation routing geometry object in the project. @@ -1164,7 +1164,7 @@ class FlatCAMGerber(FlatCAMObj, Gerber): geo_obj.solid_geometry = area_subtraction(geo_obj.solid_geometry) # TODO: Do something if this is None. Offer changing name? - self.app.new_object("geometry", iso_name, iso_init) + self.app.new_object("geometry", iso_name, iso_init, plot=plot) else: for i in range(passes): @@ -1239,7 +1239,7 @@ class FlatCAMGerber(FlatCAMObj, Gerber): geo_obj.solid_geometry = area_subtraction(geo_obj.solid_geometry) # TODO: Do something if this is None. Offer changing name? - self.app.new_object("geometry", iso_name, iso_init) + self.app.new_object("geometry", iso_name, iso_init, plot=plot) def on_plot_cb_click(self, *args): if self.muted_ui: @@ -2604,7 +2604,7 @@ class FlatCAMExcellon(FlatCAMObj, Excellon): return has_slots, excellon_code - def generate_milling_drills(self, tools=None, outname=None, tooldia=None, use_thread=False): + def generate_milling_drills(self, tools=None, outname=None, tooldia=None, plot=False, use_thread=False): """ Note: This method is a good template for generic operations as it takes it's options from parameters or otherwise from the @@ -2683,7 +2683,7 @@ class FlatCAMExcellon(FlatCAMObj, Excellon): Point(hole['point']).buffer(buffer_value).exterior) if use_thread: def geo_thread(app_obj): - app_obj.new_object("geometry", outname, geo_init) + app_obj.new_object("geometry", outname, geo_init, plot=plot) app_obj.progress.emit(100) # Create a promise with the new name @@ -2692,11 +2692,11 @@ class FlatCAMExcellon(FlatCAMObj, Excellon): # Send to worker self.app.worker_task.emit({'fcn': geo_thread, 'params': [self.app]}) else: - self.app.new_object("geometry", outname, geo_init) + self.app.new_object("geometry", outname, geo_init, plot=plot) return True, "" - def generate_milling_slots(self, tools=None, outname=None, tooldia=None, use_thread=False): + def generate_milling_slots(self, tools=None, outname=None, tooldia=None, plot=True, use_thread=False): """ Note: This method is a good template for generic operations as it takes it's options from parameters or otherwise from the @@ -2790,7 +2790,7 @@ class FlatCAMExcellon(FlatCAMObj, Excellon): if use_thread: def geo_thread(app_obj): - app_obj.new_object("geometry", outname + '_slot', geo_init) + app_obj.new_object("geometry", outname + '_slot', geo_init, plot=plot) app_obj.progress.emit(100) # Create a promise with the new name @@ -2799,7 +2799,7 @@ class FlatCAMExcellon(FlatCAMObj, Excellon): # Send to worker self.app.worker_task.emit({'fcn': geo_thread, 'params': [self.app]}) else: - self.app.new_object("geometry", outname + '_slot', geo_init) + self.app.new_object("geometry", outname + '_slot', geo_init, plot=plot) return True, "" @@ -4527,7 +4527,8 @@ class FlatCAMGeometry(FlatCAMObj, Geometry): self.app.inform.emit('[ERROR_NOTCL] %s' % _("Failed. No tool selected in the tool table ...")) - def mtool_gen_cncjob(self, outname=None, tools_dict=None, tools_in_use=None, segx=None, segy=None, use_thread=True): + def mtool_gen_cncjob(self, outname=None, tools_dict=None, tools_in_use=None, segx=None, segy=None, + plot=True, use_thread=True): """ Creates a multi-tool CNCJob out of this Geometry object. The actual work is done by the target FlatCAMCNCjob object's @@ -4884,7 +4885,7 @@ class FlatCAMGeometry(FlatCAMObj, Geometry): def job_thread(app_obj): if self.solid_geometry: with self.app.proc_container.new(_("Generating CNC Code")): - if app_obj.new_object("cncjob", outname, job_init_single_geometry) != 'fail': + if app_obj.new_object("cncjob", outname, job_init_single_geometry, plot=plot) != 'fail': app_obj.inform.emit('[success] %s: %s' % (_("CNCjob created")), outname) app_obj.progress.emit(100) @@ -4901,9 +4902,9 @@ class FlatCAMGeometry(FlatCAMObj, Geometry): self.app.worker_task.emit({'fcn': job_thread, 'params': [self.app]}) else: if self.solid_geometry: - self.app.new_object("cncjob", outname, job_init_single_geometry) + self.app.new_object("cncjob", outname, job_init_single_geometry, plot=plot) else: - self.app.new_object("cncjob", outname, job_init_multi_geometry) + self.app.new_object("cncjob", outname, job_init_multi_geometry, plot=plot) def generatecncjob( self, outname=None, @@ -4916,7 +4917,8 @@ class FlatCAMGeometry(FlatCAMObj, Geometry): extracut=None, startz=None, endz=None, ppname_g=None, segx=None, segy=None, - use_thread=True): + use_thread=True, + plot=True): """ Only used for TCL Command. Creates a CNCJob out of this Geometry object. The actual @@ -5043,7 +5045,7 @@ class FlatCAMGeometry(FlatCAMObj, Geometry): # To be run in separate thread def job_thread(app_obj): with self.app.proc_container.new(_("Generating CNC Code")): - app_obj.new_object("cncjob", outname, job_init) + app_obj.new_object("cncjob", outname, job_init, plot=plot) app_obj.inform.emit('[success] %s: %s' % (_("CNCjob created")), outname) app_obj.progress.emit(100) @@ -5053,7 +5055,7 @@ class FlatCAMGeometry(FlatCAMObj, Geometry): # Send to worker self.app.worker_task.emit({'fcn': job_thread, 'params': [self.app]}) else: - self.app.new_object("cncjob", outname, job_init) + self.app.new_object("cncjob", outname, job_init, plot=plot) # def on_plot_cb_click(self, *args): # TODO: args not needed # if self.muted_ui: diff --git a/README.md b/README.md index 224fa336..e6ddefc3 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,9 @@ CAD program, and create G-Code for Isolation routing. - added possibility to see the GCode when right clicking on the Project tab on a CNCJob object and then clicking View Source - added a new TclCommand named PlotObjects which will plot a list of FlatCAM objects - made that after opening an object in FlatCAM it is not automatically plotted. If the user wants to plot it can use the TclCommands PlotAll or PlotObjects -- modified the TclCommands that open files to not plot the opened files automatically +- modified the TclCommands so that open files do not plot the opened files automatically +- made all TclCommands not to be plotted automatically +- made sure that all TclCommands are not threaded 14.09.2019 diff --git a/flatcamTools/ToolNonCopperClear.py b/flatcamTools/ToolNonCopperClear.py index e79f73c2..20570378 100644 --- a/flatcamTools/ToolNonCopperClear.py +++ b/flatcamTools/ToolNonCopperClear.py @@ -1292,6 +1292,7 @@ class NonCopperClear(FlatCAMTool, Gerber): method=None, rest=None, tools_storage=None, + plot=True, run_threaded=True): """ Clear the excess copper from the entire object. @@ -2189,9 +2190,9 @@ class NonCopperClear(FlatCAMTool, Gerber): def job_thread(app_obj): try: if rest_machining_choice is True: - app_obj.new_object("geometry", name, gen_clear_area_rest) + app_obj.new_object("geometry", name, gen_clear_area_rest, plot=plot) else: - app_obj.new_object("geometry", name, gen_clear_area) + app_obj.new_object("geometry", name, gen_clear_area, plot=plot) except FlatCAMApp.GracefulException: proc.done() return diff --git a/flatcamTools/ToolPaint.py b/flatcamTools/ToolPaint.py index 0991bbc5..e91fb482 100644 --- a/flatcamTools/ToolPaint.py +++ b/flatcamTools/ToolPaint.py @@ -1168,7 +1168,9 @@ class ToolPaint(FlatCAMTool, Gerber): outname=None, connect=None, contour=None, - tools_storage=None): + tools_storage=None, + plot=True, + run_threaded=True): """ Paints a polygon selected by clicking on its interior or by having a point coordinates given @@ -1432,7 +1434,7 @@ class ToolPaint(FlatCAMTool, Gerber): def job_thread(app_obj): try: - app_obj.new_object("geometry", name, gen_paintarea) + app_obj.new_object("geometry", name, gen_paintarea, plot=plot) except FlatCAMApp.GracefulException: proc.done() return @@ -1451,8 +1453,11 @@ class ToolPaint(FlatCAMTool, Gerber): # Promise object with the new name self.app.collection.promise(name) - # Background - self.app.worker_task.emit({'fcn': job_thread, 'params': [self.app]}) + if run_threaded: + # Background + self.app.worker_task.emit({'fcn': job_thread, 'params': [self.app]}) + else: + job_thread(app_obj=self.app) def paint_poly_all(self, obj, tooldia=None, @@ -1463,7 +1468,9 @@ class ToolPaint(FlatCAMTool, Gerber): outname=None, connect=None, contour=None, - tools_storage=None): + tools_storage=None, + plot=True, + run_threaded=True): """ Paints all polygons in this object. @@ -1901,9 +1908,9 @@ class ToolPaint(FlatCAMTool, Gerber): def job_thread(app_obj): try: if self.rest_cb.isChecked(): - app_obj.new_object("geometry", name, gen_paintarea_rest_machining) + app_obj.new_object("geometry", name, gen_paintarea_rest_machining, plot=plot) else: - app_obj.new_object("geometry", name, gen_paintarea) + app_obj.new_object("geometry", name, gen_paintarea, plot=plot) except FlatCAMApp.GracefulException: proc.done() return @@ -1920,8 +1927,11 @@ class ToolPaint(FlatCAMTool, Gerber): # Promise object with the new name self.app.collection.promise(name) - # Background - self.app.worker_task.emit({'fcn': job_thread, 'params': [self.app]}) + if run_threaded: + # Background + self.app.worker_task.emit({'fcn': job_thread, 'params': [self.app]}) + else: + job_thread(app_obj=self.app) def paint_poly_area(self, obj, sel_obj, tooldia=None, @@ -1932,7 +1942,9 @@ class ToolPaint(FlatCAMTool, Gerber): outname=None, connect=None, contour=None, - tools_storage=None): + tools_storage=None, + plot=True, + run_threaded=True): """ Paints all polygons in this object that are within the sel_obj object @@ -2366,9 +2378,9 @@ class ToolPaint(FlatCAMTool, Gerber): def job_thread(app_obj): try: if self.rest_cb.isChecked(): - app_obj.new_object("geometry", name, gen_paintarea_rest_machining) + app_obj.new_object("geometry", name, gen_paintarea_rest_machining, plot=plot) else: - app_obj.new_object("geometry", name, gen_paintarea) + app_obj.new_object("geometry", name, gen_paintarea, plot=plot) except FlatCAMApp.GracefulException: proc.done() return @@ -2385,8 +2397,11 @@ class ToolPaint(FlatCAMTool, Gerber): # Promise object with the new name self.app.collection.promise(name) - # Background - self.app.worker_task.emit({'fcn': job_thread, 'params': [self.app]}) + if run_threaded: + # Background + self.app.worker_task.emit({'fcn': job_thread, 'params': [self.app]}) + else: + job_thread(app_obj=self.app) def paint_poly_ref(self, obj, sel_obj, tooldia=None, @@ -2397,7 +2412,9 @@ class ToolPaint(FlatCAMTool, Gerber): outname=None, connect=None, contour=None, - tools_storage=None): + tools_storage=None, + plot=True, + run_threaded=True): """ Paints all polygons in this object that are within the sel_obj object @@ -2441,7 +2458,9 @@ class ToolPaint(FlatCAMTool, Gerber): outname=outname, connect=connect, contour=contour, - tools_storage=tools_storage) + tools_storage=tools_storage, + plot=plot, + run_threaded=run_threaded) @staticmethod def paint_bounds(geometry): diff --git a/tclCommands/TclCommandAlignDrill.py b/tclCommands/TclCommandAlignDrill.py index 6fbaf7c0..3b895861 100644 --- a/tclCommands/TclCommandAlignDrill.py +++ b/tclCommands/TclCommandAlignDrill.py @@ -178,7 +178,7 @@ class TclCommandAlignDrill(TclCommandSignaled): obj.app.new_object("excellon", name + "_aligndrill", - alligndrill_init_me) + alligndrill_init_me, plot=False) except Exception as e: return "Operation failed: %s" % str(e) @@ -194,8 +194,8 @@ class TclCommandAlignDrill(TclCommandSignaled): try: px = dist py = dist - obj.app.new_object("excellon", name + "_alligndrill", alligndrill_init_me) + obj.app.new_object("excellon", name + "_alligndrill", alligndrill_init_me, plot=False) except Exception as e: return "Operation failed: %s" % str(e) - return 'Ok' + return 'Ok. Align Drills Excelon object created' diff --git a/tclCommands/TclCommandAlignDrillGrid.py b/tclCommands/TclCommandAlignDrillGrid.py index 39bc587d..84e3cde7 100644 --- a/tclCommands/TclCommandAlignDrillGrid.py +++ b/tclCommands/TclCommandAlignDrillGrid.py @@ -102,4 +102,4 @@ class TclCommandAlignDrillGrid(TclCommandSignaled): init_obj.create_geometry() # Create the new object - self.app.new_object("excellon", args['outname'], aligndrillgrid_init_me) + self.app.new_object("excellon", args['outname'], aligndrillgrid_init_me, plot=False) diff --git a/tclCommands/TclCommandBbox.py b/tclCommands/TclCommandBbox.py index dbbabe8c..d1ecd954 100644 --- a/tclCommands/TclCommandBbox.py +++ b/tclCommands/TclCommandBbox.py @@ -90,6 +90,6 @@ class TclCommandBbox(TclCommand): bounding_box = bounding_box.envelope geo_obj.solid_geometry = bounding_box - self.app.new_object("geometry", args['outname'], geo_init) + self.app.new_object("geometry", args['outname'], geo_init, plot=False) except Exception as e: return "Operation failed: %s" % str(e) diff --git a/tclCommands/TclCommandCncjob.py b/tclCommands/TclCommandCncjob.py index 3415dd4e..46c2ef6d 100644 --- a/tclCommands/TclCommandCncjob.py +++ b/tclCommands/TclCommandCncjob.py @@ -143,7 +143,7 @@ class TclCommandCncjob(TclCommandSignaled): obj.options['multidepth'] = False if not obj.multigeo: - obj.generatecncjob(use_thread=False, **args) + obj.generatecncjob(use_thread=False, plot=False, **args) else: # Update the local_tools_dict values with the args value local_tools_dict = deepcopy(obj.tools) @@ -171,5 +171,6 @@ class TclCommandCncjob(TclCommandSignaled): outname=args['outname'], tools_dict=local_tools_dict, tools_in_use=[], - use_thread=False) + use_thread=False, + plot=False) # self.raise_tcl_error('The object is a multi-geo geometry which is not supported in cncjob Tcl Command') diff --git a/tclCommands/TclCommandCopperClear.py b/tclCommands/TclCommandCopperClear.py index 38b0aa90..cc22a4f2 100644 --- a/tclCommands/TclCommandCopperClear.py +++ b/tclCommands/TclCommandCopperClear.py @@ -226,6 +226,7 @@ class TclCommandCopperClear(TclCommand): contour=contour, rest=rest, tools_storage=ncc_tools, + plot=False, run_threaded=False) return @@ -259,6 +260,7 @@ class TclCommandCopperClear(TclCommand): contour=contour, rest=rest, tools_storage=ncc_tools, + plot=False, run_threaded=False) return else: diff --git a/tclCommands/TclCommandCutout.py b/tclCommands/TclCommandCutout.py index e4826acc..782d174b 100644 --- a/tclCommands/TclCommandCutout.py +++ b/tclCommands/TclCommandCutout.py @@ -123,7 +123,7 @@ class TclCommandCutout(TclCommand): geo_obj.solid_geometry = cascaded_union([LineString(segment) for segment in cuts]) try: - self.app.new_object("geometry", name + "_cutout", geo_init_me) + self.app.new_object("geometry", name + "_cutout", geo_init_me, plot=False) self.app.inform.emit("[success] Rectangular-form Cutout operation finished.") except Exception as e: return "Operation failed: %s" % str(e) diff --git a/tclCommands/TclCommandDrillcncjob.py b/tclCommands/TclCommandDrillcncjob.py index 4a7bb4cd..96632ec6 100644 --- a/tclCommands/TclCommandDrillcncjob.py +++ b/tclCommands/TclCommandDrillcncjob.py @@ -181,4 +181,4 @@ class TclCommandDrillcncjob(TclCommandSignaled): job_obj.gcode_parse() job_obj.create_geometry() - self.app.new_object("cncjob", args['outname'], job_init) + self.app.new_object("cncjob", args['outname'], job_init, plot=False) diff --git a/tclCommands/TclCommandExteriors.py b/tclCommands/TclCommandExteriors.py index 6c93bb59..c4737c3a 100644 --- a/tclCommands/TclCommandExteriors.py +++ b/tclCommands/TclCommandExteriors.py @@ -61,4 +61,4 @@ class TclCommandExteriors(TclCommandSignaled): geo_obj.solid_geometry = obj_exteriors obj_exteriors = obj.get_exteriors() - self.app.new_object('geometry', outname, geo_init) + self.app.new_object('geometry', outname, geo_init, plot=False) diff --git a/tclCommands/TclCommandGeoCutout.py b/tclCommands/TclCommandGeoCutout.py index 4a32df88..6e2bf86f 100644 --- a/tclCommands/TclCommandGeoCutout.py +++ b/tclCommands/TclCommandGeoCutout.py @@ -279,7 +279,7 @@ class TclCommandGeoCutout(TclCommandSignaled): app_obj.inform.emit("[success] Any-form Cutout operation finished.") outname = cutout_obj.options["name"] + "_cutout" - self.app.new_object('geometry', outname, geo_init) + self.app.new_object('geometry', outname, geo_init, plot=False) # cutout_obj.plot() # self.app.inform.emit("[success] Any-form Cutout operation finished.") @@ -338,7 +338,7 @@ class TclCommandGeoCutout(TclCommandSignaled): app_obj.inform.emit("[success] Any-form Cutout operation finished.") outname = cutout_obj.options["name"] + "_cutout" - self.app.new_object('geometry', outname, geo_init) + self.app.new_object('geometry', outname, geo_init, plot=False) cutout_obj = self.app.collection.get_by_name(outname) else: diff --git a/tclCommands/TclCommandImportSvg.py b/tclCommands/TclCommandImportSvg.py index 01317b6b..d29eb99a 100644 --- a/tclCommands/TclCommandImportSvg.py +++ b/tclCommands/TclCommandImportSvg.py @@ -71,7 +71,7 @@ class TclCommandImportSvg(TclCommandSignaled): with self.app.proc_container.new("Import SVG"): # Object creation - self.app.new_object(obj_type, outname, obj_init) + self.app.new_object(obj_type, outname, obj_init, plot=False) # Register recent file self.app.file_opened.emit("svg", filename) diff --git a/tclCommands/TclCommandIsolate.py b/tclCommands/TclCommandIsolate.py index 4b57d409..eddf1527 100644 --- a/tclCommands/TclCommandIsolate.py +++ b/tclCommands/TclCommandIsolate.py @@ -85,4 +85,4 @@ class TclCommandIsolate(TclCommandSignaled): self.raise_tcl_error('Expected FlatCAMGerber, got %s %s.' % (name, type(obj))) del args['name'] - obj.isolate(**args) + obj.isolate(plot=False, **args) diff --git a/tclCommands/TclCommandJoinExcellon.py b/tclCommands/TclCommandJoinExcellon.py index ef2654ca..60a371fc 100644 --- a/tclCommands/TclCommandJoinExcellon.py +++ b/tclCommands/TclCommandJoinExcellon.py @@ -61,4 +61,4 @@ class TclCommandJoinExcellon(TclCommand): FlatCAMExcellon.merge(objs, obj_) if objs is not None: - self.app.new_object("excellon", outname, initialize) + self.app.new_object("excellon", outname, initialize, plot=False) diff --git a/tclCommands/TclCommandJoinGeometry.py b/tclCommands/TclCommandJoinGeometry.py index 90beac4f..005a2e09 100644 --- a/tclCommands/TclCommandJoinGeometry.py +++ b/tclCommands/TclCommandJoinGeometry.py @@ -61,4 +61,4 @@ class TclCommandJoinGeometry(TclCommand): FlatCAMGeometry.merge(objs, obj_) if objs is not None: - self.app.new_object("geometry", outname, initialize) + self.app.new_object("geometry", outname, initialize, plot=False) diff --git a/tclCommands/TclCommandMillDrills.py b/tclCommands/TclCommandMillDrills.py index 2919ab89..5dc7c9d3 100644 --- a/tclCommands/TclCommandMillDrills.py +++ b/tclCommands/TclCommandMillDrills.py @@ -128,7 +128,7 @@ class TclCommandMillDrills(TclCommandSignaled): del args['name'] # This runs in the background... Is blocking handled? - success, msg = obj.generate_milling_drills(**args) + success, msg = obj.generate_milling_drills(plot=False, **args) except Exception as e: success = None msg = None diff --git a/tclCommands/TclCommandMillSlots.py b/tclCommands/TclCommandMillSlots.py index 22159e4b..bb6882d2 100644 --- a/tclCommands/TclCommandMillSlots.py +++ b/tclCommands/TclCommandMillSlots.py @@ -127,7 +127,7 @@ class TclCommandMillSlots(TclCommandSignaled): del args['name'] # This runs in the background... Is blocking handled? - success, msg = obj.generate_milling_slots(**args) + success, msg = obj.generate_milling_slots(plot=False, **args) except Exception as e: success = None diff --git a/tclCommands/TclCommandMirror.py b/tclCommands/TclCommandMirror.py index db7ec3c8..821e91b3 100644 --- a/tclCommands/TclCommandMirror.py +++ b/tclCommands/TclCommandMirror.py @@ -103,6 +103,5 @@ class TclCommandMirror(TclCommandSignaled): try: obj.mirror(axis, [dist, dist]) - obj.plot() except Exception as e: return "Operation failed: %s" % str(e) diff --git a/tclCommands/TclCommandNewGeometry.py b/tclCommands/TclCommandNewGeometry.py index 349f8842..a7c72c40 100644 --- a/tclCommands/TclCommandNewGeometry.py +++ b/tclCommands/TclCommandNewGeometry.py @@ -46,4 +46,4 @@ class TclCommandNewGeometry(TclCommandSignaled): name = args['name'] - self.app.new_object('geometry', str(name), lambda x, y: None) + self.app.new_object('geometry', str(name), lambda x, y: None, plot=False) diff --git a/tclCommands/TclCommandNregions.py b/tclCommands/TclCommandNregions.py index 972be3d7..34cd43b9 100644 --- a/tclCommands/TclCommandNregions.py +++ b/tclCommands/TclCommandNregions.py @@ -89,7 +89,7 @@ class TclCommandNregions(TclCommand): non_copper = bounding_box.difference(geo) geo_obj.solid_geometry = non_copper - self.app.new_object("geometry", args['outname'], geo_init) + self.app.new_object("geometry", args['outname'], geo_init, plot=False) except Exception as e: return "Operation failed: %s" % str(e) diff --git a/tclCommands/TclCommandPaint.py b/tclCommands/TclCommandPaint.py index 300ccbbd..4263b84c 100644 --- a/tclCommands/TclCommandPaint.py +++ b/tclCommands/TclCommandPaint.py @@ -201,7 +201,9 @@ class TclCommandPaint(TclCommand): outname=outname, connect=connect, contour=contour, - tools_storage=paint_tools) + tools_storage=paint_tools, + plot=False, + run_threaded=False) return # Paint single polygon in the painted object @@ -222,7 +224,9 @@ class TclCommandPaint(TclCommand): outname=outname, connect=connect, contour=contour, - tools_storage=paint_tools) + tools_storage=paint_tools, + plot=False, + run_threaded=False) return # Paint all polygons found within the box object from the the painted object @@ -250,7 +254,9 @@ class TclCommandPaint(TclCommand): outname=outname, connect=connect, contour=contour, - tools_storage=paint_tools) + tools_storage=paint_tools, + plot=False, + run_threaded=False) return else: diff --git a/tclCommands/TclCommandPanelize.py b/tclCommands/TclCommandPanelize.py index 8c2f8d67..3497ad0a 100644 --- a/tclCommands/TclCommandPanelize.py +++ b/tclCommands/TclCommandPanelize.py @@ -90,7 +90,7 @@ class TclCommandPanelize(TclCommand): if 'threaded' in args: threaded = args['threaded'] else: - threaded = 1 + threaded = 0 if 'spacing_columns' in args: spacing_columns = args['spacing_columns'] @@ -265,10 +265,10 @@ class TclCommandPanelize(TclCommand): if isinstance(obj, FlatCAMExcellon): self.app.progress.emit(50) - self.app.new_object("excellon", outname, job_init_excellon, plot=True, autoselected=True) + self.app.new_object("excellon", outname, job_init_excellon, plot=False, autoselected=True) else: self.app.progress.emit(50) - self.app.new_object("geometry", outname, job_init_geometry, plot=True, autoselected=True) + self.app.new_object("geometry", outname, job_init_geometry, plot=False, autoselected=True) if threaded == 1: proc = self.app.proc_container.new("Generating panel ... Please wait.")