- Gerber Export: made sure that if some of the coordinates in a Gerber object geometry are repeating then the resulting Gerber code include only one copy

- added a new parameter/feature: now the spindle can work in clockwise mode (CW) or counter clockwise mode (CCW)
This commit is contained in:
Marius Stanciu
2019-05-16 03:13:22 +03:00
parent b2cb0f9ffb
commit d172a3ca49
13 changed files with 149 additions and 77 deletions

View File

@@ -192,10 +192,11 @@ M0""".format(z_toolchange=self.coordinate_format%(p.coords_decimals, z_toolchang
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]
if p.spindlespeed:
return 'M03 S' + str(p.spindlespeed)
return '%s S%s' % (sdir, str(p.spindlespeed))
else:
return 'M03'
return sdir
def dwell_code(self, p):
if p.dwelltime: