From 67f0c657c603a8f38db55e44bf43fa804a9134f0 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Thu, 5 Sep 2019 17:53:59 +0300 Subject: [PATCH] - more messages --- FlatCAMObj.py | 8 +++++--- camlib.py | 8 ++++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/FlatCAMObj.py b/FlatCAMObj.py index 94b7217d..7a85849f 100644 --- a/FlatCAMObj.py +++ b/FlatCAMObj.py @@ -4785,7 +4785,9 @@ class FlatCAMGeometry(FlatCAMObj, Geometry): else: dia_cnc_dict['gcode'] = res + self.app.inform.emit('[success] %s' % _("G-Code parsing in progress...")) dia_cnc_dict['gcode_parsed'] = job_obj.gcode_parse() + self.app.inform.emit('[success] %s' % _("G-Code parsing finished...")) # TODO this serve for bounding box creation only; should be optimized # commented this; there is no need for the actual GCode geometry - the original one will serve as well @@ -4794,10 +4796,10 @@ class FlatCAMGeometry(FlatCAMObj, Geometry): # geo['geom'] for geo in dia_cnc_dict['gcode_parsed'] if geo['geom'].is_valid is True # ]) try: - dia_cnc_dict['solid_geometry'] = cascaded_union(tool_solid_geometry) - self.app.inform.emit(_("[success] Finished G-Code processing...")) + dia_cnc_dict['solid_geometry'] = tool_solid_geometry + self.app.inform.emit('[success] %s' % _("Finished G-Code processing...")) except Exception as e: - self.app.inform.emit(_("[ERROR] G-Code processing failed with error: %s") % str(e)) + self.app.inform.emit('[ERROR] %s' % _("G-Code processing failed with error: %s") % str(e)) # tell gcode_parse from which point to start drawing the lines depending on what kind of # object is the source of gcode diff --git a/camlib.py b/camlib.py index 8681f873..50a1a19f 100644 --- a/camlib.py +++ b/camlib.py @@ -5813,8 +5813,9 @@ class CNCjob(Geometry): else: self.xy_toolchange = [float(eval(a)) for a in toolchangexy.split(",")] if len(self.xy_toolchange) < 2: - self.app.inform.emit(_("[ERROR]The Toolchange X,Y field in Edit -> Preferences has to be " - "in the format (x, y) \nbut now there is only one value, not two. ")) + self.app.inform.emit('[ERROR] %s' % _("The Toolchange X,Y field in Edit -> Preferences has to be " + "in the format (x, y) \n" + "but now there is only one value, not two.")) return 'fail' except Exception as e: log.debug("camlib.CNCJob.generate_from_multitool_geometry() --> %s" % str(e)) @@ -5871,6 +5872,8 @@ class CNCjob(Geometry): # Store the geometry log.debug("Indexing geometry before generating G-Code...") + self.app.inform.emit(_("Indexing geometry before generating G-Code...")) + for shape in flat_geometry: if shape is not None: # TODO: This shouldn't have happened. storage.insert(shape) @@ -5919,6 +5922,7 @@ class CNCjob(Geometry): # ## Iterate over geometry paths getting the nearest each time. log.debug("Starting G-Code...") + self.app.inform.emit(_("Starting G-Code...")) path_count = 0 current_pt = (0, 0)