- completed the refactoring of object options property to obj_options in preprocessors too
This commit is contained in:
committed by
Marius Stanciu
parent
1681b327ed
commit
f7f88a34be
@@ -25,18 +25,18 @@ class Berta_CNC(PreProc):
|
||||
end_coords_xy = p['xy_end']
|
||||
gcode = '(This preprocessor is used with a BERTA CNC router.)\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'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['options']['ymax'])
|
||||
xmin = '%.*f' % (p.coords_decimals, p['obj_options']['xmin'])
|
||||
xmax = '%.*f' % (p.coords_decimals, p['obj_options']['xmax'])
|
||||
ymin = '%.*f' % (p.coords_decimals, p['obj_options']['ymin'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['obj_options']['ymax'])
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += '(TOOL DIAMETER: ' + str(p['options']['tool_dia']) + units + ')\n'
|
||||
if str(p['obj_options']['type']) == 'Geometry':
|
||||
gcode += '(TOOL DIAMETER: ' + str(p['obj_options']['tool_dia']) + units + ')\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'
|
||||
if str(p['obj_options']['type']) == 'Geometry':
|
||||
gcode += '(TOOL DIAMETER: ' + str(p['obj_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'
|
||||
@@ -46,7 +46,7 @@ class Berta_CNC(PreProc):
|
||||
str(math.ceil(abs(p['z_cut']) / p['z_depthpercut'])) + ' passes' + ')\n'
|
||||
gcode += '(Z_Move: ' + str(p['z_move']) + units + ')\n'
|
||||
|
||||
elif str(p['options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
elif str(p['obj_options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
gcode += '\n(TOOLS DIAMETER: )\n'
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["tooldia"]) + ')\n'
|
||||
@@ -100,7 +100,7 @@ class Berta_CNC(PreProc):
|
||||
gcode += '(Steps per circle: ' + str(p['steps_per_circle']) + ')\n'
|
||||
gcode += '(Steps per circle: ' + str(p['steps_per_circle']) + ')\n'
|
||||
|
||||
if str(p['options']['type']) == 'Excellon' or str(p['options']['type']) == 'Excellon Geometry':
|
||||
if str(p['obj_options']['type']) == 'Excellon' or str(p['obj_options']['type']) == 'Excellon Geometry':
|
||||
gcode += '(Preprocessor Excellon: ' + str(p['pp_excellon_name']) + ')\n' + '\n'
|
||||
else:
|
||||
gcode += '(Preprocessor Geometry: ' + str(p['pp_geometry_name']) + ')\n' + '\n'
|
||||
@@ -157,7 +157,7 @@ class Berta_CNC(PreProc):
|
||||
|
||||
toolC_formatted = '%.*f' % (p.decimals, p.toolC)
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
if str(p['obj_options']['type']) == 'Excellon':
|
||||
no_drills = p['tools'][int(p['tool'])]['nr_drills']
|
||||
|
||||
if toolchangexy is not None:
|
||||
|
||||
@@ -23,13 +23,13 @@ class Check_points(PreProc):
|
||||
gcode += '(by moving a probe - possible a fine drill bit - to custom locations)\n'
|
||||
gcode += '(and wait for user interaction in order to continue to the next point.)\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'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['options']['ymax'])
|
||||
xmin = '%.*f' % (p.coords_decimals, p['obj_options']['xmin'])
|
||||
xmax = '%.*f' % (p.coords_decimals, p['obj_options']['xmax'])
|
||||
ymin = '%.*f' % (p.coords_decimals, p['obj_options']['ymin'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['obj_options']['ymax'])
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += '(TOOL DIAMETER: ' + str(p['options']['tool_dia']) + units + ')\n'
|
||||
if str(p['obj_options']['type']) == 'Geometry':
|
||||
gcode += '(TOOL DIAMETER: ' + str(p['obj_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'
|
||||
@@ -39,7 +39,7 @@ class Check_points(PreProc):
|
||||
str(math.ceil(abs(p['z_cut']) / p['z_depthpercut'])) + ' passes' + ')\n'
|
||||
gcode += '(Z_Move: ' + str(p['z_move']) + units + ')\n'
|
||||
|
||||
elif str(p['options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
elif str(p['obj_options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
gcode += '\n(TOOLS DIAMETER: )\n'
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["tooldia"]) + ')\n'
|
||||
@@ -92,7 +92,7 @@ class Check_points(PreProc):
|
||||
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':
|
||||
if str(p['obj_options']['type']) == 'Excellon' or str(p['obj_options']['type']) == 'Excellon Geometry':
|
||||
gcode += '(Preprocessor Excellon: ' + str(p['pp_excellon_name']) + ')\n' + '\n'
|
||||
else:
|
||||
gcode += '(Preprocessor Geometry: ' + str(p['pp_geometry_name']) + ')\n' + '\n'
|
||||
@@ -140,7 +140,7 @@ class Check_points(PreProc):
|
||||
if int(p.tool) == 1 and p.startz is not None:
|
||||
z_toolchange = p.startz
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
if str(p['obj_options']['type']) == 'Excellon':
|
||||
if toolchangexy is not None:
|
||||
gcode = """
|
||||
M5
|
||||
|
||||
@@ -22,13 +22,13 @@ class Default_no_M6(PreProc):
|
||||
gcode = '(This preprocessor is the default preprocessor used by FlatCAM.)\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'])
|
||||
ymin = '%.*f' % (p.coords_decimals, p['options']['ymin'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['options']['ymax'])
|
||||
xmin = '%.*f' % (p.coords_decimals, p['obj_options']['xmin'])
|
||||
xmax = '%.*f' % (p.coords_decimals, p['obj_options']['xmax'])
|
||||
ymin = '%.*f' % (p.coords_decimals, p['obj_options']['ymin'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['obj_options']['ymax'])
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += '(TOOL DIAMETER: ' + str(p['options']['tool_dia']) + units + ')\n'
|
||||
if str(p['obj_options']['type']) == 'Geometry':
|
||||
gcode += '(TOOL DIAMETER: ' + str(p['obj_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'
|
||||
@@ -38,7 +38,7 @@ class Default_no_M6(PreProc):
|
||||
str(math.ceil(abs(p['z_cut']) / p['z_depthpercut'])) + ' passes' + ')\n'
|
||||
gcode += '(Z_Move: ' + str(p['z_move']) + units + ')\n'
|
||||
|
||||
elif str(p['options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
elif str(p['obj_options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
gcode += '\n(TOOLS DIAMETER: )\n'
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["tooldia"]) + ')\n'
|
||||
@@ -91,7 +91,7 @@ class Default_no_M6(PreProc):
|
||||
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':
|
||||
if str(p['obj_options']['type']) == 'Excellon' or str(p['obj_options']['type']) == 'Excellon Geometry':
|
||||
gcode += '(Preprocessor Excellon: ' + str(p['pp_excellon_name']) + ')\n' + '\n'
|
||||
else:
|
||||
gcode += '(Preprocessor Geometry: ' + str(p['pp_geometry_name']) + ')\n' + '\n'
|
||||
@@ -138,7 +138,7 @@ class Default_no_M6(PreProc):
|
||||
|
||||
toolC_formatted = '%.*f' % (p.decimals, p.toolC)
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
if str(p['obj_options']['type']) == 'Excellon':
|
||||
no_drills = p['tools'][int(p['tool'])]['nr_drills']
|
||||
|
||||
if toolchangexy is not None:
|
||||
|
||||
@@ -22,13 +22,13 @@ class GRBL_11(PreProc):
|
||||
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'
|
||||
|
||||
xmin = '%.*f' % (p.coords_decimals, p['options']['xmin'])
|
||||
xmax = '%.*f' % (p.coords_decimals, p['options']['xmax'])
|
||||
ymin = '%.*f' % (p.coords_decimals, p['options']['ymin'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['options']['ymax'])
|
||||
xmin = '%.*f' % (p.coords_decimals, p['obj_options']['xmin'])
|
||||
xmax = '%.*f' % (p.coords_decimals, p['obj_options']['xmax'])
|
||||
ymin = '%.*f' % (p.coords_decimals, p['obj_options']['ymin'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['obj_options']['ymax'])
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += '(TOOL DIAMETER: ' + str(p['options']['tool_dia']) + units + ')\n'
|
||||
if str(p['obj_options']['type']) == 'Geometry':
|
||||
gcode += '(TOOL DIAMETER: ' + str(p['obj_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'
|
||||
@@ -38,7 +38,7 @@ class GRBL_11(PreProc):
|
||||
str(math.ceil(abs(p['z_cut']) / p['z_depthpercut'])) + ' passes' + ')\n'
|
||||
gcode += '(Z_Move: ' + str(p['z_move']) + units + ')\n'
|
||||
|
||||
elif str(p['options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
elif str(p['obj_options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
gcode += '\n(TOOLS DIAMETER: )\n'
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["tooldia"]) + ')\n'
|
||||
@@ -91,7 +91,7 @@ class GRBL_11(PreProc):
|
||||
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':
|
||||
if str(p['obj_options']['type']) == 'Excellon' or str(p['obj_options']['type']) == 'Excellon Geometry':
|
||||
gcode += '(Preprocessor Excellon: ' + str(p['pp_excellon_name']) + ')\n' + '\n'
|
||||
else:
|
||||
gcode += '(Preprocessor Geometry: ' + str(p['pp_geometry_name']) + ')\n' + '\n'
|
||||
@@ -139,7 +139,7 @@ class GRBL_11(PreProc):
|
||||
|
||||
toolC_formatted = '%.*f' % (p.decimals, p.toolC)
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
if str(p['obj_options']['type']) == 'Excellon':
|
||||
no_drills = p['tools'][int(p['tool'])]['nr_drills']
|
||||
|
||||
if toolchangexy is not None:
|
||||
|
||||
@@ -22,13 +22,13 @@ class GRBL_11_no_M6(PreProc):
|
||||
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. No M6 command.)\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'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['options']['ymax'])
|
||||
xmin = '%.*f' % (p.coords_decimals, p['obj_options']['xmin'])
|
||||
xmax = '%.*f' % (p.coords_decimals, p['obj_options']['xmax'])
|
||||
ymin = '%.*f' % (p.coords_decimals, p['obj_options']['ymin'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['obj_options']['ymax'])
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += '(TOOL DIAMETER: ' + str(p['options']['tool_dia']) + units + ')\n'
|
||||
if str(p['obj_options']['type']) == 'Geometry':
|
||||
gcode += '(TOOL DIAMETER: ' + str(p['obj_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'
|
||||
@@ -38,7 +38,7 @@ class GRBL_11_no_M6(PreProc):
|
||||
str(math.ceil(abs(p['z_cut']) / p['z_depthpercut'])) + ' passes' + ')\n'
|
||||
gcode += '(Z_Move: ' + str(p['z_move']) + units + ')\n'
|
||||
|
||||
elif str(p['options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
elif str(p['obj_options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
gcode += '\n(TOOLS DIAMETER: )\n'
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["tooldia"]) + ')\n'
|
||||
@@ -92,7 +92,7 @@ class GRBL_11_no_M6(PreProc):
|
||||
gcode += '(Steps per circle: ' + str(p['steps_per_circle']) + ')\n'
|
||||
gcode += '(Steps per circle: ' + str(p['steps_per_circle']) + ')\n'
|
||||
|
||||
if str(p['options']['type']) == 'Excellon' or str(p['options']['type']) == 'Excellon Geometry':
|
||||
if str(p['obj_options']['type']) == 'Excellon' or str(p['obj_options']['type']) == 'Excellon Geometry':
|
||||
gcode += '(Preprocessor Excellon: ' + str(p['pp_excellon_name']) + ')\n' + '\n'
|
||||
else:
|
||||
gcode += '(Preprocessor Geometry: ' + str(p['pp_geometry_name']) + ')\n' + '\n'
|
||||
@@ -140,7 +140,7 @@ class GRBL_11_no_M6(PreProc):
|
||||
|
||||
toolC_formatted = '%.*f' % (p.decimals, p.toolC)
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
if str(p['obj_options']['type']) == 'Excellon':
|
||||
no_drills = p['tools'][int(p['tool'])]['nr_drills']
|
||||
|
||||
if toolchangexy is not None:
|
||||
|
||||
@@ -27,15 +27,15 @@ class GRBL_laser(PreProc):
|
||||
'(It assumes a manually focused laser.)\n' \
|
||||
'(The laser is started with M3 command and stopped with the M5 command.)\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'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['options']['ymax'])
|
||||
xmin = '%.*f' % (p.coords_decimals, p['obj_options']['xmin'])
|
||||
xmax = '%.*f' % (p.coords_decimals, p['obj_options']['xmax'])
|
||||
ymin = '%.*f' % (p.coords_decimals, p['obj_options']['ymin'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['obj_options']['ymax'])
|
||||
|
||||
gcode += '(Feedrate: ' + str(p['feedrate']) + units + '/min' + ')\n'
|
||||
gcode += '(Steps per circle: ' + str(p['steps_per_circle']) + ')\n'
|
||||
|
||||
if str(p['options']['type']) == 'Excellon' or str(p['options']['type']) == 'Excellon Geometry':
|
||||
if str(p['obj_options']['type']) == 'Excellon' or str(p['obj_options']['type']) == 'Excellon Geometry':
|
||||
gcode += '(Preprocessor Excellon: ' + str(p['pp_excellon_name']) + ')\n'
|
||||
else:
|
||||
gcode += '(Preprocessor Geometry: ' + str(p['pp_geometry_name']) + ')\n' + '\n'
|
||||
|
||||
@@ -26,10 +26,10 @@ class GRBL_laser_z(PreProc):
|
||||
gcode += '(It is for the case when it is used together with a LASER connected on the SPINDLE connector.)\n'
|
||||
gcode += '(On toolchange event the laser will move to a defined Z height to change the laser dot size.)\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'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['options']['ymax'])
|
||||
xmin = '%.*f' % (p.coords_decimals, p['obj_options']['xmin'])
|
||||
xmax = '%.*f' % (p.coords_decimals, p['obj_options']['xmax'])
|
||||
ymin = '%.*f' % (p.coords_decimals, p['obj_options']['ymin'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['obj_options']['ymax'])
|
||||
|
||||
if p['use_ui'] is True and p['multigeo']:
|
||||
gcode += '\n(TOOLS DIAMETER: )\n'
|
||||
@@ -58,7 +58,7 @@ class GRBL_laser_z(PreProc):
|
||||
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':
|
||||
if str(p['obj_options']['type']) == 'Excellon' or str(p['obj_options']['type']) == 'Excellon Geometry':
|
||||
gcode += '(Preprocessor Excellon: ' + str(p['pp_excellon_name']) + ')\n'
|
||||
else:
|
||||
gcode += '(Preprocessor Geometry: ' + str(p['pp_geometry_name']) + ')\n' + '\n'
|
||||
|
||||
@@ -20,13 +20,13 @@ class ISEL_CNC(PreProc):
|
||||
end_coords_xy = p['xy_end']
|
||||
gcode = '(This preprocessor is used with a ISEL CNC router.)\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'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['options']['ymax'])
|
||||
xmin = '%.*f' % (p.coords_decimals, p['obj_options']['xmin'])
|
||||
xmax = '%.*f' % (p.coords_decimals, p['obj_options']['xmax'])
|
||||
ymin = '%.*f' % (p.coords_decimals, p['obj_options']['ymin'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['obj_options']['ymax'])
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += '(TOOL DIAMETER: ' + str(p['options']['tool_dia']) + units + ')\n'
|
||||
if str(p['obj_options']['type']) == 'Geometry':
|
||||
gcode += '(TOOL DIAMETER: ' + str(p['obj_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'
|
||||
@@ -36,7 +36,7 @@ class ISEL_CNC(PreProc):
|
||||
str(math.ceil(abs(p['z_cut']) / p['z_depthpercut'])) + ' passes' + ')\n'
|
||||
gcode += '(Z_Move: ' + str(p['z_move']) + units + ')\n'
|
||||
|
||||
elif str(p['options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
elif str(p['obj_options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
gcode += '\n(TOOLS DIAMETER: )\n'
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["tooldia"]) + ')\n'
|
||||
@@ -90,7 +90,7 @@ class ISEL_CNC(PreProc):
|
||||
gcode += '(Steps per circle: ' + str(p['steps_per_circle']) + ')\n'
|
||||
gcode += '(Steps per circle: ' + str(p['steps_per_circle']) + ')\n'
|
||||
|
||||
if str(p['options']['type']) == 'Excellon' or str(p['options']['type']) == 'Excellon Geometry':
|
||||
if str(p['obj_options']['type']) == 'Excellon' or str(p['obj_options']['type']) == 'Excellon Geometry':
|
||||
gcode += '(Preprocessor Excellon: ' + str(p['pp_excellon_name']) + ')\n' + '\n'
|
||||
else:
|
||||
gcode += '(Preprocessor Geometry: ' + str(p['pp_geometry_name']) + ')\n' + '\n'
|
||||
@@ -124,7 +124,7 @@ class ISEL_CNC(PreProc):
|
||||
|
||||
toolC_formatted = '%.*f' % (p.decimals, p.toolC)
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
if str(p['obj_options']['type']) == 'Excellon':
|
||||
no_drills = p['tools'][int(p['tool'])]['nr_drills']
|
||||
|
||||
gcode = """
|
||||
|
||||
@@ -18,15 +18,15 @@ class ISEL_ICP_CNC(PreProc):
|
||||
end_coords_xy = p['xy_end']
|
||||
gcode = '; This preprocessor is used with a ISEL ICP CNC router.\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'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['options']['ymax'])
|
||||
xmin = '%.*f' % (p.coords_decimals, p['obj_options']['xmin'])
|
||||
xmax = '%.*f' % (p.coords_decimals, p['obj_options']['xmax'])
|
||||
ymin = '%.*f' % (p.coords_decimals, p['obj_options']['ymin'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['obj_options']['ymax'])
|
||||
|
||||
gcode += 'IMF_PBL flatcam\n\n'
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += ';TOOL DIAMETER: ' + str(p['options']['tool_dia']) + units + '\n'
|
||||
if str(p['obj_options']['type']) == 'Geometry':
|
||||
gcode += ';TOOL DIAMETER: ' + str(p['obj_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'
|
||||
@@ -36,7 +36,7 @@ class ISEL_ICP_CNC(PreProc):
|
||||
str(math.ceil(abs(p['z_cut']) / p['z_depthpercut'])) + ' passes' + '\n'
|
||||
gcode += ';Z_Move: ' + str(p['z_move']) + units + '\n'
|
||||
|
||||
elif str(p['options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
elif str(p['obj_options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
gcode += '\n;TOOLS DIAMETER: \n'
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += ';Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["tooldia"]) + '\n'
|
||||
@@ -90,7 +90,7 @@ class ISEL_ICP_CNC(PreProc):
|
||||
gcode += '(Steps per circle: ' + str(p['steps_per_circle']) + ')\n'
|
||||
gcode += ';Steps per circle: ' + str(p['steps_per_circle']) + '\n'
|
||||
|
||||
if str(p['options']['type']) == 'Excellon' or str(p['options']['type']) == 'Excellon Geometry':
|
||||
if str(p['obj_options']['type']) == 'Excellon' or str(p['obj_options']['type']) == 'Excellon Geometry':
|
||||
gcode += ';Preprocessor Excellon: ' + str(p['pp_excellon_name']) + '\n' + '\n'
|
||||
else:
|
||||
gcode += ';Preprocessor Geometry: ' + str(p['pp_geometry_name']) + '\n' + '\n'
|
||||
@@ -120,8 +120,8 @@ class ISEL_ICP_CNC(PreProc):
|
||||
|
||||
toolC_formatted = '%.*f' % (p.decimals, p.toolC)
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
for i in p['options']['Tools_in_use']:
|
||||
if str(p['obj_options']['type']) == 'Excellon':
|
||||
for i in p['obj_options']['Tools_in_use']:
|
||||
if i[0] == p.tool:
|
||||
no_drills = i[2]
|
||||
|
||||
|
||||
@@ -21,13 +21,13 @@ class Line_xyz(PreProc):
|
||||
end_coords_xy = p['end_xy']
|
||||
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'])
|
||||
ymin = '%.*f' % (p.coords_decimals, p['options']['ymin'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['options']['ymax'])
|
||||
xmin = '%.*f' % (p.coords_decimals, p['obj_options']['xmin'])
|
||||
xmax = '%.*f' % (p.coords_decimals, p['obj_options']['xmax'])
|
||||
ymin = '%.*f' % (p.coords_decimals, p['obj_options']['ymin'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['obj_options']['ymax'])
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += '(TOOL DIAMETER: ' + str(p['options']['tool_dia']) + units + ')\n'
|
||||
if str(p['obj_options']['type']) == 'Geometry':
|
||||
gcode += '(TOOL DIAMETER: ' + str(p['obj_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'
|
||||
@@ -37,7 +37,7 @@ class Line_xyz(PreProc):
|
||||
str(math.ceil(abs(p['z_cut']) / p['z_depthpercut'])) + ' passes' + ')\n'
|
||||
gcode += '(Z_Move: ' + str(p['z_move']) + units + ')\n'
|
||||
|
||||
elif str(p['options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
elif str(p['obj_options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
gcode += '\n(TOOLS DIAMETER: )\n'
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["tooldia"]) + ')\n'
|
||||
@@ -91,7 +91,7 @@ class Line_xyz(PreProc):
|
||||
gcode += '(Steps per circle: ' + str(p['steps_per_circle']) + ')\n'
|
||||
gcode += '(Steps per circle: ' + str(p['steps_per_circle']) + ')\n'
|
||||
|
||||
if str(p['options']['type']) == 'Excellon' or str(p['options']['type']) == 'Excellon Geometry':
|
||||
if str(p['obj_options']['type']) == 'Excellon' or str(p['obj_options']['type']) == 'Excellon Geometry':
|
||||
gcode += '(Preprocessor Excellon: ' + str(p['pp_excellon_name']) + ')\n' + '\n'
|
||||
else:
|
||||
gcode += '(Preprocessor Geometry: ' + str(p['pp_geometry_name']) + ')\n' + '\n'
|
||||
@@ -137,7 +137,7 @@ class Line_xyz(PreProc):
|
||||
x_toolchange = xy_toolchange[0]
|
||||
y_toolchange = xy_toolchange[1]
|
||||
else:
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
if str(p['obj_options']['type']) == 'Excellon':
|
||||
x_toolchange = p.oldx
|
||||
y_toolchange = p.oldy
|
||||
else:
|
||||
@@ -151,7 +151,7 @@ class Line_xyz(PreProc):
|
||||
|
||||
toolC_formatted = '%.*f' % (p.decimals, p.toolC)
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
if str(p['obj_options']['type']) == 'Excellon':
|
||||
no_drills = p['tools'][int(p['tool'])]['nr_drills']
|
||||
|
||||
gcode = """
|
||||
|
||||
@@ -22,13 +22,13 @@ class Marlin(PreProc):
|
||||
end_coords_xy = p['xy_end']
|
||||
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'])
|
||||
ymin = '%.*f' % (p.coords_decimals, p['options']['ymin'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['options']['ymax'])
|
||||
xmin = '%.*f' % (p.coords_decimals, p['obj_options']['xmin'])
|
||||
xmax = '%.*f' % (p.coords_decimals, p['obj_options']['xmax'])
|
||||
ymin = '%.*f' % (p.coords_decimals, p['obj_options']['ymin'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['obj_options']['ymax'])
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += ';TOOL DIAMETER: ' + str(p['options']['tool_dia']) + units + '\n'
|
||||
if str(p['obj_options']['type']) == 'Geometry':
|
||||
gcode += ';TOOL DIAMETER: ' + str(p['obj_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'
|
||||
@@ -38,7 +38,7 @@ class Marlin(PreProc):
|
||||
str(math.ceil(abs(p['z_cut']) / p['z_depthpercut'])) + ' passes' + '\n'
|
||||
gcode += ';Z_Move: ' + str(p['z_move']) + units + '\n'
|
||||
|
||||
elif str(p['options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
elif str(p['obj_options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
gcode += '\n;TOOLS DIAMETER: \n'
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += ';Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["tooldia"]) + '\n'
|
||||
@@ -92,7 +92,7 @@ class Marlin(PreProc):
|
||||
gcode += ';Steps per circle: ' + str(p['steps_per_circle']) + '\n'
|
||||
gcode += ';Steps per circle: ' + str(p['steps_per_circle']) + '\n'
|
||||
|
||||
if str(p['options']['type']) == 'Excellon' or str(p['options']['type']) == 'Excellon Geometry':
|
||||
if str(p['obj_options']['type']) == 'Excellon' or str(p['obj_options']['type']) == 'Excellon Geometry':
|
||||
gcode += ';Preprocessor Excellon: ' + str(p['pp_excellon_name']) + '\n' + '\n'
|
||||
else:
|
||||
gcode += ';Preprocessor Geometry: ' + str(p['pp_geometry_name']) + '\n' + '\n'
|
||||
@@ -137,7 +137,7 @@ class Marlin(PreProc):
|
||||
|
||||
toolC_formatted = '%.*f' % (p.decimals, p.toolC)
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
if str(p['obj_options']['type']) == 'Excellon':
|
||||
no_drills = p['tools'][int(p['tool'])]['nr_drills']
|
||||
|
||||
if toolchangexy is not None:
|
||||
|
||||
@@ -25,10 +25,10 @@ class Marlin_laser_FAN_pin(PreProc):
|
||||
';It assumes a manually focused laser.\n' \
|
||||
';The laser is started with M3 command and stopped with the M5 command.\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'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['options']['ymax'])
|
||||
xmin = '%.*f' % (p.coords_decimals, p['obj_options']['xmin'])
|
||||
xmax = '%.*f' % (p.coords_decimals, p['obj_options']['xmax'])
|
||||
ymin = '%.*f' % (p.coords_decimals, p['obj_options']['ymin'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['obj_options']['ymax'])
|
||||
|
||||
gcode += ';Feedrate: ' + str(p['feedrate']) + units + '/min' + '\n'
|
||||
gcode += ';Feedrate rapids: ' + str(p['feedrate_rapid']) + units + '/min' + '\n\n'
|
||||
@@ -37,7 +37,7 @@ class Marlin_laser_FAN_pin(PreProc):
|
||||
|
||||
gcode += ';Steps per circle: ' + str(p['steps_per_circle']) + '\n'
|
||||
|
||||
if str(p['options']['type']) == 'Excellon' or str(p['options']['type']) == 'Excellon Geometry':
|
||||
if str(p['obj_options']['type']) == 'Excellon' or str(p['obj_options']['type']) == 'Excellon Geometry':
|
||||
gcode += ';Preprocessor Excellon: ' + str(p['pp_excellon_name']) + '\n'
|
||||
else:
|
||||
gcode += ';Preprocessor Geometry: ' + str(p['pp_geometry_name']) + '\n'
|
||||
|
||||
@@ -25,10 +25,10 @@ class Marlin_laser_Spindle_pin(PreProc):
|
||||
';It assumes a manually focused laser.\n' \
|
||||
';The laser is started with M3 command and stopped with the M5 command.\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'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['options']['ymax'])
|
||||
xmin = '%.*f' % (p.coords_decimals, p['obj_options']['xmin'])
|
||||
xmax = '%.*f' % (p.coords_decimals, p['obj_options']['xmax'])
|
||||
ymin = '%.*f' % (p.coords_decimals, p['obj_options']['ymin'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['obj_options']['ymax'])
|
||||
|
||||
gcode += ';Feedrate: ' + str(p['feedrate']) + units + '/min' + '\n'
|
||||
gcode += ';Feedrate rapids: ' + str(p['feedrate_rapid']) + units + '/min' + '\n' + '\n'
|
||||
@@ -37,7 +37,7 @@ class Marlin_laser_Spindle_pin(PreProc):
|
||||
|
||||
gcode += ';Steps per circle: ' + str(p['steps_per_circle']) + '\n'
|
||||
|
||||
if str(p['options']['type']) == 'Excellon' or str(p['options']['type']) == 'Excellon Geometry':
|
||||
if str(p['obj_options']['type']) == 'Excellon' or str(p['obj_options']['type']) == 'Excellon Geometry':
|
||||
gcode += ';Preprocessor Excellon: ' + str(p['pp_excellon_name']) + '\n'
|
||||
else:
|
||||
gcode += ';Preprocessor Geometry: ' + str(p['pp_geometry_name']) + '\n'
|
||||
|
||||
@@ -24,10 +24,10 @@ class Marlin_laser_z(PreProc):
|
||||
gcode += ';It is for the case when it is used together with a LASER connected on the SPINDLE connector.\n' \
|
||||
';On toolchange event the laser will move to a defined Z height to change the laser dot size.\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'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['options']['ymax'])
|
||||
xmin = '%.*f' % (p.coords_decimals, p['obj_options']['xmin'])
|
||||
xmax = '%.*f' % (p.coords_decimals, p['obj_options']['xmax'])
|
||||
ymin = '%.*f' % (p.coords_decimals, p['obj_options']['ymin'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['obj_options']['ymax'])
|
||||
|
||||
if p['use_ui'] is True and p['multigeo']:
|
||||
gcode += '\n;TOOLS DIAMETER: \n'
|
||||
@@ -51,7 +51,7 @@ class Marlin_laser_z(PreProc):
|
||||
str(val['data']["tools_mill_spindlespeed"]) + '\n'
|
||||
gcode += '\n;LASER MIN POWER: \n'
|
||||
for tool, val in p['tools'].items():
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
if str(p['obj_options']['type']) == 'Excellon':
|
||||
gcode += ';Tool: %s -> ' % str(tool) + 'Power: %s' % \
|
||||
str(val['data']["tools_drill_min_power"]) + '\n'
|
||||
else:
|
||||
@@ -78,7 +78,7 @@ class Marlin_laser_z(PreProc):
|
||||
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':
|
||||
if str(p['obj_options']['type']) == 'Excellon' or str(p['obj_options']['type']) == 'Excellon Geometry':
|
||||
gcode += ';Preprocessor Excellon: ' + str(p['pp_excellon_name']) + '\n'
|
||||
else:
|
||||
gcode += ';Preprocessor Geometry: ' + str(p['pp_geometry_name']) + '\n'
|
||||
|
||||
@@ -26,13 +26,13 @@ class NCCAD9(PreProc):
|
||||
end_coords_xy = p['xy_end']
|
||||
gcode = ';This preprocessor outputs GCode suitable for the Max Computer GmbH nccad9 Computer Numeric Control.\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'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['options']['ymax'])
|
||||
xmin = '%.*f' % (p.coords_decimals, p['obj_options']['xmin'])
|
||||
xmax = '%.*f' % (p.coords_decimals, p['obj_options']['xmax'])
|
||||
ymin = '%.*f' % (p.coords_decimals, p['obj_options']['ymin'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['obj_options']['ymax'])
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += ';TOOL DIAMETER: ' + str(p['options']['tool_dia']) + units + '\n'
|
||||
if str(p['obj_options']['type']) == 'Geometry':
|
||||
gcode += ';TOOL DIAMETER: ' + str(p['obj_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'
|
||||
@@ -42,7 +42,7 @@ class NCCAD9(PreProc):
|
||||
str(math.ceil(abs(p['z_cut']) / p['z_depthpercut'])) + ' passes' + '\n'
|
||||
gcode += ';Z_Move: ' + str(p['z_move']) + units + '\n'
|
||||
|
||||
elif str(p['options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
elif str(p['obj_options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
gcode += '\n;TOOLS DIAMETER: \n'
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += ';Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["tooldia"]) + '\n'
|
||||
@@ -96,7 +96,7 @@ class NCCAD9(PreProc):
|
||||
|
||||
gcode += ';Steps per circle: ' + str(p['steps_per_circle']) + '\n'
|
||||
|
||||
if str(p['options']['type']) == 'Excellon' or str(p['options']['type']) == 'Excellon Geometry':
|
||||
if str(p['obj_options']['type']) == 'Excellon' or str(p['obj_options']['type']) == 'Excellon Geometry':
|
||||
gcode += ';Preprocessor Excellon: ' + str(p['pp_excellon_name']) + '\n' + '\n'
|
||||
else:
|
||||
gcode += ';Preprocessor Geometry: ' + str(p['pp_geometry_name']) + '\n' + '\n'
|
||||
@@ -143,7 +143,7 @@ class NCCAD9(PreProc):
|
||||
|
||||
toolC_formatted = '%.*f' % (p.decimals, p.toolC)
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
if str(p['obj_options']['type']) == 'Excellon':
|
||||
no_drills = p['tools'][int(p['tool'])]['nr_drills']
|
||||
|
||||
if toolchangexy is not None and x_toolchange !=0.0 and y_toolchange != 0.0:
|
||||
|
||||
@@ -24,12 +24,12 @@ class Paste_1(AppPreProcTools):
|
||||
coords_xy = p['xy_toolchange']
|
||||
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'])
|
||||
ymin = '%.*f' % (p.coords_decimals, p['options']['ymin'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['options']['ymax'])
|
||||
xmin = '%.*f' % (p.coords_decimals, p['obj_options']['xmin'])
|
||||
xmax = '%.*f' % (p.coords_decimals, p['obj_options']['xmax'])
|
||||
ymin = '%.*f' % (p.coords_decimals, p['obj_options']['ymin'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['obj_options']['ymax'])
|
||||
|
||||
gcode += '(TOOL DIAMETER: ' + str(p['options']['tool_dia']) + units + ')\n'
|
||||
gcode += '(TOOL DIAMETER: ' + str(p['obj_options']['tool_dia']) + units + ')\n'
|
||||
gcode += '(Feedrate_XY: ' + str(p['frxy']) + units + '/min' + ')\n'
|
||||
gcode += '(Feedrate_Z: ' + str(p['frz']) + units + '/min' + ')\n'
|
||||
gcode += '(Feedrate_Z_Dispense: ' + str(p['frz_dispense']) + units + '/min' + ')\n'
|
||||
|
||||
@@ -22,13 +22,13 @@ class Repetier(PreProc):
|
||||
end_coords_xy = p['xy_end']
|
||||
gcode = ';This preprocessor is used with a motion controller loaded with REPETIER firmware.\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'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['options']['ymax'])
|
||||
xmin = '%.*f' % (p.coords_decimals, p['obj_options']['xmin'])
|
||||
xmax = '%.*f' % (p.coords_decimals, p['obj_options']['xmax'])
|
||||
ymin = '%.*f' % (p.coords_decimals, p['obj_options']['ymin'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['obj_options']['ymax'])
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += ';TOOL DIAMETER: ' + str(p['options']['tool_dia']) + units + '\n'
|
||||
if str(p['obj_options']['type']) == 'Geometry':
|
||||
gcode += ';TOOL DIAMETER: ' + str(p['obj_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'
|
||||
@@ -38,7 +38,7 @@ class Repetier(PreProc):
|
||||
str(math.ceil(abs(p['z_cut']) / p['z_depthpercut'])) + ' passes' + '\n'
|
||||
gcode += ';Z_Move: ' + str(p['z_move']) + units + '\n'
|
||||
|
||||
elif str(p['options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
elif str(p['obj_options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
gcode += '\n;TOOLS DIAMETER: \n'
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += ';Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["tooldia"]) + '\n'
|
||||
@@ -91,7 +91,7 @@ class Repetier(PreProc):
|
||||
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':
|
||||
if str(p['obj_options']['type']) == 'Excellon' or str(p['obj_options']['type']) == 'Excellon Geometry':
|
||||
gcode += ';Preprocessor Excellon: ' + str(p['pp_excellon_name']) + '\n' + '\n'
|
||||
else:
|
||||
gcode += ';Preprocessor Geometry: ' + str(p['pp_geometry_name']) + '\n' + '\n'
|
||||
@@ -138,7 +138,7 @@ class Repetier(PreProc):
|
||||
|
||||
toolC_formatted = '%.*f' % (p.decimals, p.toolC)
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
if str(p['obj_options']['type']) == 'Excellon':
|
||||
no_drills = p['tools'][int(p['tool'])]['nr_drills']
|
||||
|
||||
if toolchangexy is not None:
|
||||
|
||||
@@ -22,13 +22,13 @@ class Toolchange_Manual(PreProc):
|
||||
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'])
|
||||
ymin = '%.*f' % (p.coords_decimals, p['options']['ymin'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['options']['ymax'])
|
||||
xmin = '%.*f' % (p.coords_decimals, p['obj_options']['xmin'])
|
||||
xmax = '%.*f' % (p.coords_decimals, p['obj_options']['xmax'])
|
||||
ymin = '%.*f' % (p.coords_decimals, p['obj_options']['ymin'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['obj_options']['ymax'])
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += '(TOOL DIAMETER: ' + str(p['options']['tool_dia']) + units + ')\n'
|
||||
if str(p['obj_options']['type']) == 'Geometry':
|
||||
gcode += '(TOOL DIAMETER: ' + str(p['obj_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'
|
||||
@@ -38,7 +38,7 @@ class Toolchange_Manual(PreProc):
|
||||
str(math.ceil(abs(p['z_cut']) / p['z_depthpercut'])) + ' passes' + ')\n'
|
||||
gcode += '(Z_Move: ' + str(p['z_move']) + units + ')\n'
|
||||
|
||||
elif str(p['options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
elif str(p['obj_options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
gcode += '\n(TOOLS DIAMETER: )\n'
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["tooldia"]) + ')\n'
|
||||
@@ -91,7 +91,7 @@ class Toolchange_Manual(PreProc):
|
||||
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':
|
||||
if str(p['obj_options']['type']) == 'Excellon' or str(p['obj_options']['type']) == 'Excellon Geometry':
|
||||
gcode += '(Preprocessor Excellon: ' + str(p['pp_excellon_name']) + ')\n' + '\n'
|
||||
else:
|
||||
gcode += '(Preprocessor Geometry: ' + str(p['pp_geometry_name']) + ')\n' + '\n'
|
||||
@@ -139,7 +139,7 @@ class Toolchange_Manual(PreProc):
|
||||
|
||||
toolC_formatted = '%.*f' % (p.decimals, p.toolC)
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
if str(p['obj_options']['type']) == 'Excellon':
|
||||
no_drills = p['tools'][int(p['tool'])]['nr_drills']
|
||||
|
||||
if toolchangexy is not None:
|
||||
|
||||
@@ -21,13 +21,13 @@ class Toolchange_Probe_MACH3(PreProc):
|
||||
end_coords_xy = p['xy_end']
|
||||
gcode = '(This preprocessor is used with MACH3 with probing height.)\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'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['options']['ymax'])
|
||||
xmin = '%.*f' % (p.coords_decimals, p['obj_options']['xmin'])
|
||||
xmax = '%.*f' % (p.coords_decimals, p['obj_options']['xmax'])
|
||||
ymin = '%.*f' % (p.coords_decimals, p['obj_options']['ymin'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['obj_options']['ymax'])
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += '(TOOL DIAMETER: ' + str(p['options']['tool_dia']) + units + ')\n'
|
||||
if str(p['obj_options']['type']) == 'Geometry':
|
||||
gcode += '(TOOL DIAMETER: ' + str(p['obj_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'
|
||||
@@ -37,7 +37,7 @@ class Toolchange_Probe_MACH3(PreProc):
|
||||
str(math.ceil(abs(p['z_cut']) / p['z_depthpercut'])) + ' passes' + ')\n'
|
||||
gcode += '(Z_Move: ' + str(p['z_move']) + units + ')\n'
|
||||
|
||||
elif str(p['options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
elif str(p['obj_options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
gcode += '\n(TOOLS DIAMETER: )\n'
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["tooldia"]) + ')\n'
|
||||
@@ -90,7 +90,7 @@ class Toolchange_Probe_MACH3(PreProc):
|
||||
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':
|
||||
if str(p['obj_options']['type']) == 'Excellon' or str(p['obj_options']['type']) == 'Excellon Geometry':
|
||||
gcode += '(Preprocessor Excellon: ' + str(p['pp_excellon_name']) + ')\n' + '\n'
|
||||
else:
|
||||
gcode += '(Preprocessor Geometry: ' + str(p['pp_geometry_name']) + ')\n' + '\n'
|
||||
@@ -138,7 +138,7 @@ class Toolchange_Probe_MACH3(PreProc):
|
||||
|
||||
toolC_formatted = '%.*f' % (p.decimals, p.toolC)
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
if str(p['obj_options']['type']) == 'Excellon':
|
||||
no_drills = p['tools'][int(p['tool'])]['nr_drills']
|
||||
|
||||
if toolchangexy is not None:
|
||||
|
||||
@@ -22,13 +22,13 @@ class default(PreProc):
|
||||
gcode = '(This preprocessor is the default preprocessor.)\n'
|
||||
gcode += '(It is made to work with MACH3 compatible motion controllers.)\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'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['options']['ymax'])
|
||||
xmin = '%.*f' % (p.coords_decimals, p['obj_options']['xmin'])
|
||||
xmax = '%.*f' % (p.coords_decimals, p['obj_options']['xmax'])
|
||||
ymin = '%.*f' % (p.coords_decimals, p['obj_options']['ymin'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['obj_options']['ymax'])
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += '(TOOL DIAMETER: ' + str(p['options']['tool_dia']) + units + ')\n'
|
||||
if str(p['obj_options']['type']) == 'Geometry':
|
||||
gcode += '(TOOL DIAMETER: ' + str(p['obj_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'
|
||||
@@ -38,7 +38,7 @@ class default(PreProc):
|
||||
str(math.ceil(abs(p['z_cut']) / p['z_depthpercut'])) + ' passes' + ')\n'
|
||||
gcode += '(Z_Move: ' + str(p['z_move']) + units + ')\n'
|
||||
|
||||
elif str(p['options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
elif str(p['obj_options']['type']) == 'Excellon' and p['use_ui'] is True:
|
||||
gcode += '\n(TOOLS DIAMETER: )\n'
|
||||
for tool, val in p['tools'].items():
|
||||
gcode += '(Tool: %s -> ' % str(tool) + 'Dia: %s' % str(val["tooldia"]) + ')\n'
|
||||
@@ -91,7 +91,7 @@ class default(PreProc):
|
||||
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':
|
||||
if str(p['obj_options']['type']) == 'Excellon' or str(p['obj_options']['type']) == 'Excellon Geometry':
|
||||
gcode += '(Preprocessor Excellon: ' + str(p['pp_excellon_name']) + ')\n' + '\n'
|
||||
else:
|
||||
gcode += '(Preprocessor Geometry: ' + str(p['pp_geometry_name']) + ')\n' + '\n'
|
||||
@@ -145,7 +145,7 @@ class default(PreProc):
|
||||
|
||||
toolC_formatted = '%.*f' % (p.decimals, p.toolC)
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
if str(p['obj_options']['type']) == 'Excellon':
|
||||
no_drills = p['tools'][int(p['tool'])]['nr_drills']
|
||||
|
||||
if toolchangexy is not None:
|
||||
|
||||
@@ -25,15 +25,15 @@ class default_laser(PreProc):
|
||||
'(It assumes a manually focused laser.)\n' \
|
||||
'(The laser is started with M3 command and stopped with the M5 command.)\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'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['options']['ymax'])
|
||||
xmin = '%.*f' % (p.coords_decimals, p['obj_options']['xmin'])
|
||||
xmax = '%.*f' % (p.coords_decimals, p['obj_options']['xmax'])
|
||||
ymin = '%.*f' % (p.coords_decimals, p['obj_options']['ymin'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['obj_options']['ymax'])
|
||||
|
||||
gcode += '(Feedrate: ' + str(p['feedrate']) + units + '/min' + ')\n'
|
||||
gcode += '(Steps per circle: ' + str(p['steps_per_circle']) + ')\n'
|
||||
|
||||
if str(p['options']['type']) == 'Excellon' or str(p['options']['type']) == 'Excellon Geometry':
|
||||
if str(p['obj_options']['type']) == 'Excellon' or str(p['obj_options']['type']) == 'Excellon Geometry':
|
||||
gcode += '(Preprocessor Excellon: ' + str(p['pp_excellon_name']) + ')\n'
|
||||
else:
|
||||
gcode += '(Preprocessor Geometry: ' + str(p['pp_geometry_name']) + ')\n' + '\n'
|
||||
|
||||
@@ -31,14 +31,14 @@ class grbl_laser_eleks_drd(PreProc):
|
||||
gcode += '(The moves are only on horizontal plane X-Y. There are no Z moves.)\n'
|
||||
gcode += '(Assumes manual laser focussing.)\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'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['options']['ymax'])
|
||||
xmin = '%.*f' % (p.coords_decimals, p['obj_options']['xmin'])
|
||||
xmax = '%.*f' % (p.coords_decimals, p['obj_options']['xmax'])
|
||||
ymin = '%.*f' % (p.coords_decimals, p['obj_options']['ymin'])
|
||||
ymax = '%.*f' % (p.coords_decimals, p['obj_options']['ymax'])
|
||||
gcode += '(Feedrate: ' + str(p['feedrate']) + units + '/min' + ')\n'
|
||||
gcode += '(Feedrate rapids ' + str(p['feedrate_rapid']) + units + '/min' + ')\n'
|
||||
gcode += '(Steps per circle: ' + str(p['steps_per_circle']) + ')\n'
|
||||
if str(p['options']['type']) == 'Excellon' or str(p['options']['type']) == 'Excellon Geometry':
|
||||
if str(p['obj_options']['type']) == 'Excellon' or str(p['obj_options']['type']) == 'Excellon Geometry':
|
||||
gcode += '(Preprocessor Excellon: ' + str(p['pp_excellon_name']) + ')\n'
|
||||
else:
|
||||
gcode += '(Preprocessor Geometry: ' + str(p['pp_geometry_name']) + ')\n'
|
||||
@@ -75,7 +75,7 @@ class grbl_laser_eleks_drd(PreProc):
|
||||
else:
|
||||
gcode = 'M03'
|
||||
gcode += ';down'
|
||||
if str(p['options']['type']) == 'Excellon' or str(p['options']['type']) == 'Excellon Geometry':
|
||||
if str(p['obj_options']['type']) == 'Excellon' or str(p['obj_options']['type']) == 'Excellon Geometry':
|
||||
gcode += '\n'
|
||||
gcode += 'G02 ' # Draw Top Little Arc
|
||||
gcode += ('X' + self.coordinate_format + ' Y' + self.coordinate_format) % \
|
||||
@@ -136,7 +136,7 @@ class grbl_laser_eleks_drd(PreProc):
|
||||
|
||||
def rapid_code(self, p):
|
||||
gcode = 'G00 '
|
||||
if str(p['options']['type']) == 'Excellon' or str(p['options']['type']) == 'Excellon Geometry':
|
||||
if str(p['obj_options']['type']) == 'Excellon' or str(p['obj_options']['type']) == 'Excellon Geometry':
|
||||
gcode += (self.position_ldos_code(p)).format(**p)
|
||||
else:
|
||||
gcode += (self.position_code(p)).format(**p)
|
||||
|
||||
Reference in New Issue
Block a user