- upgraded the Drilling Plugin and all the related parts in the CNCJob Object and in all preprocessors. Now, the parent 'tools' attribute is inherited and also the GCode is stored here
This commit is contained in:
@@ -48,36 +48,36 @@ class Berta_CNC(PreProc):
|
||||
|
||||
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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["tooldia"]) + ')\n'
|
||||
|
||||
gcode += '\n(FEEDRATE Z: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Feedrate Rapids: %s' % \
|
||||
str(val['data']["tools_drill_feedrate_rapid"]) + ')\n'
|
||||
|
||||
gcode += '\n(Z_CUT: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
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' % \
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'DeptPerCut: %s' % \
|
||||
str(val['data']["tools_drill_depthperpass"]) + ')\n'
|
||||
|
||||
gcode += '\n(Z_MOVE: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Z_Move: %s' % str(val['data']["tools_drill_travelz"]) + ')\n'
|
||||
gcode += '\n'
|
||||
|
||||
@@ -158,9 +158,7 @@ class Berta_CNC(PreProc):
|
||||
toolC_formatted = '%.*f' % (p.decimals, p.toolC)
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
for i in p['options']['Tools_in_use']:
|
||||
if i[0] == p.tool:
|
||||
no_drills = i[2]
|
||||
no_drills = p['tools'][int(p['tool'])]['nr_drills']
|
||||
|
||||
if toolchangexy is not None:
|
||||
gcode = """
|
||||
|
||||
@@ -41,36 +41,36 @@ class Check_points(PreProc):
|
||||
|
||||
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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["tooldia"]) + ')\n'
|
||||
|
||||
gcode += '\n(FEEDRATE Z: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Feedrate Rapids: %s' % \
|
||||
str(val['data']["tools_drill_feedrate_rapid"]) + ')\n'
|
||||
|
||||
gcode += '\n(Z_CUT: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
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' % \
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'DeptPerCut: %s' % \
|
||||
str(val['data']["tools_drill_depthperpass"]) + ')\n'
|
||||
|
||||
gcode += '\n(Z_MOVE: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Z_Move: %s' % str(val['data']["tools_drill_travelz"]) + ')\n'
|
||||
gcode += '\n'
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ class Default_no_M6(PreProc):
|
||||
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'
|
||||
gcode += '(It is made to work with MACH3 compatible motion controllers and has no M6 coommand)\n\n'
|
||||
|
||||
xmin = '%.*f' % (p.coords_decimals, p['options']['xmin'])
|
||||
xmax = '%.*f' % (p.coords_decimals, p['options']['xmax'])
|
||||
@@ -40,36 +40,36 @@ class Default_no_M6(PreProc):
|
||||
|
||||
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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["tooldia"]) + ')\n'
|
||||
|
||||
gcode += '\n(FEEDRATE Z: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Feedrate Rapids: %s' % \
|
||||
str(val['data']["tools_drill_feedrate_rapid"]) + ')\n'
|
||||
|
||||
gcode += '\n(Z_CUT: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
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' % \
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'DeptPerCut: %s' % \
|
||||
str(val['data']["tools_drill_depthperpass"]) + ')\n'
|
||||
|
||||
gcode += '\n(Z_MOVE: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Z_Move: %s' % str(val['data']["tools_drill_travelz"]) + ')\n'
|
||||
gcode += '\n'
|
||||
|
||||
@@ -139,9 +139,7 @@ class Default_no_M6(PreProc):
|
||||
toolC_formatted = '%.*f' % (p.decimals, p.toolC)
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
for i in p['options']['Tools_in_use']:
|
||||
if i[0] == p.tool:
|
||||
no_drills = i[2]
|
||||
no_drills = p['tools'][int(p['tool'])]['nr_drills']
|
||||
|
||||
if toolchangexy is not None:
|
||||
gcode = """
|
||||
|
||||
@@ -40,36 +40,36 @@ class GRBL_11(PreProc):
|
||||
|
||||
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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["tooldia"]) + ')\n'
|
||||
|
||||
gcode += '\n(FEEDRATE Z: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Feedrate Rapids: %s' % \
|
||||
str(val['data']["tools_drill_feedrate_rapid"]) + ')\n'
|
||||
|
||||
gcode += '\n(Z_CUT: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
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' % \
|
||||
gcode += '(Tool: %s -> ' % str(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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'DeptPerCut: %s' % \
|
||||
str(val['data']["tools_drill_depthperpass"]) + ')\n'
|
||||
|
||||
gcode += '\n(Z_MOVE: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Z_Move: %s' % str(val['data']["tools_drill_travelz"]) + ')\n'
|
||||
gcode += '\n'
|
||||
|
||||
@@ -141,9 +141,7 @@ class GRBL_11(PreProc):
|
||||
toolC_formatted = '%.*f' % (p.decimals, p.toolC)
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
for i in p['options']['Tools_in_use']:
|
||||
if i[0] == p.tool:
|
||||
no_drills = i[2]
|
||||
no_drills = p['tools'][int(p['tool'])]['nr_drills']
|
||||
|
||||
if toolchangexy is not None:
|
||||
gcode = """
|
||||
|
||||
@@ -20,7 +20,7 @@ class GRBL_11_no_M6(PreProc):
|
||||
coords_xy = p['xy_toolchange']
|
||||
end_coords_xy = p['xy_end']
|
||||
gcode = '(This preprocessor is used with a motion controller loaded with GRBL firmware.)\n'
|
||||
gcode += '(It is configured to be compatible with almost any version of GRBL firmware.)\n\n'
|
||||
gcode += '(It is configured to be compatible with almost any version of GRBL firmware. No M6 command.)\n\n'
|
||||
|
||||
xmin = '%.*f' % (p.coords_decimals, p['options']['xmin'])
|
||||
xmax = '%.*f' % (p.coords_decimals, p['options']['xmax'])
|
||||
@@ -40,36 +40,36 @@ class GRBL_11_no_M6(PreProc):
|
||||
|
||||
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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["tooldia"]) + ')\n'
|
||||
|
||||
gcode += '\n(FEEDRATE Z: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Feedrate Rapids: %s' % \
|
||||
str(val['data']["tools_drill_feedrate_rapid"]) + ')\n'
|
||||
|
||||
gcode += '\n(Z_CUT: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
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' % \
|
||||
gcode += '(Tool: %s -> ' % str(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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'DeptPerCut: %s' % \
|
||||
str(val['data']["tools_drill_depthperpass"]) + ')\n'
|
||||
|
||||
gcode += '\n(Z_MOVE: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Z_Move: %s' % str(val['data']["tools_drill_travelz"]) + ')\n'
|
||||
gcode += '\n'
|
||||
|
||||
@@ -141,9 +141,7 @@ class GRBL_11_no_M6(PreProc):
|
||||
toolC_formatted = '%.*f' % (p.decimals, p.toolC)
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
for i in p['options']['Tools_in_use']:
|
||||
if i[0] == p.tool:
|
||||
no_drills = i[2]
|
||||
no_drills = p['tools'][int(p['tool'])]['nr_drills']
|
||||
|
||||
if toolchangexy is not None:
|
||||
gcode = """
|
||||
|
||||
@@ -38,36 +38,36 @@ class ISEL_CNC(PreProc):
|
||||
|
||||
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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["tooldia"]) + ')\n'
|
||||
|
||||
gcode += '\n(FEEDRATE Z: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Feedrate Rapids: %s' % \
|
||||
str(val['data']["tools_drill_feedrate_rapid"]) + ')\n'
|
||||
|
||||
gcode += '\n(Z_CUT: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
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' % \
|
||||
gcode += '(Tool: %s -> ' % str(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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'DeptPerCut: %s' % \
|
||||
str(val['data']["tools_drill_depthperpass"]) + ')\n'
|
||||
|
||||
gcode += '\n(Z_MOVE: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Z_Move: %s' % str(val['data']["tools_drill_travelz"]) + ')\n'
|
||||
gcode += '\n'
|
||||
|
||||
@@ -125,9 +125,7 @@ class ISEL_CNC(PreProc):
|
||||
toolC_formatted = '%.*f' % (p.decimals, p.toolC)
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
for i in p['options']['Tools_in_use']:
|
||||
if i[0] == p.tool:
|
||||
no_drills = i[2]
|
||||
no_drills = p['tools'][int(p['tool'])]['nr_drills']
|
||||
|
||||
gcode = """
|
||||
M05
|
||||
|
||||
@@ -38,36 +38,36 @@ class ISEL_ICP_CNC(PreProc):
|
||||
|
||||
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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += ';Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["tooldia"]) + '\n'
|
||||
|
||||
gcode += '\n;FEEDRATE Z: \n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += ';Tool: %s -> ' % str(tool) + 'Feedrate Rapids: %s' % \
|
||||
str(val['data']["tools_drill_feedrate_rapid"]) + '\n'
|
||||
|
||||
gcode += '\n;Z_CUT: \n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
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' % \
|
||||
gcode += ';Tool: %s -> ' % str(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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += ';Tool: %s -> ' % str(tool) + 'DeptPerCut: %s' % \
|
||||
str(val['data']["tools_drill_depthperpass"]) + '\n'
|
||||
|
||||
gcode += '\n;Z_MOVE: \n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += ';Tool: %s -> ' % str(tool) + 'Z_Move: %s' % str(val['data']["tools_drill_travelz"]) + '\n'
|
||||
gcode += '\n'
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ class Line_xyz(PreProc):
|
||||
units = ' ' + str(p['units']).lower()
|
||||
coords_xy = p['xy_toolchange']
|
||||
end_coords_xy = p['end_xy']
|
||||
gcode = ''
|
||||
gcode = '(This preprocessor has all the coordinates on the same line: X, Y, Z.)\n\n'
|
||||
|
||||
xmin = '%.*f' % (p.coords_decimals, p['options']['xmin'])
|
||||
xmax = '%.*f' % (p.coords_decimals, p['options']['xmax'])
|
||||
@@ -39,36 +39,36 @@ class Line_xyz(PreProc):
|
||||
|
||||
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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["tooldia"]) + ')\n'
|
||||
|
||||
gcode += '\n(FEEDRATE Z: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Feedrate Rapids: %s' % \
|
||||
str(val['data']["tools_drill_feedrate_rapid"]) + ')\n'
|
||||
|
||||
gcode += '\n(Z_CUT: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
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' % \
|
||||
gcode += '(Tool: %s -> ' % str(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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'DeptPerCut: %s' % \
|
||||
str(val['data']["tools_drill_depthperpass"]) + ')\n'
|
||||
|
||||
gcode += '\n(Z_MOVE: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Z_Move: %s' % str(val['data']["tools_drill_travelz"]) + ')\n'
|
||||
gcode += '\n'
|
||||
|
||||
@@ -152,9 +152,8 @@ class Line_xyz(PreProc):
|
||||
toolC_formatted = '%.*f' % (p.decimals, p.toolC)
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
for i in p['options']['Tools_in_use']:
|
||||
if i[0] == p.tool:
|
||||
no_drills = i[2]
|
||||
no_drills = p['tools'][int(p['tool'])]['nr_drills']
|
||||
|
||||
gcode = """
|
||||
M5
|
||||
G00 X{x_toolchange} Y{x_toolchange} Z{z_toolchange}
|
||||
|
||||
@@ -20,7 +20,7 @@ class Marlin(PreProc):
|
||||
units = ' ' + str(p['units']).lower()
|
||||
coords_xy = p['xy_toolchange']
|
||||
end_coords_xy = p['xy_end']
|
||||
gcode = ''
|
||||
gcode = ';This preprocessor works with controllers with Marlin firmware.'
|
||||
|
||||
xmin = '%.*f' % (p.coords_decimals, p['options']['xmin'])
|
||||
xmax = '%.*f' % (p.coords_decimals, p['options']['xmax'])
|
||||
@@ -40,36 +40,36 @@ class Marlin(PreProc):
|
||||
|
||||
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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += ';Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["tooldia"]) + '\n'
|
||||
|
||||
gcode += '\n;FEEDRATE Z: \n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += ';Tool: %s -> ' % str(tool) + 'Feedrate Rapids: %s' % \
|
||||
str(val['data']["tools_drill_feedrate_rapid"]) + '\n'
|
||||
|
||||
gcode += '\n;Z_CUT: \n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
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' % \
|
||||
gcode += ';Tool: %s -> ' % str(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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += ';Tool: %s -> ' % str(tool) + 'DeptPerCut: %s' % \
|
||||
str(val['data']["tools_drill_depthperpass"]) + '\n'
|
||||
|
||||
gcode += '\n;Z_MOVE: \n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += ';Tool: %s -> ' % str(tool) + 'Z_Move: %s' % str(val['data']["tools_drill_travelz"]) + '\n'
|
||||
gcode += '\n'
|
||||
|
||||
@@ -139,9 +139,7 @@ class Marlin(PreProc):
|
||||
toolC_formatted = '%.*f' % (p.decimals, p.toolC)
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
for i in p['options']['Tools_in_use']:
|
||||
if i[0] == p.tool:
|
||||
no_drills = i[2]
|
||||
no_drills = p['tools'][int(p['tool'])]['nr_drills']
|
||||
|
||||
if toolchangexy is not None:
|
||||
gcode = """
|
||||
|
||||
@@ -19,7 +19,7 @@ class Paste_1(AppPreProcTools):
|
||||
units = ' ' + str(p['units']).lower()
|
||||
coords_xy = [float(eval(a)) for a in p['xy_toolchange'].split(",") if a != '']
|
||||
|
||||
gcode = ''
|
||||
gcode = '(This preprocessor is to be used only with the SolderPaste Plugin.)\n\n'
|
||||
|
||||
xmin = '%.*f' % (p.coords_decimals, p['options']['xmin'])
|
||||
xmax = '%.*f' % (p.coords_decimals, p['options']['xmax'])
|
||||
|
||||
@@ -40,36 +40,36 @@ class Repetier(PreProc):
|
||||
|
||||
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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += ';Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["tooldia"]) + '\n'
|
||||
|
||||
gcode += '\n;FEEDRATE Z: \n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += ';Tool: %s -> ' % str(tool) + 'Feedrate Rapids: %s' % \
|
||||
str(val['data']["tools_drill_feedrate_rapid"]) + '\n'
|
||||
|
||||
gcode += '\n;Z_CUT: \n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
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' % \
|
||||
gcode += ';Tool: %s -> ' % str(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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += ';Tool: %s -> ' % str(tool) + 'DeptPerCut: %s' % \
|
||||
str(val['data']["tools_drill_depthperpass"]) + '\n'
|
||||
|
||||
gcode += '\n;Z_MOVE: \n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += ';Tool: %s -> ' % str(tool) + 'Z_Move: %s' % str(val['data']["tools_drill_travelz"]) + '\n'
|
||||
gcode += '\n'
|
||||
|
||||
@@ -139,9 +139,7 @@ class Repetier(PreProc):
|
||||
toolC_formatted = '%.*f' % (p.decimals, p.toolC)
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
for i in p['options']['Tools_in_use']:
|
||||
if i[0] == p.tool:
|
||||
no_drills = i[2]
|
||||
no_drills = p['tools'][int(p['tool'])]['nr_drills']
|
||||
|
||||
if toolchangexy is not None:
|
||||
gcode = """
|
||||
|
||||
@@ -19,7 +19,8 @@ class Toolchange_Manual(PreProc):
|
||||
units = ' ' + str(p['units']).lower()
|
||||
coords_xy = p['xy_toolchange']
|
||||
end_coords_xy = p['xy_end']
|
||||
gcode = ''
|
||||
gcode = '(This preprocessor has a special sequence when doing a toolchange.)\n'
|
||||
gcode += '(Compatible with MACH3,)\n\n'
|
||||
|
||||
xmin = '%.*f' % (p.coords_decimals, p['options']['xmin'])
|
||||
xmax = '%.*f' % (p.coords_decimals, p['options']['xmax'])
|
||||
@@ -39,36 +40,36 @@ class Toolchange_Manual(PreProc):
|
||||
|
||||
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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["tooldia"]) + ')\n'
|
||||
|
||||
gcode += '\n(FEEDRATE Z: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Feedrate Rapids: %s' % \
|
||||
str(val['data']["tools_drill_feedrate_rapid"]) + ')\n'
|
||||
|
||||
gcode += '\n(Z_CUT: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
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' % \
|
||||
gcode += '(Tool: %s -> ' % str(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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'DeptPerCut: %s' % \
|
||||
str(val['data']["tools_drill_depthperpass"]) + ')\n'
|
||||
|
||||
gcode += '\n(Z_MOVE: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Z_Move: %s' % str(val['data']["tools_drill_travelz"]) + ')\n'
|
||||
gcode += '\n'
|
||||
|
||||
@@ -139,9 +140,7 @@ class Toolchange_Manual(PreProc):
|
||||
toolC_formatted = '%.*f' % (p.decimals, p.toolC)
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
for i in p['options']['Tools_in_use']:
|
||||
if i[0] == p.tool:
|
||||
no_drills = i[2]
|
||||
no_drills = p['tools'][int(p['tool'])]['nr_drills']
|
||||
|
||||
if toolchangexy is not None:
|
||||
gcode = """
|
||||
|
||||
@@ -39,36 +39,36 @@ class Toolchange_Probe_MACH3(PreProc):
|
||||
|
||||
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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["tooldia"]) + ')\n'
|
||||
|
||||
gcode += '\n(FEEDRATE Z: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Feedrate Rapids: %s' % \
|
||||
str(val['data']["tools_drill_feedrate_rapid"]) + ')\n'
|
||||
|
||||
gcode += '\n(Z_CUT: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
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' % \
|
||||
gcode += '(Tool: %s -> ' % str(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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'DeptPerCut: %s' % \
|
||||
str(val['data']["tools_drill_depthperpass"]) + ')\n'
|
||||
|
||||
gcode += '\n(Z_MOVE: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Z_Move: %s' % str(val['data']["tools_drill_travelz"]) + ')\n'
|
||||
gcode += '\n'
|
||||
|
||||
@@ -139,9 +139,7 @@ class Toolchange_Probe_MACH3(PreProc):
|
||||
toolC_formatted = '%.*f' % (p.decimals, p.toolC)
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
for i in p['options']['Tools_in_use']:
|
||||
if i[0] == p.tool:
|
||||
no_drills = i[2]
|
||||
no_drills = p['tools'][int(p['tool'])]['nr_drills']
|
||||
|
||||
if toolchangexy is not None:
|
||||
gcode = """
|
||||
|
||||
@@ -40,36 +40,36 @@ class default(PreProc):
|
||||
|
||||
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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["tooldia"]) + ')\n'
|
||||
|
||||
gcode += '\n(FEEDRATE Z: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Feedrate Rapids: %s' % \
|
||||
str(val['data']["tools_drill_feedrate_rapid"]) + ')\n'
|
||||
|
||||
gcode += '\n(Z_CUT: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
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' % \
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(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():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'DeptPerCut: %s' % \
|
||||
str(val['data']["tools_drill_depthperpass"]) + ')\n'
|
||||
|
||||
gcode += '\n(Z_MOVE: )\n'
|
||||
for tool, val in p['exc_tools'].items():
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Z_Move: %s' % str(val['data']["tools_drill_travelz"]) + ')\n'
|
||||
gcode += '\n'
|
||||
|
||||
@@ -139,9 +139,7 @@ class default(PreProc):
|
||||
toolC_formatted = '%.*f' % (p.decimals, p.toolC)
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
for i in p['options']['Tools_in_use']:
|
||||
if i[0] == p.tool:
|
||||
no_drills = i[2]
|
||||
no_drills = p['tools'][int(p['tool'])]['nr_drills']
|
||||
|
||||
if toolchangexy is not None:
|
||||
gcode = """
|
||||
|
||||
@@ -22,7 +22,9 @@ class grbl_laser_eleks_drd(PreProc):
|
||||
|
||||
def start_code(self, p):
|
||||
units = ' ' + str(p['units']).lower()
|
||||
gcode = ''
|
||||
gcode = '(This preprocessor is made to work with Laser cutters.)\n'
|
||||
gcode += '(It allows movement on the Z axis.)\n\n'
|
||||
|
||||
xmin = '%.*f' % (p.coords_decimals, p['options']['xmin'])
|
||||
xmax = '%.*f' % (p.coords_decimals, p['options']['xmax'])
|
||||
ymin = '%.*f' % (p.coords_decimals, p['options']['ymin'])
|
||||
|
||||
Reference in New Issue
Block a user