- added a parameter ('Fast plunge' in Edit -> Preferences -> Geometry Options and Excellon Options) to control if the fast move to Z_move is done or not

This commit is contained in:
Marius Stanciu
2019-01-31 13:58:49 +02:00
committed by Marius
parent 965e7f48ed
commit 3c355f72be
9 changed files with 83 additions and 18 deletions

View File

@@ -67,6 +67,7 @@ class default(FlatCAMPostProc):
def toolchange_code(self, p):
toolchangez = p.toolchangez
toolchangexy = p.toolchange_xy
f_plunge = p.f_plunge
gcode = ''
if toolchangexy is not None:
@@ -111,8 +112,8 @@ M0""".format(toolchangez=self.coordinate_format % (p.coords_decimals, toolchange
tool=int(p.tool),
t_drills=no_drills,
toolC=toolC_formatted)
gcode += 'G00 Z%.*f' % (p.coords_decimals, p.z_move)
if f_plunge is True:
gcode += '\nG00 Z%.*f' % (p.coords_decimals, p.z_move)
return gcode
else:
@@ -138,7 +139,8 @@ M0""".format(toolchangez=self.coordinate_format%(p.coords_decimals, toolchangez)
tool=int(p.tool),
toolC=toolC_formatted)
gcode += 'G00 Z%.*f' % (p.coords_decimals, p.z_move)
if f_plunge is True:
gcode += '\nG00 Z%.*f' % (p.coords_decimals, p.z_move)
return gcode
def up_to_zero_code(self, p):