- adapted the GCode generation from Excellon to work with multiple tools data and modified the preprocessors header
This commit is contained in:
@@ -35,24 +35,57 @@ class Berta_CNC(FlatCAMPostProc):
|
||||
gcode += '(Feedrate: ' + str(p['feedrate']) + units + '/min' + ')\n'
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += '(TOOL DIAMETER: ' + str(p['options']['tool_dia']) + units + ')\n'
|
||||
gcode += '(Feedrate_XY: ' + str(p['feedrate']) + units + '/min' + ')\n'
|
||||
gcode += '(Feedrate_Z: ' + str(p['z_feedrate']) + units + '/min' + ')\n'
|
||||
|
||||
gcode += '(Feedrate rapids ' + str(p['feedrate_rapid']) + units + '/min' + ')\n' + '\n'
|
||||
gcode += '(Z_Cut: ' + str(p['z_cut']) + units + ')\n'
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += '(Feedrate rapids ' + str(p['feedrate_rapid']) + units + '/min' + ')\n' + '\n'
|
||||
gcode += '(Z_Cut: ' + str(p['z_cut']) + units + ')\n'
|
||||
if p['multidepth'] is True:
|
||||
gcode += '(DepthPerCut: ' + str(p['z_depthpercut']) + units + ' <=>' + \
|
||||
str(math.ceil(abs(p['z_cut']) / p['z_depthpercut'])) + ' passes' + ')\n'
|
||||
gcode += '(Z_Move: ' + str(p['z_move']) + units + ')\n'
|
||||
|
||||
gcode += '(Z_Move: ' + str(p['z_move']) + units + ')\n'
|
||||
gcode += '(Z Toolchange: ' + str(p['z_toolchange']) + units + ')\n'
|
||||
elif str(p['options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
gcode += '\n(TOOLS DIAMETER: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["C"]) + ')\n'
|
||||
|
||||
if coords_xy is not None:
|
||||
gcode += '(X,Y Toolchange: ' + "%.*f, %.*f" % (p.decimals, coords_xy[0],
|
||||
p.decimals, coords_xy[1]) + units + ')\n'
|
||||
else:
|
||||
gcode += '(X,Y Toolchange: ' + "None" + units + ')\n'
|
||||
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 += '\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'
|
||||
|
||||
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 += '\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'
|
||||
|
||||
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'
|
||||
|
||||
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 += '\n'
|
||||
|
||||
if p['toolchange'] is True:
|
||||
gcode += '(Z Toolchange: ' + str(p['z_toolchange']) + units + ')\n'
|
||||
|
||||
if coords_xy is not None:
|
||||
gcode += '(X,Y Toolchange: ' + "%.*f, %.*f" % (p.decimals, coords_xy[0],
|
||||
p.decimals, coords_xy[1]) + units + ')\n'
|
||||
else:
|
||||
gcode += '(X,Y Toolchange: ' + "None" + units + ')\n'
|
||||
|
||||
gcode += '(Z Start: ' + str(p['startz']) + units + ')\n'
|
||||
gcode += '(Z End: ' + str(p['z_end']) + units + ')\n'
|
||||
|
||||
@@ -26,27 +26,56 @@ class ISEL_CNC(FlatCAMPostProc):
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += '(TOOL DIAMETER: ' + str(p['options']['tool_dia']) + units + ')\n'
|
||||
|
||||
gcode += '(Feedrate: ' + str(p['feedrate']) + units + '/min' + ')\n'
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += '(Feedrate_XY: ' + str(p['feedrate']) + units + '/min' + ')\n'
|
||||
gcode += '(Feedrate_Z: ' + str(p['z_feedrate']) + units + '/min' + ')\n'
|
||||
gcode += '(Feedrate rapids ' + str(p['feedrate_rapid']) + units + '/min' + ')\n' + '\n'
|
||||
gcode += '(Z_Cut: ' + str(p['z_cut']) + units + ')\n'
|
||||
if p['multidepth'] is True:
|
||||
gcode += '(DepthPerCut: ' + str(p['z_depthpercut']) + units + ' <=>' + \
|
||||
str(math.ceil(abs(p['z_cut']) / p['z_depthpercut'])) + ' passes' + ')\n'
|
||||
gcode += '(Z_Move: ' + str(p['z_move']) + units + ')\n'
|
||||
|
||||
gcode += '(Feedrate rapids ' + str(p['feedrate_rapid']) + units + '/min' + ')\n' + '\n'
|
||||
gcode += '(Z_Cut: ' + str(p['z_cut']) + units + ')\n'
|
||||
elif str(p['options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
gcode += '\n(TOOLS DIAMETER: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["C"]) + ')\n'
|
||||
|
||||
if p['multidepth'] is True:
|
||||
gcode += '(DepthPerCut: ' + str(p['z_depthpercut']) + units + ' <=>' + \
|
||||
str(math.ceil(abs(p['z_cut']) / p['z_depthpercut'])) + ' passes' + ')\n'
|
||||
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 += '(Z_Move: ' + str(p['z_move']) + units + ')\n'
|
||||
gcode += '(Z Toolchange: ' + str(p['z_toolchange']) + units + ')\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'
|
||||
|
||||
if coords_xy is not None:
|
||||
gcode += '(X,Y Toolchange: ' + "%.*f, %.*f" % (p.decimals, coords_xy[0],
|
||||
p.decimals, coords_xy[1]) + units + ')\n'
|
||||
else:
|
||||
gcode += '(X,Y Toolchange: ' + "None" + units + ')\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 += '\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'
|
||||
|
||||
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'
|
||||
|
||||
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 += '\n'
|
||||
|
||||
if p['toolchange'] is True:
|
||||
gcode += '(Z Toolchange: ' + str(p['z_toolchange']) + units + ')\n'
|
||||
|
||||
if coords_xy is not None:
|
||||
gcode += '(X,Y Toolchange: ' + "%.*f, %.*f" % (p.decimals, coords_xy[0],
|
||||
p.decimals, coords_xy[1]) + units + ')\n'
|
||||
else:
|
||||
gcode += '(X,Y Toolchange: ' + "None" + units + ')\n'
|
||||
|
||||
gcode += '(Z Start: ' + str(p['startz']) + units + ')\n'
|
||||
gcode += '(Z End: ' + str(p['z_end']) + units + ')\n'
|
||||
|
||||
@@ -25,36 +25,71 @@ class ISEL_ICP_CNC(FlatCAMPostProc):
|
||||
gcode += 'IMF_PBL flatcam\n\n'
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += '; TOOL DIAMETER: ' + str(p['options']['tool_dia']) + units + '\n'
|
||||
gcode += '; Spindle Speed: %s RPM\n' % str(p['spindlespeed'])
|
||||
gcode += '; Feedrate: ' + str(p['feedrate']) + units + '/min' + '\n'
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += '; Feedrate_Z: ' + str(p['z_feedrate']) + units + '/min' + '\n'
|
||||
gcode += '\n'
|
||||
gcode += '; Z_Cut: ' + str(p['z_cut']) + units + '\n'
|
||||
gcode += ';TOOL DIAMETER: ' + str(p['options']['tool_dia']) + units + '\n'
|
||||
gcode += ';Feedrate_XY: ' + str(p['feedrate']) + units + '/min' + '\n'
|
||||
gcode += ';Feedrate_Z: ' + str(p['z_feedrate']) + units + '/min' + '\n'
|
||||
gcode += ';Feedrate rapids ' + str(p['feedrate_rapid']) + units + '/min' + '\n' + '\n'
|
||||
gcode += ';Z_Cut: ' + str(p['z_cut']) + units + '\n'
|
||||
if p['multidepth'] is True:
|
||||
gcode += ';DepthPerCut: ' + str(p['z_depthpercut']) + units + ' <=>' + \
|
||||
str(math.ceil(abs(p['z_cut']) / p['z_depthpercut'])) + ' passes' + '\n'
|
||||
gcode += ';Z_Move: ' + str(p['z_move']) + units + '\n'
|
||||
|
||||
if p['multidepth'] is True:
|
||||
gcode += '; DepthPerCut: ' + str(p['z_depthpercut']) + units + ' <=>' + \
|
||||
str(math.ceil(abs(p['z_cut']) / p['z_depthpercut'])) + ' passes' + '\n'
|
||||
elif str(p['options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
gcode += '\n;TOOLS DIAMETER: \n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
gcode += ';Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["C"]) + '\n'
|
||||
|
||||
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 += '\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'
|
||||
|
||||
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 += '\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'
|
||||
|
||||
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'
|
||||
|
||||
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 += '\n'
|
||||
|
||||
if p['toolchange'] is True:
|
||||
gcode += ';Z Toolchange: ' + str(p['z_toolchange']) + units + '\n'
|
||||
|
||||
if coords_xy is not None:
|
||||
gcode += ';X,Y Toolchange: ' + "%.*f, %.*f" % (p.decimals, coords_xy[0],
|
||||
p.decimals, coords_xy[1]) + units + '\n'
|
||||
else:
|
||||
gcode += ';X,Y Toolchange: ' + "None" + units + '\n'
|
||||
|
||||
gcode += ';Z Start: ' + str(p['startz']) + units + '\n'
|
||||
gcode += ';Z End: ' + str(p['z_end']) + units + '\n'
|
||||
gcode += ';Steps per circle: ' + str(p['steps_per_circle']) + '\n'
|
||||
|
||||
gcode += '; Z_Move: ' + str(p['z_move']) + units + '\n'
|
||||
gcode += '; Z Toolchange: ' + str(p['z_toolchange']) + units + '\n'
|
||||
if coords_xy is not None:
|
||||
gcode += '; X,Y Toolchange: ' + "%.*f, %.*f" % (p.decimals, coords_xy[0],
|
||||
p.decimals, coords_xy[1]) + units + '\n'
|
||||
else:
|
||||
gcode += '; X,Y Toolchange: ' + "None" + units + '\n'
|
||||
gcode += '; Z Start: ' + str(p['startz']) + units + '\n'
|
||||
gcode += '; Z End: ' + str(p['z_end']) + 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':
|
||||
gcode += '; Preprocessor Excellon: ' + str(p['pp_excellon_name']) + '\n'
|
||||
gcode += ';Preprocessor Excellon: ' + str(p['pp_excellon_name']) + '\n' + '\n'
|
||||
else:
|
||||
gcode += '; Preprocessor Geometry: ' + str(p['pp_geometry_name']) + '\n'
|
||||
gcode += '\n'
|
||||
gcode += ';Preprocessor Geometry: ' + str(p['pp_geometry_name']) + '\n' + '\n'
|
||||
|
||||
gcode += '; X range: ' + '{: >9s}'.format(xmin) + ' ... ' + '{: >9s}'.format(xmax) + ' ' + units + '\n'
|
||||
gcode += '; Y range: ' + '{: >9s}'.format(ymin) + ' ... ' + '{: >9s}'.format(ymax) + ' ' + units + '\n'
|
||||
gcode += ';X range: ' + '{: >9s}'.format(xmin) + ' ... ' + '{: >9s}'.format(xmax) + ' ' + units + '\n'
|
||||
gcode += ';Y range: ' + '{: >9s}'.format(ymin) + ' ... ' + '{: >9s}'.format(ymax) + ' ' + units + '\n\n'
|
||||
|
||||
gcode += ';Spindle Speed: %s RPM)\n' % str(p['spindlespeed'])
|
||||
|
||||
return gcode
|
||||
|
||||
|
||||
@@ -27,42 +27,71 @@ class Marlin(FlatCAMPostProc):
|
||||
ymax = '%.*f' % (p.coords_decimals, p['options']['ymax'])
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += ';TOOL DIAMETER: ' + str(p['options']['tool_dia']) + units + '\n' + '\n'
|
||||
|
||||
gcode += ';Feedrate: ' + str(p['feedrate']) + units + '/min' + '\n'
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += ';TOOL DIAMETER: ' + str(p['options']['tool_dia']) + units + '\n'
|
||||
gcode += ';Feedrate_XY: ' + str(p['feedrate']) + units + '/min' + '\n'
|
||||
gcode += ';Feedrate_Z: ' + str(p['z_feedrate']) + units + '/min' + '\n'
|
||||
gcode += ';Feedrate rapids ' + str(p['feedrate_rapid']) + units + '/min' + '\n' + '\n'
|
||||
gcode += ';Z_Cut: ' + str(p['z_cut']) + units + '\n'
|
||||
if p['multidepth'] is True:
|
||||
gcode += ';DepthPerCut: ' + str(p['z_depthpercut']) + units + ' <=>' + \
|
||||
str(math.ceil(abs(p['z_cut']) / p['z_depthpercut'])) + ' passes' + '\n'
|
||||
gcode += ';Z_Move: ' + str(p['z_move']) + units + '\n'
|
||||
|
||||
gcode += ';Feedrate rapids: ' + str(p['feedrate_rapid']) + units + '/min' + '\n' + '\n'
|
||||
gcode += ';Z_Cut: ' + str(p['z_cut']) + units + '\n'
|
||||
elif str(p['options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
gcode += '\n;TOOLS DIAMETER: \n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
gcode += ';Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["C"]) + '\n'
|
||||
|
||||
if p['multidepth'] is True:
|
||||
gcode += ';DepthPerCut: ' + str(p['z_depthpercut']) + units + ' <=>' + \
|
||||
str(math.ceil(abs(p['z_cut']) / p['z_depthpercut'])) + ' passes' + '\n'
|
||||
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 += ';Z_Move: ' + str(p['z_move']) + units + '\n'
|
||||
gcode += ';Z Toolchange: ' + str(p['z_toolchange']) + units + '\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'
|
||||
|
||||
if coords_xy is not None:
|
||||
gcode += ';X,Y Toolchange: ' + "%.*f, %.*f" % (p.decimals, coords_xy[0],
|
||||
p.decimals, coords_xy[1]) + units + '\n'
|
||||
else:
|
||||
gcode += ';X,Y Toolchange: ' + "None" + units + '\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 += '\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'
|
||||
|
||||
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'
|
||||
|
||||
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 += '\n'
|
||||
|
||||
if p['toolchange'] is True:
|
||||
gcode += ';Z Toolchange: ' + str(p['z_toolchange']) + units + '\n'
|
||||
|
||||
if coords_xy is not None:
|
||||
gcode += ';X,Y Toolchange: ' + "%.*f, %.*f" % (p.decimals, coords_xy[0],
|
||||
p.decimals, coords_xy[1]) + units + '\n'
|
||||
else:
|
||||
gcode += ';X,Y Toolchange: ' + "None" + units + '\n'
|
||||
|
||||
gcode += ';Z Start: ' + str(p['startz']) + units + '\n'
|
||||
gcode += ';Z End: ' + str(p['z_end']) + 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':
|
||||
gcode += ';Preprocessor Excellon: ' + str(p['pp_excellon_name']) + '\n'
|
||||
gcode += ';Preprocessor Excellon: ' + str(p['pp_excellon_name']) + '\n' + '\n'
|
||||
else:
|
||||
gcode += ';Preprocessor Geometry: ' + str(p['pp_geometry_name']) + '\n' + '\n'
|
||||
|
||||
gcode += ';X range: ' + '{: >9s}'.format(xmin) + ' ... ' + '{: >9s}'.format(xmax) + ' ' + units + '\n'
|
||||
gcode += ';Y range: ' + '{: >9s}'.format(ymin) + ' ... ' + '{: >9s}'.format(ymax) + ' ' + units + '\n\n'
|
||||
|
||||
gcode += ';Spindle Speed: ' + str(p['spindlespeed']) + ' RPM' + '\n' + '\n'
|
||||
gcode += ';Spindle Speed: %s RPM)\n' % str(p['spindlespeed'])
|
||||
|
||||
gcode += ('G20' if p.units.upper() == 'IN' else 'G21') + "\n"
|
||||
gcode += 'G90'
|
||||
|
||||
@@ -27,42 +27,71 @@ class Repetier(FlatCAMPostProc):
|
||||
ymax = '%.*f' % (p.coords_decimals, p['options']['ymax'])
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += ';TOOL DIAMETER: ' + str(p['options']['tool_dia']) + units + '\n' + '\n'
|
||||
|
||||
gcode += ';Feedrate: ' + str(p['feedrate']) + units + '/min' + '\n'
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += ';TOOL DIAMETER: ' + str(p['options']['tool_dia']) + units + '\n'
|
||||
gcode += ';Feedrate_XY: ' + str(p['feedrate']) + units + '/min' + '\n'
|
||||
gcode += ';Feedrate_Z: ' + str(p['z_feedrate']) + units + '/min' + '\n'
|
||||
gcode += ';Feedrate rapids ' + str(p['feedrate_rapid']) + units + '/min' + '\n' + '\n'
|
||||
gcode += ';Z_Cut: ' + str(p['z_cut']) + units + '\n'
|
||||
if p['multidepth'] is True:
|
||||
gcode += ';DepthPerCut: ' + str(p['z_depthpercut']) + units + ' <=>' + \
|
||||
str(math.ceil(abs(p['z_cut']) / p['z_depthpercut'])) + ' passes' + '\n'
|
||||
gcode += ';Z_Move: ' + str(p['z_move']) + units + '\n'
|
||||
|
||||
gcode += ';Feedrate rapids ' + str(p['feedrate_rapid']) + units + '/min' + '\n' + '\n'
|
||||
gcode += ';Z_Cut: ' + str(p['z_cut']) + units + '\n'
|
||||
elif str(p['options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
gcode += '\n;TOOLS DIAMETER: \n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
gcode += ';Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["C"]) + '\n'
|
||||
|
||||
if p['multidepth'] is True:
|
||||
gcode += ';DepthPerCut: ' + str(p['z_depthpercut']) + units + ' <=>' + \
|
||||
str(math.ceil(abs(p['z_cut']) / p['z_depthpercut'])) + ' passes' + '\n'
|
||||
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 += ';Z_Move: ' + str(p['z_move']) + units + '\n'
|
||||
gcode += ';Z Toolchange: ' + str(p['z_toolchange']) + units + '\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'
|
||||
|
||||
if coords_xy is not None:
|
||||
gcode += ';X,Y Toolchange: ' + "%.*f, %.*f" % (p.decimals, coords_xy[0],
|
||||
p.decimals, coords_xy[1]) + units + '\n'
|
||||
else:
|
||||
gcode += ';X,Y Toolchange: ' + "None" + units + '\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 += '\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'
|
||||
|
||||
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'
|
||||
|
||||
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 += '\n'
|
||||
|
||||
if p['toolchange'] is True:
|
||||
gcode += ';Z Toolchange: ' + str(p['z_toolchange']) + units + '\n'
|
||||
|
||||
if coords_xy is not None:
|
||||
gcode += ';X,Y Toolchange: ' + "%.*f, %.*f" % (p.decimals, coords_xy[0],
|
||||
p.decimals, coords_xy[1]) + units + '\n'
|
||||
else:
|
||||
gcode += ';X,Y Toolchange: ' + "None" + units + '\n'
|
||||
|
||||
gcode += ';Z Start: ' + str(p['startz']) + units + '\n'
|
||||
gcode += ';Z End: ' + str(p['z_end']) + 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':
|
||||
gcode += ';Preprocessor Excellon: ' + str(p['pp_excellon_name']) + '\n'
|
||||
gcode += ';Preprocessor Excellon: ' + str(p['pp_excellon_name']) + '\n' + '\n'
|
||||
else:
|
||||
gcode += ';Preprocessor Geometry: ' + str(p['pp_geometry_name']) + '\n' + '\n'
|
||||
|
||||
gcode += ';X range: ' + '{: >9s}'.format(xmin) + ' ... ' + '{: >9s}'.format(xmax) + ' ' + units + '\n'
|
||||
gcode += ';Y range: ' + '{: >9s}'.format(ymin) + ' ... ' + '{: >9s}'.format(ymax) + ' ' + units + '\n\n'
|
||||
|
||||
gcode += ';Spindle Speed: ' + str(p['spindlespeed']) + ' RPM' + '\n' + '\n'
|
||||
gcode += ';Spindle Speed: %s RPM)\n' % str(p['spindlespeed'])
|
||||
|
||||
gcode += ('G20' if p.units.upper() == 'IN' else 'G21') + "\n"
|
||||
gcode += 'G90\n'
|
||||
|
||||
@@ -27,34 +27,63 @@ class Toolchange_Custom(FlatCAMPostProc):
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += '(TOOL DIAMETER: ' + str(p['options']['tool_dia']) + units + ')\n'
|
||||
|
||||
gcode += '(Feedrate: ' + str(p['feedrate']) + units + '/min' + ')\n'
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += '(Feedrate_XY: ' + str(p['feedrate']) + units + '/min' + ')\n'
|
||||
gcode += '(Feedrate_Z: ' + str(p['z_feedrate']) + units + '/min' + ')\n'
|
||||
gcode += '(Feedrate rapids ' + str(p['feedrate_rapid']) + units + '/min' + ')\n' + '\n'
|
||||
gcode += '(Z_Cut: ' + str(p['z_cut']) + units + ')\n'
|
||||
if p['multidepth'] is True:
|
||||
gcode += '(DepthPerCut: ' + str(p['z_depthpercut']) + units + ' <=>' + \
|
||||
str(math.ceil(abs(p['z_cut']) / p['z_depthpercut'])) + ' passes' + ')\n'
|
||||
gcode += '(Z_Move: ' + str(p['z_move']) + units + ')\n'
|
||||
|
||||
gcode += '(Feedrate rapids ' + str(p['feedrate_rapid']) + units + '/min' + ')\n' + '\n'
|
||||
gcode += '(Z_Cut: ' + str(p['z_cut']) + units + ')\n'
|
||||
elif str(p['options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
gcode += '\n(TOOLS DIAMETER: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["C"]) + ')\n'
|
||||
|
||||
if p['multidepth'] is True:
|
||||
gcode += '(DepthPerCut: ' + str(p['z_depthpercut']) + units + ' <=>' + \
|
||||
str(math.ceil(abs(p['z_cut']) / p['z_depthpercut'])) + ' passes' + ')\n'
|
||||
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 += '(Z_Move: ' + str(p['z_move']) + units + ')\n'
|
||||
gcode += '(Z Toolchange: ' + str(p['z_toolchange']) + units + ')\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'
|
||||
|
||||
if coords_xy is not None:
|
||||
gcode += '(X,Y Toolchange: ' + "%.*f, %.*f" % (p.decimals, coords_xy[0],
|
||||
p.decimals, coords_xy[1]) + units + ')\n'
|
||||
else:
|
||||
gcode += '(X,Y Toolchange: ' + "None" + units + ')\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 += '\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'
|
||||
|
||||
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'
|
||||
|
||||
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 += '\n'
|
||||
|
||||
if p['toolchange'] is True:
|
||||
gcode += '(Z Toolchange: ' + str(p['z_toolchange']) + units + ')\n'
|
||||
|
||||
if coords_xy is not None:
|
||||
gcode += '(X,Y Toolchange: ' + "%.*f, %.*f" % (p.decimals, coords_xy[0],
|
||||
p.decimals, coords_xy[1]) + units + ')\n'
|
||||
else:
|
||||
gcode += '(X,Y Toolchange: ' + "None" + units + ')\n'
|
||||
|
||||
gcode += '(Z Start: ' + str(p['startz']) + units + ')\n'
|
||||
gcode += '(Z End: ' + str(p['z_end']) + 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':
|
||||
gcode += '(Preprocessor Excellon: ' + str(p['pp_excellon_name']) + ')\n'
|
||||
gcode += '(Preprocessor Excellon: ' + str(p['pp_excellon_name']) + ')\n' + '\n'
|
||||
else:
|
||||
gcode += '(Preprocessor Geometry: ' + str(p['pp_geometry_name']) + ')\n' + '\n'
|
||||
|
||||
|
||||
@@ -27,36 +27,63 @@ class Toolchange_Probe_MACH3(FlatCAMPostProc):
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += '(TOOL DIAMETER: ' + str(p['options']['tool_dia']) + units + ')\n'
|
||||
|
||||
gcode += '(Feedrate: ' + str(p['feedrate']) + units + '/min' + ')\n'
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += '(Feedrate_XY: ' + str(p['feedrate']) + units + '/min' + ')\n'
|
||||
gcode += '(Feedrate_Z: ' + str(p['z_feedrate']) + units + '/min' + ')\n'
|
||||
gcode += '(Feedrate rapids ' + str(p['feedrate_rapid']) + units + '/min' + ')\n' + '\n'
|
||||
gcode += '(Z_Cut: ' + str(p['z_cut']) + units + ')\n'
|
||||
if p['multidepth'] is True:
|
||||
gcode += '(DepthPerCut: ' + str(p['z_depthpercut']) + units + ' <=>' + \
|
||||
str(math.ceil(abs(p['z_cut']) / p['z_depthpercut'])) + ' passes' + ')\n'
|
||||
gcode += '(Z_Move: ' + str(p['z_move']) + units + ')\n'
|
||||
|
||||
gcode += '(Feedrate rapids ' + str(p['feedrate_rapid']) + units + '/min' + ')\n' + '\n'
|
||||
gcode += '(Feedrate Probe ' + str(p['feedrate_probe']) + units + '/min' + ')\n' + '\n'
|
||||
gcode += '(Z_Cut: ' + str(p['z_cut']) + units + ')\n'
|
||||
elif str(p['options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
gcode += '\n(TOOLS DIAMETER: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["C"]) + ')\n'
|
||||
|
||||
if p['multidepth'] is True:
|
||||
gcode += '(DepthPerCut: ' + str(p['z_depthpercut']) + units + ' <=>' + \
|
||||
str(math.ceil(abs(p['z_cut']) / p['z_depthpercut'])) + ' passes' + ')\n'
|
||||
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 += '(Z_Move: ' + str(p['z_move']) + units + ')\n'
|
||||
gcode += '(Z Toolchange: ' + str(p['z_toolchange']) + units + ')\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'
|
||||
|
||||
if coords_xy is not None:
|
||||
gcode += '(X,Y Toolchange: ' + "%.*f, %.*f" % (p.decimals, coords_xy[0],
|
||||
p.decimals, coords_xy[1]) + units + ')\n'
|
||||
else:
|
||||
gcode += '(X,Y Toolchange: ' + "None" + units + ')\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 += '\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'
|
||||
|
||||
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'
|
||||
|
||||
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 += '\n'
|
||||
|
||||
if p['toolchange'] is True:
|
||||
gcode += '(Z Toolchange: ' + str(p['z_toolchange']) + units + ')\n'
|
||||
|
||||
if coords_xy is not None:
|
||||
gcode += '(X,Y Toolchange: ' + "%.*f, %.*f" % (p.decimals, coords_xy[0],
|
||||
p.decimals, coords_xy[1]) + units + ')\n'
|
||||
else:
|
||||
gcode += '(X,Y Toolchange: ' + "None" + units + ')\n'
|
||||
|
||||
gcode += '(Z Start: ' + str(p['startz']) + units + ')\n'
|
||||
gcode += '(Z End: ' + str(p['z_end']) + units + ')\n'
|
||||
gcode += '(Z Probe Depth: ' + str(p['z_pdepth']) + 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':
|
||||
gcode += '(Preprocessor Excellon: ' + str(p['pp_excellon_name']) + ')\n'
|
||||
gcode += '(Preprocessor Excellon: ' + str(p['pp_excellon_name']) + ')\n' + '\n'
|
||||
else:
|
||||
gcode += '(Preprocessor Geometry: ' + str(p['pp_geometry_name']) + ')\n' + '\n'
|
||||
|
||||
|
||||
@@ -27,26 +27,57 @@ class Toolchange_manual(FlatCAMPostProc):
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += '(TOOL DIAMETER: ' + str(p['options']['tool_dia']) + units + ')\n'
|
||||
|
||||
gcode += '(Feedrate: ' + str(p['feedrate']) + units + '/min' + ')\n'
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += '(Feedrate_XY: ' + str(p['feedrate']) + units + '/min' + ')\n'
|
||||
gcode += '(Feedrate_Z: ' + str(p['z_feedrate']) + units + '/min' + ')\n'
|
||||
gcode += '(Feedrate rapids ' + str(p['feedrate_rapid']) + units + '/min' + ')\n' + '\n'
|
||||
gcode += '(Z_Cut: ' + str(p['z_cut']) + units + ')\n'
|
||||
if p['multidepth'] is True:
|
||||
gcode += '(DepthPerCut: ' + str(p['z_depthpercut']) + units + ' <=>' + \
|
||||
str(math.ceil(abs(p['z_cut']) / p['z_depthpercut'])) + ' passes' + ')\n'
|
||||
gcode += '(Z_Move: ' + str(p['z_move']) + units + ')\n'
|
||||
|
||||
gcode += '(Feedrate rapids ' + str(p['feedrate_rapid']) + units + '/min' + ')\n' + '\n'
|
||||
gcode += '(Z_Cut: ' + str(p['z_cut']) + units + ')\n'
|
||||
elif str(p['options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
gcode += '\n(TOOLS DIAMETER: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["C"]) + ')\n'
|
||||
|
||||
if p['multidepth'] is True:
|
||||
gcode += '(DepthPerCut: ' + str(p['z_depthpercut']) + units + ' <=>' + \
|
||||
str(math.ceil(abs(p['z_cut']) / p['z_depthpercut'])) + ' passes' + ')\n'
|
||||
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 += '\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'
|
||||
|
||||
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 += '\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'
|
||||
|
||||
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'
|
||||
|
||||
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 += '\n'
|
||||
|
||||
if p['toolchange'] is True:
|
||||
gcode += '(Z Toolchange: ' + str(p['z_toolchange']) + units + ')\n'
|
||||
|
||||
if coords_xy is not None:
|
||||
gcode += '(X,Y Toolchange: ' + "%.*f, %.*f" % (p.decimals, coords_xy[0],
|
||||
p.decimals, coords_xy[1]) + units + ')\n'
|
||||
else:
|
||||
gcode += '(X,Y Toolchange: ' + "None" + units + ')\n'
|
||||
|
||||
gcode += '(Z_Move: ' + str(p['z_move']) + units + ')\n'
|
||||
gcode += '(Z Toolchange: ' + str(p['z_toolchange']) + units + ')\n'
|
||||
if coords_xy is not None:
|
||||
gcode += '(X,Y Toolchange: ' + "%.*f, %.*f" % (p.decimals, coords_xy[0],
|
||||
p.decimals, coords_xy[1]) + units + ')\n'
|
||||
else:
|
||||
gcode += '(X,Y Toolchange: ' + "None" + units + ')\n'
|
||||
gcode += '(Z Start: ' + str(p['startz']) + units + ')\n'
|
||||
gcode += '(Z End: ' + str(p['z_end']) + units + ')\n'
|
||||
gcode += '(Steps per circle: ' + str(p['steps_per_circle']) + ')\n'
|
||||
|
||||
@@ -28,34 +28,56 @@ class default(FlatCAMPostProc):
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += '(TOOL DIAMETER: ' + str(p['options']['tool_dia']) + units + ')\n'
|
||||
|
||||
gcode += '(Feedrate: ' + str(p['feedrate']) + units + '/min' + ')\n'
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += '(Feedrate_XY: ' + str(p['feedrate']) + units + '/min' + ')\n'
|
||||
gcode += '(Feedrate_Z: ' + str(p['z_feedrate']) + units + '/min' + ')\n'
|
||||
gcode += '(Feedrate rapids ' + str(p['feedrate_rapid']) + units + '/min' + ')\n' + '\n'
|
||||
gcode += '(Z_Cut: ' + str(p['z_cut']) + units + ')\n'
|
||||
if p['multidepth'] is True:
|
||||
gcode += '(DepthPerCut: ' + str(p['z_depthpercut']) + units + ' <=>' + \
|
||||
str(math.ceil(abs(p['z_cut']) / p['z_depthpercut'])) + ' passes' + ')\n'
|
||||
gcode += '(Z_Move: ' + str(p['z_move']) + units + ')\n'
|
||||
|
||||
gcode += '(Feedrate rapids ' + str(p['feedrate_rapid']) + units + '/min' + ')\n' + '\n'
|
||||
gcode += '(Z_Cut: ' + str(p['z_cut']) + units + ')\n'
|
||||
elif str(p['options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
gcode += '\n(TOOLS DIAMETER: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["C"]) + ')\n'
|
||||
|
||||
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 += '\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'
|
||||
|
||||
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'
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
gcode += '\n(Tools Offset: )\n'
|
||||
for tool, val in p['exc_cnc_tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(val['tool']) + 'Dia: %s -> ' % str(tool) + \
|
||||
'Offset Z: %s' % str(val['offset_z']) + ')\n'
|
||||
gcode += '(Tool: %s -> ' % str(val['tool']) + 'Offset Z: %s' % str(val['offset_z']) + ')\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'
|
||||
|
||||
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 += '\n'
|
||||
|
||||
if p['multidepth'] is True:
|
||||
gcode += '(DepthPerCut: ' + str(p['z_depthpercut']) + units + ' <=>' + \
|
||||
str(math.ceil(abs(p['z_cut']) / p['z_depthpercut'])) + ' passes' + ')\n'
|
||||
if p['toolchange'] is True:
|
||||
gcode += '(Z Toolchange: ' + str(p['z_toolchange']) + units + ')\n'
|
||||
|
||||
gcode += '(Z_Move: ' + str(p['z_move']) + units + ')\n'
|
||||
gcode += '(Z Toolchange: ' + str(p['z_toolchange']) + units + ')\n'
|
||||
|
||||
if coords_xy is not None:
|
||||
gcode += '(X,Y Toolchange: ' + "%.*f, %.*f" % (p.decimals, coords_xy[0],
|
||||
p.decimals, coords_xy[1]) + units + ')\n'
|
||||
else:
|
||||
gcode += '(X,Y Toolchange: ' + "None" + units + ')\n'
|
||||
if coords_xy is not None:
|
||||
gcode += '(X,Y Toolchange: ' + "%.*f, %.*f" % (p.decimals, coords_xy[0],
|
||||
p.decimals, coords_xy[1]) + units + ')\n'
|
||||
else:
|
||||
gcode += '(X,Y Toolchange: ' + "None" + units + ')\n'
|
||||
|
||||
gcode += '(Z Start: ' + str(p['startz']) + units + ')\n'
|
||||
gcode += '(Z End: ' + str(p['z_end']) + units + ')\n'
|
||||
|
||||
@@ -27,40 +27,71 @@ class grbl_11(FlatCAMPostProc):
|
||||
ymax = '%.*f' % (p.coords_decimals, p['options']['ymax'])
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += '(TOOL DIAMETER: ' + str(p['options']['tool_dia']) + units + ')\n' + '\n'
|
||||
|
||||
gcode += '(Feedrate: ' + str(p['feedrate']) + units + '/min' + ')\n'
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += '(TOOL DIAMETER: ' + str(p['options']['tool_dia']) + units + ')\n'
|
||||
gcode += '(Feedrate_XY: ' + str(p['feedrate']) + units + '/min' + ')\n'
|
||||
gcode += '(Feedrate_Z: ' + str(p['z_feedrate']) + units + '/min' + ')\n'
|
||||
gcode += '(Feedrate rapids ' + str(p['feedrate_rapid']) + units + '/min' + ')\n' + '\n'
|
||||
gcode += '(Z_Cut: ' + str(p['z_cut']) + units + ')\n'
|
||||
if p['multidepth'] is True:
|
||||
gcode += '(DepthPerCut: ' + str(p['z_depthpercut']) + units + ' <=>' + \
|
||||
str(math.ceil(abs(p['z_cut']) / p['z_depthpercut'])) + ' passes' + ')\n'
|
||||
gcode += '(Z_Move: ' + str(p['z_move']) + units + ')\n'
|
||||
|
||||
gcode += '(Feedrate rapids ' + str(p['feedrate_rapid']) + units + '/min' + ')\n' + '\n'
|
||||
gcode += '(Z_Cut: ' + str(p['z_cut']) + units + ')\n'
|
||||
elif str(p['options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
gcode += '\n(TOOLS DIAMETER: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["C"]) + ')\n'
|
||||
|
||||
if p['multidepth'] is True:
|
||||
gcode += '(DepthPerCut: ' + str(p['z_depthpercut']) + units + ' <=>' + \
|
||||
str(math.ceil(abs(p['z_cut']) / p['z_depthpercut'])) + ' passes' + ')\n'
|
||||
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 += '\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'
|
||||
|
||||
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 += '\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'
|
||||
|
||||
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'
|
||||
|
||||
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 += '\n'
|
||||
|
||||
if p['toolchange'] is True:
|
||||
gcode += '(Z Toolchange: ' + str(p['z_toolchange']) + units + ')\n'
|
||||
|
||||
if coords_xy is not None:
|
||||
gcode += '(X,Y Toolchange: ' + "%.*f, %.*f" % (p.decimals, coords_xy[0],
|
||||
p.decimals, coords_xy[1]) + units + ')\n'
|
||||
else:
|
||||
gcode += '(X,Y Toolchange: ' + "None" + units + ')\n'
|
||||
|
||||
gcode += '(Z_Move: ' + str(p['z_move']) + units + ')\n'
|
||||
gcode += '(Z Toolchange: ' + str(p['z_toolchange']) + units + ')\n'
|
||||
if coords_xy is not None:
|
||||
gcode += '(X,Y Toolchange: ' + "%.*f, %.*f" % (p.decimals, coords_xy[0],
|
||||
p.decimals, coords_xy[1]) + units + ')\n'
|
||||
else:
|
||||
gcode += '(X,Y Toolchange: ' + "None" + units + ')\n'
|
||||
gcode += '(Z Start: ' + str(p['startz']) + units + ')\n'
|
||||
gcode += '(Z End: ' + str(p['z_end']) + 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':
|
||||
gcode += '(Preprocessor Excellon: ' + str(p['pp_excellon_name']) + ')\n'
|
||||
gcode += '(Preprocessor Excellon: ' + str(p['pp_excellon_name']) + ')\n' + '\n'
|
||||
else:
|
||||
gcode += '(Preprocessor Geometry: ' + str(p['pp_geometry_name']) + ')\n' + '\n'
|
||||
|
||||
gcode += '(X range: ' + '{: >9s}'.format(xmin) + ' ... ' + '{: >9s}'.format(xmax) + ' ' + units + ')\n'
|
||||
gcode += '(Y range: ' + '{: >9s}'.format(ymin) + ' ... ' + '{: >9s}'.format(ymax) + ' ' + units + ')\n\n'
|
||||
|
||||
gcode += '(Spindle Speed: ' + str(p['spindlespeed']) + ' RPM' + ')\n' + '\n'
|
||||
gcode += '(Spindle Speed: %s RPM)\n' % str(p['spindlespeed'])
|
||||
|
||||
gcode += ('G20' if p.units.upper() == 'IN' else 'G21') + "\n"
|
||||
gcode += 'G90\n'
|
||||
|
||||
@@ -27,32 +27,63 @@ class line_xyz(FlatCAMPostProc):
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += '(TOOL DIAMETER: ' + str(p['options']['tool_dia']) + units + ')\n'
|
||||
|
||||
gcode += '(Feedrate: ' + str(p['feedrate']) + units + '/min' + ')\n'
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += '(Feedrate_XY: ' + str(p['feedrate']) + units + '/min' + ')\n'
|
||||
gcode += '(Feedrate_Z: ' + str(p['z_feedrate']) + units + '/min' + ')\n'
|
||||
gcode += '(Feedrate rapids ' + str(p['feedrate_rapid']) + units + '/min' + ')\n' + '\n'
|
||||
gcode += '(Z_Cut: ' + str(p['z_cut']) + units + ')\n'
|
||||
if p['multidepth'] is True:
|
||||
gcode += '(DepthPerCut: ' + str(p['z_depthpercut']) + units + ' <=>' + \
|
||||
str(math.ceil(abs(p['z_cut']) / p['z_depthpercut'])) + ' passes' + ')\n'
|
||||
gcode += '(Z_Move: ' + str(p['z_move']) + units + ')\n'
|
||||
|
||||
gcode += '(Feedrate rapids ' + str(p['feedrate_rapid']) + units + '/min' + ')\n' + '\n'
|
||||
gcode += '(Z_Cut: ' + str(p['z_cut']) + units + ')\n'
|
||||
elif str(p['options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
gcode += '\n(TOOLS DIAMETER: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["C"]) + ')\n'
|
||||
|
||||
if p['multidepth'] is True:
|
||||
gcode += '(DepthPerCut: ' + str(p['z_depthpercut']) + units + ' <=>' + \
|
||||
str(math.ceil(abs(p['z_cut']) / p['z_depthpercut'])) + ' passes' + ')\n'
|
||||
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 += '\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'
|
||||
|
||||
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 += '\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'
|
||||
|
||||
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'
|
||||
|
||||
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 += '\n'
|
||||
|
||||
if p['toolchange'] is True:
|
||||
gcode += '(Z Toolchange: ' + str(p['z_toolchange']) + units + ')\n'
|
||||
|
||||
if coords_xy is not None:
|
||||
gcode += '(X,Y Toolchange: ' + "%.*f, %.*f" % (p.decimals, coords_xy[0],
|
||||
p.decimals, coords_xy[1]) + units + ')\n'
|
||||
else:
|
||||
gcode += '(X,Y Toolchange: ' + "None" + units + ')\n'
|
||||
|
||||
gcode += '(Z_Move: ' + str(p['z_move']) + units + ')\n'
|
||||
gcode += '(Z Toolchange: ' + str(p['z_toolchange']) + units + ')\n'
|
||||
if coords_xy is not None:
|
||||
gcode += '(X,Y Toolchange: ' + "%.*f, %.*f" % (p.decimals, coords_xy[0],
|
||||
p.decimals, coords_xy[1]) + units + ')\n'
|
||||
else:
|
||||
gcode += '(X,Y Toolchange: ' + "None" + units + ')\n'
|
||||
gcode += '(Z Start: ' + str(p['startz']) + units + ')\n'
|
||||
gcode += '(Z End: ' + str(p['z_end']) + 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':
|
||||
gcode += '(Preprocessor Excellon: ' + str(p['pp_excellon_name']) + ')\n'
|
||||
gcode += '(Preprocessor Excellon: ' + str(p['pp_excellon_name']) + ')\n' + '\n'
|
||||
else:
|
||||
gcode += '(Preprocessor Geometry: ' + str(p['pp_geometry_name']) + ')\n' + '\n'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user