- updated the preprocessor files
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
# ########################################################## ##
|
||||
# ##########################################################
|
||||
# FlatCAM: 2D Post-processing for Manufacturing #
|
||||
# http://flatcam.org #
|
||||
# File Author: Matthieu Berthomé #
|
||||
# Date: 5/26/2017 #
|
||||
# MIT Licence #
|
||||
# ########################################################## ##
|
||||
# ##########################################################
|
||||
|
||||
from FlatCAMPostProc import *
|
||||
|
||||
@@ -72,25 +72,27 @@ class default(FlatCAMPostProc):
|
||||
|
||||
def startz_code(self, p):
|
||||
if p.startz is not None:
|
||||
return 'G00 Z' + self.coordinate_format%(p.coords_decimals, p.startz)
|
||||
return 'G00 Z' + self.coordinate_format % (p.coords_decimals, p.startz)
|
||||
else:
|
||||
return ''
|
||||
|
||||
def lift_code(self, p):
|
||||
return 'G00 Z' + self.coordinate_format%(p.coords_decimals, p.z_move)
|
||||
return 'G00 Z' + self.coordinate_format % (p.coords_decimals, p.z_move)
|
||||
|
||||
def down_code(self, p):
|
||||
return 'G01 Z' + self.coordinate_format%(p.coords_decimals, p.z_cut)
|
||||
return 'G01 Z' + self.coordinate_format % (p.coords_decimals, p.z_cut)
|
||||
|
||||
def toolchange_code(self, p):
|
||||
z_toolchange = p.z_toolchange
|
||||
toolchangexy = p.xy_toolchange
|
||||
f_plunge = p.f_plunge
|
||||
gcode = ''
|
||||
|
||||
if toolchangexy is not None:
|
||||
x_toolchange = toolchangexy[0]
|
||||
y_toolchange = toolchangexy[1]
|
||||
else:
|
||||
x_toolchange = 0.0
|
||||
y_toolchange = 0.0
|
||||
|
||||
no_drills = 1
|
||||
|
||||
@@ -164,7 +166,7 @@ M6
|
||||
(MSG, Change to Tool Dia = {toolC})
|
||||
M0
|
||||
G00 Z{z_toolchange}
|
||||
""".format(z_toolchange=self.coordinate_format%(p.coords_decimals, z_toolchange),
|
||||
""".format(z_toolchange=self.coordinate_format % (p.coords_decimals, z_toolchange),
|
||||
tool=int(p.tool),
|
||||
toolC=toolC_formatted)
|
||||
|
||||
@@ -187,17 +189,17 @@ G00 Z{z_toolchange}
|
||||
|
||||
def end_code(self, p):
|
||||
coords_xy = p['xy_toolchange']
|
||||
gcode = ('G00 Z' + self.feedrate_format %(p.fr_decimals, p.z_end) + "\n")
|
||||
gcode = ('G00 Z' + self.feedrate_format % (p.fr_decimals, p.z_end) + "\n")
|
||||
|
||||
if coords_xy is not None:
|
||||
gcode += 'G00 X{x} Y{y}'.format(x=coords_xy[0], y=coords_xy[1]) + "\n"
|
||||
return gcode
|
||||
|
||||
def feedrate_code(self, p):
|
||||
return 'G01 F' + str(self.feedrate_format %(p.fr_decimals, p.feedrate))
|
||||
return 'G01 F' + str(self.feedrate_format % (p.fr_decimals, p.feedrate))
|
||||
|
||||
def z_feedrate_code(self, p):
|
||||
return 'G01 F' + str(self.feedrate_format %(p.fr_decimals, p.z_feedrate))
|
||||
return 'G01 F' + str(self.feedrate_format % (p.fr_decimals, p.z_feedrate))
|
||||
|
||||
def spindle_code(self, p):
|
||||
sdir = {'CW': 'M03', 'CCW': 'M04'}[p.spindledir]
|
||||
@@ -210,5 +212,5 @@ G00 Z{z_toolchange}
|
||||
if p.dwelltime:
|
||||
return 'G4 P' + str(p.dwelltime)
|
||||
|
||||
def spindle_stop_code(self,p):
|
||||
def spindle_stop_code(self, p):
|
||||
return 'M05'
|
||||
|
||||
Reference in New Issue
Block a user