- added a new parameter named 'End Move X,Y' for the Geometry and Excellon objects. Adding a tuple of coordinates in this field will control the X,Y position of the final move; not entering a value there will cause not to make an end move
This commit is contained in:
@@ -227,10 +227,10 @@ M0""".format(z_toolchange=self.coordinate_format % (p.coords_decimals, z_toolcha
|
||||
return ('G01 ' + self.position_code(p)).format(**p)
|
||||
|
||||
def end_code(self, p):
|
||||
coords_xy = p['xy_toolchange']
|
||||
coords_xy = p['xy_end']
|
||||
gcode = ('G00 Z' + self.feedrate_format % (p.fr_decimals, p.z_end) + "\n")
|
||||
|
||||
if coords_xy is not None:
|
||||
if coords_xy != '':
|
||||
gcode += 'G00 X{x} Y{y}'.format(x=coords_xy[0], y=coords_xy[1]) + "\n"
|
||||
|
||||
gcode += '(Berta)\n'
|
||||
|
||||
@@ -83,10 +83,10 @@ class GRBL_laser(FlatCAMPostProc):
|
||||
' F' + str(self.feedrate_format % (p.fr_decimals, p.feedrate))
|
||||
|
||||
def end_code(self, p):
|
||||
coords_xy = p['xy_toolchange']
|
||||
coords_xy = p['xy_end']
|
||||
gcode = ('G00 Z' + self.feedrate_format % (p.fr_decimals, p.z_end) + "\n")
|
||||
|
||||
if coords_xy is not None:
|
||||
if coords_xy != '':
|
||||
gcode += 'G00 X{x} Y{y}'.format(x=coords_xy[0], y=coords_xy[1]) + "\n"
|
||||
return gcode
|
||||
|
||||
|
||||
@@ -157,10 +157,10 @@ M01""".format(tool=int(p.tool), toolC=toolC_formatted)
|
||||
return ('G01 ' + self.position_code(p)).format(**p)
|
||||
|
||||
def end_code(self, p):
|
||||
coords_xy = p['xy_toolchange']
|
||||
coords_xy = p['xy_end']
|
||||
gcode = ('G00 Z' + self.feedrate_format % (p.fr_decimals, p.z_end) + "\n")
|
||||
|
||||
if coords_xy is not None:
|
||||
if coords_xy != '':
|
||||
gcode += 'G00 X{x} Y{y}'.format(x=coords_xy[0], y=coords_xy[1]) + "\n"
|
||||
return gcode
|
||||
|
||||
|
||||
@@ -215,10 +215,10 @@ G0 Z{z_toolchange}
|
||||
return ('G1 ' + self.position_code(p)).format(**p) + " " + self.inline_feedrate_code(p)
|
||||
|
||||
def end_code(self, p):
|
||||
coords_xy = p['xy_toolchange']
|
||||
coords_xy = p['xy_end']
|
||||
gcode = ('G0 Z' + self.feedrate_format % (p.fr_decimals, p.z_end) + " " + self.feedrate_rapid_code(p) + "\n")
|
||||
|
||||
if coords_xy is not None:
|
||||
if coords_xy != '':
|
||||
gcode += 'G0 X{x} Y{y}'.format(x=coords_xy[0], y=coords_xy[1]) + " " + self.feedrate_rapid_code(p) + "\n"
|
||||
|
||||
return gcode
|
||||
|
||||
@@ -85,10 +85,10 @@ class Marlin_laser_use_FAN_pin(FlatCAMPostProc):
|
||||
return ('G1 ' + self.position_code(p)).format(**p) + " " + self.inline_feedrate_code(p)
|
||||
|
||||
def end_code(self, p):
|
||||
coords_xy = p['xy_toolchange']
|
||||
coords_xy = p['xy_end']
|
||||
gcode = ('G0 Z' + self.feedrate_format % (p.fr_decimals, p.z_end) + " " + self.feedrate_rapid_code(p) + "\n")
|
||||
|
||||
if coords_xy is not None:
|
||||
if coords_xy != '':
|
||||
gcode += 'G0 X{x} Y{y}'.format(x=coords_xy[0], y=coords_xy[1]) + " " + self.feedrate_rapid_code(p) + "\n"
|
||||
|
||||
return gcode
|
||||
|
||||
@@ -86,10 +86,10 @@ class Marlin_laser_use_Spindle_pin(FlatCAMPostProc):
|
||||
return ('G1 ' + self.position_code(p)).format(**p) + " " + self.inline_feedrate_code(p)
|
||||
|
||||
def end_code(self, p):
|
||||
coords_xy = p['xy_toolchange']
|
||||
coords_xy = p['xy_end']
|
||||
gcode = ('G0 Z' + self.feedrate_format % (p.fr_decimals, p.z_end) + " " + self.feedrate_rapid_code(p) + "\n")
|
||||
|
||||
if coords_xy is not None:
|
||||
if coords_xy != '':
|
||||
gcode += 'G0 X{x} Y{y}'.format(x=coords_xy[0], y=coords_xy[1]) + " " + self.feedrate_rapid_code(p) + "\n"
|
||||
|
||||
return gcode
|
||||
|
||||
@@ -122,10 +122,10 @@ G00 Z{z_toolchange}
|
||||
return ('G01 ' + self.position_code(p)).format(**p)
|
||||
|
||||
def end_code(self, p):
|
||||
coords_xy = [float(eval(a)) for a in p['xy_toolchange'].split(",") if a != '']
|
||||
coords_xy = [float(eval(a)) for a in p['xy_end'].split(",") if a != '']
|
||||
gcode = ('G00 Z' + self.feedrate_format % (p.fr_decimals, float(p['z_toolchange'])) + "\n")
|
||||
|
||||
if coords_xy is not None:
|
||||
if coords_xy != '':
|
||||
gcode += 'G00 X{x} Y{y}'.format(x=coords_xy[0], y=coords_xy[1]) + "\n"
|
||||
return gcode
|
||||
|
||||
|
||||
@@ -206,10 +206,10 @@ G0 Z{z_toolchange}
|
||||
return ('G1 ' + self.position_code(p)).format(**p) + " " + self.inline_feedrate_code(p)
|
||||
|
||||
def end_code(self, p):
|
||||
coords_xy = p['xy_toolchange']
|
||||
coords_xy = p['xy_end']
|
||||
gcode = ('G0 Z' + self.feedrate_format % (p.fr_decimals, p.z_end) + " " + self.feedrate_rapid_code(p) + "\n")
|
||||
|
||||
if coords_xy is not None:
|
||||
if coords_xy != '':
|
||||
gcode += 'G0 X{x} Y{y}'.format(x=coords_xy[0], y=coords_xy[1]) + " " + self.feedrate_rapid_code(p) + "\n"
|
||||
|
||||
return gcode
|
||||
|
||||
@@ -173,10 +173,10 @@ M6
|
||||
return ('G01 ' + self.position_code(p)).format(**p)
|
||||
|
||||
def end_code(self, p):
|
||||
coords_xy = p['xy_toolchange']
|
||||
coords_xy = p['xy_end']
|
||||
gcode = ('G00 Z' + self.feedrate_format % (p.fr_decimals, p.z_end) + "\n")
|
||||
|
||||
if coords_xy is not None:
|
||||
if coords_xy != '':
|
||||
gcode += 'G00 X{x} Y{y}'.format(x=coords_xy[0], y=coords_xy[1]) + "\n"
|
||||
return gcode
|
||||
|
||||
|
||||
@@ -272,10 +272,10 @@ M0
|
||||
return ('G01 ' + self.position_code(p)).format(**p)
|
||||
|
||||
def end_code(self, p):
|
||||
coords_xy = p['xy_toolchange']
|
||||
coords_xy = p['xy_end']
|
||||
gcode = ('G00 Z' + self.feedrate_format % (p.fr_decimals, p.z_end) + "\n")
|
||||
|
||||
if coords_xy is not None:
|
||||
if coords_xy != '':
|
||||
gcode += 'G00 X{x} Y{y}'.format(x=coords_xy[0], y=coords_xy[1]) + "\n"
|
||||
return gcode
|
||||
|
||||
|
||||
@@ -235,12 +235,11 @@ M0
|
||||
return ('G01 ' + self.position_code(p)).format(**p)
|
||||
|
||||
def end_code(self, p):
|
||||
coords_xy = p['xy_toolchange']
|
||||
coords_xy = p['xy_end']
|
||||
gcode = ('G00 Z' + self.feedrate_format % (p.fr_decimals, p.z_end) + "\n")
|
||||
if coords_xy is not None:
|
||||
|
||||
if coords_xy != '':
|
||||
gcode += 'G00 X{x} Y{y}'.format(x=coords_xy[0], y=coords_xy[1]) + "\n"
|
||||
else:
|
||||
gcode += 'G00 X0 Y0' + "\n"
|
||||
return gcode
|
||||
|
||||
def feedrate_code(self, p):
|
||||
|
||||
@@ -217,11 +217,11 @@ G00 Z{z_toolchange}
|
||||
return ('G01 ' + self.position_code(p)).format(**p)
|
||||
|
||||
def end_code(self, p):
|
||||
coords_xy = p['xy_toolchange']
|
||||
end_coords_xy = p['xy_end']
|
||||
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"
|
||||
if end_coords_xy != '':
|
||||
gcode += 'G00 X{x} Y{y}'.format(x=end_coords_xy[0], y=end_coords_xy[1]) + "\n"
|
||||
return gcode
|
||||
|
||||
def feedrate_code(self, p):
|
||||
|
||||
@@ -218,10 +218,10 @@ G00 Z{z_toolchange}
|
||||
' F' + str(self.feedrate_format % (p.fr_decimals, p.feedrate))
|
||||
|
||||
def end_code(self, p):
|
||||
coords_xy = p['xy_toolchange']
|
||||
coords_xy = p['xy_end']
|
||||
gcode = ('G00 Z' + self.feedrate_format % (p.fr_decimals, p.z_end) + "\n")
|
||||
|
||||
if coords_xy is not None:
|
||||
if coords_xy != '':
|
||||
gcode += 'G00 X{x} Y{y}'.format(x=coords_xy[0], y=coords_xy[1]) + "\n"
|
||||
return gcode
|
||||
|
||||
|
||||
@@ -206,8 +206,8 @@ M0""".format(x_toolchange=self.coordinate_format % (p.coords_decimals, x_toolcha
|
||||
return g
|
||||
|
||||
def end_code(self, p):
|
||||
coords_xy = p['xy_toolchange']
|
||||
if coords_xy is not None:
|
||||
coords_xy = p['xy_end']
|
||||
if coords_xy != '':
|
||||
g = 'G00 X{x} Y{y}'.format(x=coords_xy[0], y=coords_xy[1]) + "\n"
|
||||
else:
|
||||
g = ('G00 ' + self.position_code(p)).format(**p)
|
||||
|
||||
Reference in New Issue
Block a user