- modified the export_gcode() method and the preprocessors such that the preprocessors now have the information if to include the gcode header
- RELEASE 8.99
This commit is contained in:
@@ -14,6 +14,8 @@ from FlatCAMPostProc import *
|
||||
|
||||
|
||||
class Berta_CNC(FlatCAMPostProc):
|
||||
|
||||
include_header = True
|
||||
coordinate_format = "%.*f"
|
||||
feedrate_format = '%.*f'
|
||||
|
||||
@@ -66,18 +68,19 @@ class Berta_CNC(FlatCAMPostProc):
|
||||
|
||||
gcode += '(Spindle Speed: %s RPM)\n' % str(p['spindlespeed'])
|
||||
|
||||
gcode += '(Berta)\n'
|
||||
gcode += 'G90 G94 G17 G91.1'
|
||||
gcode += (
|
||||
# This line allow you to sets the machine to METRIC / INCH in the GUI
|
||||
'G20\n' if p.units.upper() == 'IN' else 'G21\n')
|
||||
'G20\n' if p.units.upper() == 'IN' else 'G21\n') + '\n'
|
||||
# gcode += 'G21\n' # This line sets the machine to METRIC ONLY
|
||||
# gcode += 'G20\n' # This line sets the machine to INCH ONLY
|
||||
|
||||
gcode += 'G90 G17 G91.1\n'
|
||||
gcode += 'G64 P0.03\n'
|
||||
gcode += 'M110\n'
|
||||
gcode += 'G54\n'
|
||||
gcode += 'G0\n'
|
||||
gcode += '(Berta)\n'
|
||||
gcode += 'G94\n'
|
||||
|
||||
return gcode
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ from FlatCAMPostProc import *
|
||||
|
||||
|
||||
class ISEL_CNC(FlatCAMPostProc):
|
||||
|
||||
include_header = True
|
||||
coordinate_format = "%.*f"
|
||||
feedrate_format = '%.*f'
|
||||
|
||||
|
||||
@@ -9,7 +9,10 @@
|
||||
from FlatCAMPostProc import *
|
||||
|
||||
|
||||
class ISEL_ICP_CNC(FlatCAMPostProc):
|
||||
class ISEL_ICP_CNC(FlatCAMPostProc):
|
||||
|
||||
include_header = False
|
||||
|
||||
def start_code(self, p):
|
||||
units = ' ' + str(p['units']).lower()
|
||||
coords_xy = p['xy_toolchange']
|
||||
|
||||
@@ -11,6 +11,7 @@ from FlatCAMPostProc import *
|
||||
|
||||
class Paste_1(FlatCAMPostProc_Tools):
|
||||
|
||||
include_header = True
|
||||
coordinate_format = "%.*f"
|
||||
feedrate_format = '%.*f'
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ from FlatCAMPostProc import *
|
||||
|
||||
class Repetier(FlatCAMPostProc):
|
||||
|
||||
include_header = True
|
||||
coordinate_format = "%.*f"
|
||||
feedrate_format = '%.*f'
|
||||
feedrate_rapid_format = feedrate_format
|
||||
@@ -66,6 +67,7 @@ class Repetier(FlatCAMPostProc):
|
||||
|
||||
gcode += ('G20' if p.units.upper() == 'IN' else 'G21') + "\n"
|
||||
gcode += 'G90\n'
|
||||
gcode += 'G94\n'
|
||||
|
||||
return gcode
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ from FlatCAMPostProc import *
|
||||
# the same) to contain the following keyword, case-sensitive: 'Roland' without the quotes.
|
||||
class Roland_MDX_20(FlatCAMPostProc):
|
||||
|
||||
include_header = False
|
||||
coordinate_format = "%.1f"
|
||||
feedrate_format = '%.1f'
|
||||
feedrate_rapid_format = '%.1f'
|
||||
|
||||
@@ -11,6 +11,7 @@ from FlatCAMPostProc import *
|
||||
|
||||
class Toolchange_Custom(FlatCAMPostProc):
|
||||
|
||||
include_header = True
|
||||
coordinate_format = "%.*f"
|
||||
feedrate_format = '%.*f'
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ from FlatCAMPostProc import *
|
||||
|
||||
class Toolchange_Probe_MACH3(FlatCAMPostProc):
|
||||
|
||||
include_header = True
|
||||
coordinate_format = "%.*f"
|
||||
feedrate_format = '%.*f'
|
||||
|
||||
@@ -69,14 +70,14 @@ class Toolchange_Probe_MACH3(FlatCAMPostProc):
|
||||
gcode += 'G90\n'
|
||||
gcode += 'G17\n'
|
||||
gcode += 'G94\n'
|
||||
gcode += '(MSG, WARNING: Make sure you do zero on all axis. ' \
|
||||
'For Z axis, since it will be probed, make a rough estimate and do a zero.)\n'
|
||||
gcode += 'M0'
|
||||
|
||||
return gcode
|
||||
|
||||
def startz_code(self, p):
|
||||
return ''
|
||||
g = '(MSG, WARNING: Make sure you do zero on all axis. ' \
|
||||
'For Z axis, since it will be probed, make a rough estimate and do a zero.)\n'
|
||||
g += 'M0'
|
||||
return g
|
||||
|
||||
def lift_code(self, p):
|
||||
return 'G00 Z' + self.coordinate_format%(p.coords_decimals, p.z_move)
|
||||
|
||||
@@ -11,6 +11,7 @@ from FlatCAMPostProc import *
|
||||
|
||||
class Toolchange_manual(FlatCAMPostProc):
|
||||
|
||||
include_header = True
|
||||
coordinate_format = "%.*f"
|
||||
feedrate_format = '%.*f'
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ from FlatCAMPostProc import *
|
||||
|
||||
class default(FlatCAMPostProc):
|
||||
|
||||
include_header = True
|
||||
coordinate_format = "%.*f"
|
||||
feedrate_format = '%.*f'
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ from FlatCAMPostProc import *
|
||||
|
||||
class grbl_11(FlatCAMPostProc):
|
||||
|
||||
include_header = True
|
||||
coordinate_format = "%.*f"
|
||||
feedrate_format = '%.*f'
|
||||
|
||||
@@ -63,8 +64,8 @@ class grbl_11(FlatCAMPostProc):
|
||||
|
||||
gcode += ('G20' if p.units.upper() == 'IN' else 'G21') + "\n"
|
||||
gcode += 'G90\n'
|
||||
gcode += 'G94\n'
|
||||
gcode += 'G17\n'
|
||||
gcode += 'G94\n'
|
||||
|
||||
return gcode
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ from FlatCAMPostProc import *
|
||||
|
||||
class grbl_laser(FlatCAMPostProc):
|
||||
|
||||
include_header = True
|
||||
coordinate_format = "%.*f"
|
||||
feedrate_format = '%.*f'
|
||||
|
||||
@@ -34,15 +35,15 @@ class grbl_laser(FlatCAMPostProc):
|
||||
if str(p['options']['type']) == 'Excellon' or str(p['options']['type']) == 'Excellon Geometry':
|
||||
gcode += '(Preprocessor Excellon: ' + str(p['pp_excellon_name']) + ')\n'
|
||||
else:
|
||||
gcode += '(Preprocessor Geometry: ' + str(p['pp_geometry_name']) + ')\n'
|
||||
gcode += ('G20' if p.units.upper() == 'IN' else 'G21') + "\n" + '\n'
|
||||
gcode += '(Preprocessor Geometry: ' + str(p['pp_geometry_name']) + ')\n' + '\n'
|
||||
|
||||
gcode += '(X range: ' + '{: >9s}'.format(xmin) + ' ... ' + '{: >9s}'.format(xmax) + ' ' + units + ')\n'
|
||||
gcode += '(Y range: ' + '{: >9s}'.format(ymin) + ' ... ' + '{: >9s}'.format(ymax) + ' ' + units + ')\n\n'
|
||||
|
||||
gcode += ('G20' if p.units.upper() == 'IN' else 'G21') + "\n"
|
||||
gcode += 'G90\n'
|
||||
gcode += 'G94\n'
|
||||
gcode += 'G17\n'
|
||||
gcode += 'G94\n'
|
||||
|
||||
return gcode
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ from FlatCAMPostProc import *
|
||||
# for Roland Preprocessors it is mandatory for the preprocessor name (python file and class name, both of them must be
|
||||
# the same) to contain the following keyword, case-sensitive: 'Roland' without the quotes.
|
||||
class hpgl(FlatCAMPostProc):
|
||||
|
||||
include_header = True
|
||||
coordinate_format = "%.*f"
|
||||
|
||||
def start_code(self, p):
|
||||
|
||||
@@ -11,6 +11,7 @@ from FlatCAMPostProc import *
|
||||
|
||||
class line_xyz(FlatCAMPostProc):
|
||||
|
||||
include_header = True
|
||||
coordinate_format = "%.*f"
|
||||
feedrate_format = '%.*f'
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ from FlatCAMPostProc import *
|
||||
|
||||
class marlin(FlatCAMPostProc):
|
||||
|
||||
include_header = True
|
||||
coordinate_format = "%.*f"
|
||||
feedrate_format = '%.*f'
|
||||
feedrate_rapid_format = feedrate_format
|
||||
@@ -66,6 +67,7 @@ class marlin(FlatCAMPostProc):
|
||||
|
||||
gcode += ('G20' if p.units.upper() == 'IN' else 'G21') + "\n"
|
||||
gcode += 'G90\n'
|
||||
gcode += 'G94\n'
|
||||
|
||||
return gcode
|
||||
|
||||
|
||||
Reference in New Issue
Block a user