- Tool Drilling - brushing through code and solved the report on estimation of execution time

- Tool Drilling - more optimizations regarding of using Toolchange as opposed to not using it
- modfied the preprocessors to work with the new properties for Excellon objects
- added to preprocessors information regarding the X,Y position at the end of the job
- Tool Drilling made sure that on Toolchange event after toolchange event the tool feedrate is set
This commit is contained in:
Marius Stanciu
2020-07-15 20:16:57 +03:00
committed by Marius
parent 7b891900be
commit 5b80760ba7
18 changed files with 359 additions and 306 deletions

View File

@@ -18,6 +18,7 @@ class default(PreProc):
def start_code(self, p):
units = ' ' + str(p['units']).lower()
coords_xy = p['xy_toolchange']
end_coords_xy = p['xy_end']
gcode = '(This preprocessor is the default preprocessor used by FlatCAM.)\n'
gcode += '(It is made to work with MACH3 compatible motion controllers.)\n\n'
@@ -44,30 +45,32 @@ class default(PreProc):
gcode += '\n(FEEDRATE Z: )\n'
for tool, val in p['exc_tools'].items():
gcode += '(Tool: %s -> ' % str(tool) + 'Feedrate: %s' % str(val['data']["feedrate_z"]) + ')\n'
gcode += '(Tool: %s -> ' % str(tool) + 'Feedrate: %s' % \
str(val['data']["tools_drill_feedrate_z"]) + ')\n'
gcode += '\n(FEEDRATE RAPIDS: )\n'
for tool, val in p['exc_tools'].items():
gcode += '(Tool: %s -> ' % str(tool) + 'Feedrate Rapids: %s' % \
str(val['data']["feedrate_rapid"]) + ')\n'
str(val['data']["tools_drill_feedrate_rapid"]) + ')\n'
gcode += '\n(Z_CUT: )\n'
for tool, val in p['exc_tools'].items():
gcode += '(Tool: %s -> ' % str(tool) + 'Z_Cut: %s' % str(val['data']["cutz"]) + ')\n'
gcode += '(Tool: %s -> ' % str(tool) + 'Z_Cut: %s' % str(val['data']["tools_drill_cutz"]) + ')\n'
gcode += '\n(Tools Offset: )\n'
for tool, val in p['exc_cnc_tools'].items():
gcode += '(Tool: %s -> ' % str(val['tool']) + 'Offset Z: %s' % str(val['offset_z']) + ')\n'
gcode += '(Tool: %s -> ' % str(val['tool']) + 'Offset Z: %s' % \
str(val['data']["tools_drill_offset"]) + ')\n'
if p['multidepth'] is True:
gcode += '\n(DEPTH_PER_CUT: )\n'
for tool, val in p['exc_tools'].items():
gcode += '(Tool: %s -> ' % str(tool) + 'DeptPerCut: %s' % \
str(val['data']["depthperpass"]) + ')\n'
str(val['data']["tools_drill_depthperpass"]) + ')\n'
gcode += '\n(Z_MOVE: )\n'
for tool, val in p['exc_tools'].items():
gcode += '(Tool: %s -> ' % str(tool) + 'Z_Move: %s' % str(val['data']["travelz"]) + ')\n'
gcode += '(Tool: %s -> ' % str(tool) + 'Z_Move: %s' % str(val['data']["tools_drill_travelz"]) + ')\n'
gcode += '\n'
if p['toolchange'] is True:
@@ -81,6 +84,11 @@ class default(PreProc):
gcode += '(Z Start: ' + str(p['startz']) + units + ')\n'
gcode += '(Z End: ' + str(p['z_end']) + units + ')\n'
if end_coords_xy is not None:
gcode += '(X,Y End: ' + "%.*f, %.*f" % (p.decimals, end_coords_xy[0],
p.decimals, end_coords_xy[1]) + units + ')\n'
else:
gcode += '(X,Y End: ' + "None" + units + ')\n'
gcode += '(Steps per circle: ' + str(p['steps_per_circle']) + ')\n'
if str(p['options']['type']) == 'Excellon' or str(p['options']['type']) == 'Excellon Geometry':