- solved issue #381 where there was an error when trying to generate CNCJob out of an Excellon file that have a tool with only slots and no drills

- solved some issues in the preprocessors regarding the newly introduced feature that allow control of the final move X,Y positions
This commit is contained in:
Marius Stanciu
2020-02-28 17:59:15 +02:00
committed by Marius
parent 69607816d0
commit c5e4d72db8
16 changed files with 73 additions and 45 deletions

View File

@@ -230,7 +230,7 @@ M0""".format(z_toolchange=self.coordinate_format % (p.coords_decimals, z_toolcha
coords_xy = p['xy_end']
gcode = ('G00 Z' + self.feedrate_format % (p.fr_decimals, p.z_end) + "\n")
if coords_xy != '':
if coords_xy and coords_xy != '':
gcode += 'G00 X{x} Y{y}'.format(x=coords_xy[0], y=coords_xy[1]) + "\n"
gcode += '(Berta)\n'

View File

@@ -86,7 +86,7 @@ class GRBL_laser(FlatCAMPostProc):
coords_xy = p['xy_end']
gcode = ('G00 Z' + self.feedrate_format % (p.fr_decimals, p.z_end) + "\n")
if coords_xy != '':
if coords_xy and coords_xy != '':
gcode += 'G00 X{x} Y{y}'.format(x=coords_xy[0], y=coords_xy[1]) + "\n"
return gcode

View File

@@ -160,7 +160,7 @@ M01""".format(tool=int(p.tool), toolC=toolC_formatted)
coords_xy = p['xy_end']
gcode = ('G00 Z' + self.feedrate_format % (p.fr_decimals, p.z_end) + "\n")
if coords_xy != '':
if coords_xy and coords_xy != '':
gcode += 'G00 X{x} Y{y}'.format(x=coords_xy[0], y=coords_xy[1]) + "\n"
return gcode

View File

@@ -218,7 +218,7 @@ G0 Z{z_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 != '':
if coords_xy and 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

View File

@@ -88,7 +88,7 @@ class Marlin_laser_FAN_pin(FlatCAMPostProc):
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 != '':
if coords_xy and 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

View File

@@ -89,7 +89,7 @@ class Marlin_laser_Spindle_pin(FlatCAMPostProc):
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 != '':
if coords_xy and 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

View File

@@ -125,7 +125,7 @@ G00 Z{z_toolchange}
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 != '':
if coords_xy and coords_xy != '':
gcode += 'G00 X{x} Y{y}'.format(x=coords_xy[0], y=coords_xy[1]) + "\n"
return gcode

View File

@@ -209,7 +209,7 @@ G0 Z{z_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 != '':
if coords_xy and 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

View File

@@ -176,7 +176,7 @@ M6
coords_xy = p['xy_end']
gcode = ('G00 Z' + self.feedrate_format % (p.fr_decimals, p.z_end) + "\n")
if coords_xy != '':
if coords_xy and coords_xy != '':
gcode += 'G00 X{x} Y{y}'.format(x=coords_xy[0], y=coords_xy[1]) + "\n"
return gcode

View File

@@ -238,7 +238,7 @@ M0
coords_xy = p['xy_end']
gcode = ('G00 Z' + self.feedrate_format % (p.fr_decimals, p.z_end) + "\n")
if coords_xy != '':
if coords_xy and coords_xy != '':
gcode += 'G00 X{x} Y{y}'.format(x=coords_xy[0], y=coords_xy[1]) + "\n"
return gcode

View File

@@ -275,7 +275,7 @@ M0
coords_xy = p['xy_end']
gcode = ('G00 Z' + self.feedrate_format % (p.fr_decimals, p.z_end) + "\n")
if coords_xy != '':
if coords_xy and coords_xy != '':
gcode += 'G00 X{x} Y{y}'.format(x=coords_xy[0], y=coords_xy[1]) + "\n"
return gcode

View File

@@ -220,7 +220,7 @@ G00 Z{z_toolchange}
end_coords_xy = p['xy_end']
gcode = ('G00 Z' + self.feedrate_format % (p.fr_decimals, p.z_end) + "\n")
if end_coords_xy != '':
if end_coords_xy and end_coords_xy != '':
gcode += 'G00 X{x} Y{y}'.format(x=end_coords_xy[0], y=end_coords_xy[1]) + "\n"
return gcode

View File

@@ -221,7 +221,7 @@ G00 Z{z_toolchange}
coords_xy = p['xy_end']
gcode = ('G00 Z' + self.feedrate_format % (p.fr_decimals, p.z_end) + "\n")
if coords_xy != '':
if coords_xy and coords_xy != '':
gcode += 'G00 X{x} Y{y}'.format(x=coords_xy[0], y=coords_xy[1]) + "\n"
return gcode

View File

@@ -207,7 +207,7 @@ M0""".format(x_toolchange=self.coordinate_format % (p.coords_decimals, x_toolcha
def end_code(self, p):
coords_xy = p['xy_end']
if coords_xy != '':
if coords_xy and 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)