- GCode Editor - closing the Editor will close also the Code Editor Tab
- cleanup of the CNCJob UI; added a checkbox to signal if any append/prepend gcode was set in Preferences (unchecking it will override and disable the usage of the append/prepend GCode) - the start Gcode is now stored in the CNCJob object attribute gc_start - GCode Editor - finished adding the ability to select a row in the Tools table and select the related GCode
This commit is contained in:
@@ -2109,21 +2109,14 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
# it seems that the tolerance needs to be a lot lower value than 0.01 and it was hardcoded initially
|
||||
# to a value of 0.0005 which is 20 times less than 0.01
|
||||
tol = float(self.app.defaults['global_tolerance']) / 20
|
||||
# res = job_obj.generate_from_multitool_geometry(
|
||||
# tool_solid_geometry, tooldia=tooldia_val, offset=tool_offset,
|
||||
# tolerance=tol, z_cut=z_cut, z_move=z_move,
|
||||
# feedrate=feedrate, feedrate_z=feedrate_z, feedrate_rapid=feedrate_rapid,
|
||||
# spindlespeed=spindlespeed, spindledir=spindledir, dwell=dwell, dwelltime=dwelltime,
|
||||
# multidepth=multidepth, depthpercut=depthpercut,
|
||||
# extracut=extracut, extracut_length=extracut_length, startz=startz, endz=endz, endxy=endxy,
|
||||
# toolchange=toolchange, toolchangez=toolchangez, toolchangexy=toolchangexy,
|
||||
# pp_geometry_name=pp_geometry_name,
|
||||
# tool_no=tool_cnt)
|
||||
|
||||
tool_lst = list(tools_dict.keys())
|
||||
is_first = True if tooluid_key == tool_lst[0] else False
|
||||
is_last = True if tooluid_key == tool_lst[-1] else False
|
||||
res = job_obj.geometry_tool_gcode_gen(tooluid_key, tools_dict, first_pt=(0, 0), tolerance = tol,
|
||||
is_first=is_first, is_last=is_last, toolchange = True)
|
||||
res, start_gcode = job_obj.geometry_tool_gcode_gen(tooluid_key, tools_dict, first_pt=(0, 0),
|
||||
tolerance = tol,
|
||||
is_first=is_first, is_last=is_last,
|
||||
toolchange = True)
|
||||
if res == 'fail':
|
||||
log.debug("GeometryObject.mtool_gen_cncjob() --> generate_from_geometry2() failed")
|
||||
return 'fail'
|
||||
@@ -2131,6 +2124,9 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
dia_cnc_dict['gcode'] = res
|
||||
total_gcode += res
|
||||
|
||||
if start_gcode != '':
|
||||
job_obj.gc_start = start_gcode
|
||||
|
||||
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..."))
|
||||
|
||||
Reference in New Issue
Block a user