- more messages

This commit is contained in:
Marius Stanciu 2019-09-05 17:53:59 +03:00
parent 76138986bf
commit 67f0c657c6
2 changed files with 11 additions and 5 deletions

View File

@ -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

View File

@ -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)