- fixed postprocessor files so now the bounds values are right aligned (assuming max string length of 9 chars which means 4 digits and 4 decimals)
This commit is contained in:
@@ -12,6 +12,11 @@ class marlin(FlatCAMPostProc):
|
||||
coords_xy = p['toolchange_xy']
|
||||
gcode = ''
|
||||
|
||||
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'])
|
||||
|
||||
if str(p['options']['type']) == 'Geometry':
|
||||
gcode += ';TOOL DIAMETER: ' + str(p['options']['tool_dia']) + units + '\n' + '\n'
|
||||
|
||||
@@ -45,10 +50,8 @@ class marlin(FlatCAMPostProc):
|
||||
else:
|
||||
gcode += ';Postprocessor Geometry: ' + str(p['pp_geometry_name']) + '\n' + '\n'
|
||||
|
||||
gcode += ';X min: ' + '%.*f' % (p.coords_decimals, p['options']['xmin']) + units + '\n'
|
||||
gcode += ';Y min: ' + '%.*f' % (p.coords_decimals, p['options']['ymin']) + units + '\n'
|
||||
gcode += ';X max: ' + '%.*f' % (p.coords_decimals, p['options']['xmax']) + units + '\n'
|
||||
gcode += ';Y max: ' + '%.*f' % (p.coords_decimals, p['options']['ymax']) + units + '\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'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user