- application wide change: introduced the precision parameters in Edit -> Preferences who will control how many decimals to use in the app parameters
This commit is contained in:
@@ -47,7 +47,8 @@ class Berta_CNC(FlatCAMPostProc):
|
||||
gcode += '(Z Toolchange: ' + str(p['z_toolchange']) + units + ')\n'
|
||||
|
||||
if coords_xy is not None:
|
||||
gcode += '(X,Y Toolchange: ' + "%.4f, %.4f" % (coords_xy[0], coords_xy[1]) + units + ')\n'
|
||||
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'
|
||||
|
||||
@@ -110,10 +111,7 @@ class Berta_CNC(FlatCAMPostProc):
|
||||
if int(p.tool) == 1 and p.startz is not None:
|
||||
z_toolchange = p.startz
|
||||
|
||||
if p.units.upper() == 'MM':
|
||||
toolC_formatted = format(p.toolC, '.2f')
|
||||
else:
|
||||
toolC_formatted = format(p.toolC, '.4f')
|
||||
toolC_formatted = '%.*f' % (p.decimals, p.toolC)
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
for i in p['options']['Tools_in_use']:
|
||||
|
||||
@@ -44,7 +44,8 @@ class ISEL_CNC(FlatCAMPostProc):
|
||||
gcode += '(Z Toolchange: ' + str(p['z_toolchange']) + units + ')\n'
|
||||
|
||||
if coords_xy is not None:
|
||||
gcode += '(X,Y Toolchange: ' + "%.4f, %.4f" % (coords_xy[0], coords_xy[1]) + units + ')\n'
|
||||
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'
|
||||
|
||||
@@ -84,10 +85,7 @@ class ISEL_CNC(FlatCAMPostProc):
|
||||
f_plunge = p.f_plunge
|
||||
no_drills = 1
|
||||
|
||||
if p.units.upper() == 'MM':
|
||||
toolC_formatted = format(p.toolC, '.2f')
|
||||
else:
|
||||
toolC_formatted = format(p.toolC, '.4f')
|
||||
toolC_formatted = '%.*f' % (p.decimals, p.toolC)
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
for i in p['options']['Tools_in_use']:
|
||||
|
||||
@@ -36,7 +36,8 @@ class Paste_1(FlatCAMPostProc_Tools):
|
||||
gcode += '(Z_Travel: ' + str(p['z_travel']) + units + ')\n'
|
||||
gcode += '(Z Toolchange: ' + str(p['z_toolchange']) + units + ')\n'
|
||||
|
||||
gcode += '(X,Y Toolchange: ' + "%.4f, %.4f" % (coords_xy[0], coords_xy[1]) + units + ')\n'
|
||||
gcode += '(X,Y Toolchange: ' + "%.*f, %.*f" % (p.decimals, coords_xy[0],
|
||||
p.decimals, coords_xy[1]) + units + ')\n'
|
||||
|
||||
if 'Paste' in p.pp_solderpaste_name:
|
||||
gcode += '(Postprocessor SolderPaste Dispensing Geometry: ' + str(p.pp_solderpaste_name) + ')\n' + '\n'
|
||||
@@ -74,11 +75,11 @@ class Paste_1(FlatCAMPostProc_Tools):
|
||||
if toolchangexy is not None:
|
||||
x_toolchange = toolchangexy[0]
|
||||
y_toolchange = toolchangexy[1]
|
||||
|
||||
if p.units.upper() == 'MM':
|
||||
toolC_formatted = format(float(p['toolC']), '.2f')
|
||||
else:
|
||||
toolC_formatted = format(float(p['toolC']), '.4f')
|
||||
x_toolchange = 0.0
|
||||
y_toolchange = 0.0
|
||||
|
||||
toolC_formatted = '%.*f' % (p.decimals, float(p['toolC']))
|
||||
|
||||
if toolchangexy is not None:
|
||||
gcode = """
|
||||
|
||||
@@ -45,7 +45,8 @@ class Repetier(FlatCAMPostProc):
|
||||
gcode += ';Z Toolchange: ' + str(p['z_toolchange']) + units + '\n'
|
||||
|
||||
if coords_xy is not None:
|
||||
gcode += ';X,Y Toolchange: ' + "%.4f, %.4f" % (coords_xy[0], coords_xy[1]) + units + '\n'
|
||||
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'
|
||||
|
||||
@@ -95,10 +96,7 @@ class Repetier(FlatCAMPostProc):
|
||||
if int(p.tool) == 1 and p.startz is not None:
|
||||
z_toolchange = p.startz
|
||||
|
||||
if p.units.upper() == 'MM':
|
||||
toolC_formatted = format(p.toolC, '.2f')
|
||||
else:
|
||||
toolC_formatted = format(p.toolC, '.4f')
|
||||
toolC_formatted = '%.*f' % (p.decimals, p.toolC)
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
for i in p['options']['Tools_in_use']:
|
||||
|
||||
@@ -44,7 +44,8 @@ class Toolchange_Custom(FlatCAMPostProc):
|
||||
gcode += '(Z Toolchange: ' + str(p['z_toolchange']) + units + ')\n'
|
||||
|
||||
if coords_xy is not None:
|
||||
gcode += '(X,Y Toolchange: ' + "%.4f, %.4f" % (coords_xy[0], coords_xy[1]) + units + ')\n'
|
||||
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'
|
||||
|
||||
@@ -93,10 +94,7 @@ class Toolchange_Custom(FlatCAMPostProc):
|
||||
if int(p.tool) == 1 and p.startz is not None:
|
||||
z_toolchange = p.startz
|
||||
|
||||
if p.units.upper() == 'MM':
|
||||
toolC_formatted = format(p.toolC, '.2f')
|
||||
else:
|
||||
toolC_formatted = format(p.toolC, '.4f')
|
||||
toolC_formatted = '%.*f' % (p.decimals, p.toolC)
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
for i in p['options']['Tools_in_use']:
|
||||
|
||||
@@ -45,7 +45,8 @@ class Toolchange_Probe_MACH3(FlatCAMPostProc):
|
||||
gcode += '(Z Toolchange: ' + str(p['z_toolchange']) + units + ')\n'
|
||||
|
||||
if coords_xy is not None:
|
||||
gcode += '(X,Y Toolchange: ' + "%.4f, %.4f" % (coords_xy[0], coords_xy[1]) + units + ')\n'
|
||||
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'
|
||||
|
||||
@@ -99,10 +100,7 @@ class Toolchange_Probe_MACH3(FlatCAMPostProc):
|
||||
if int(p.tool) == 1 and p.startz is not None:
|
||||
z_toolchange = p.startz
|
||||
|
||||
if p.units.upper() == 'MM':
|
||||
toolC_formatted = format(p.toolC, '.2f')
|
||||
else:
|
||||
toolC_formatted = format(p.toolC, '.4f')
|
||||
toolC_formatted = '%.*f' % (p.decimals, p.toolC)
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
for i in p['options']['Tools_in_use']:
|
||||
|
||||
@@ -43,7 +43,8 @@ class Toolchange_manual(FlatCAMPostProc):
|
||||
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: ' + "%.4f, %.4f" % (coords_xy[0], coords_xy[1]) + units + ')\n'
|
||||
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'
|
||||
@@ -97,10 +98,7 @@ class Toolchange_manual(FlatCAMPostProc):
|
||||
if int(p.tool) == 1 and p.startz is not None:
|
||||
z_toolchange = p.startz
|
||||
|
||||
if p.units.upper() == 'MM':
|
||||
toolC_formatted = format(p.toolC, '.2f')
|
||||
else:
|
||||
toolC_formatted = format(p.toolC, '.4f')
|
||||
toolC_formatted = '%.*f' % (p.decimals, p.toolC)
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
for i in p['options']['Tools_in_use']:
|
||||
|
||||
@@ -44,7 +44,8 @@ class default(FlatCAMPostProc):
|
||||
gcode += '(Z Toolchange: ' + str(p['z_toolchange']) + units + ')\n'
|
||||
|
||||
if coords_xy is not None:
|
||||
gcode += '(X,Y Toolchange: ' + "%.4f, %.4f" % (coords_xy[0], coords_xy[1]) + units + ')\n'
|
||||
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'
|
||||
|
||||
@@ -95,10 +96,7 @@ class default(FlatCAMPostProc):
|
||||
if int(p.tool) == 1 and p.startz is not None:
|
||||
z_toolchange = p.startz
|
||||
|
||||
if p.units.upper() == 'MM':
|
||||
toolC_formatted = format(p.toolC, '.2f')
|
||||
else:
|
||||
toolC_formatted = format(p.toolC, '.4f')
|
||||
toolC_formatted = '%.*f' % (p.decimals, p.toolC)
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
for i in p['options']['Tools_in_use']:
|
||||
|
||||
@@ -43,7 +43,8 @@ class grbl_11(FlatCAMPostProc):
|
||||
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: ' + "%.4f, %.4f" % (coords_xy[0], coords_xy[1]) + units + ')\n'
|
||||
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'
|
||||
@@ -94,10 +95,7 @@ class grbl_11(FlatCAMPostProc):
|
||||
if int(p.tool) == 1 and p.startz is not None:
|
||||
z_toolchange = p.startz
|
||||
|
||||
if p.units.upper() == 'MM':
|
||||
toolC_formatted = format(p.toolC, '.2f')
|
||||
else:
|
||||
toolC_formatted = format(p.toolC, '.4f')
|
||||
toolC_formatted = '%.*f' % (p.decimals, p.toolC)
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
for i in p['options']['Tools_in_use']:
|
||||
|
||||
@@ -43,7 +43,8 @@ class line_xyz(FlatCAMPostProc):
|
||||
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: ' + "%.4f, %.4f" % (coords_xy[0], coords_xy[1]) + units + ')\n'
|
||||
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'
|
||||
@@ -109,10 +110,7 @@ class line_xyz(FlatCAMPostProc):
|
||||
if int(p.tool) == 1 and p.startz is not None:
|
||||
z_toolchange = p.startz
|
||||
|
||||
if p.units.upper() == 'MM':
|
||||
toolC_formatted = format(p.toolC, '.2f')
|
||||
else:
|
||||
toolC_formatted = format(p.toolC, '.4f')
|
||||
toolC_formatted = '%.*f' % (p.decimals, p.toolC)
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
for i in p['options']['Tools_in_use']:
|
||||
|
||||
@@ -45,7 +45,8 @@ class marlin(FlatCAMPostProc):
|
||||
gcode += ';Z Toolchange: ' + str(p['z_toolchange']) + units + '\n'
|
||||
|
||||
if coords_xy is not None:
|
||||
gcode += ';X,Y Toolchange: ' + "%.4f, %.4f" % (coords_xy[0], coords_xy[1]) + units + '\n'
|
||||
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'
|
||||
|
||||
@@ -95,10 +96,7 @@ class marlin(FlatCAMPostProc):
|
||||
if int(p.tool) == 1 and p.startz is not None:
|
||||
z_toolchange = p.startz
|
||||
|
||||
if p.units.upper() == 'MM':
|
||||
toolC_formatted = format(p.toolC, '.2f')
|
||||
else:
|
||||
toolC_formatted = format(p.toolC, '.4f')
|
||||
toolC_formatted = '%.*f' % (p.decimals, p.toolC)
|
||||
|
||||
if str(p['options']['type']) == 'Excellon':
|
||||
for i in p['options']['Tools_in_use']:
|
||||
|
||||
Reference in New Issue
Block a user