Commit 02a58f06 authored by ajfoul's avatar ajfoul

added option to home all axis (G28) after job

parent 45c5565c
......@@ -42,6 +42,7 @@ This script is a fork of Gcodetools v1.2 by Nick Drobchenko. It is currently mai
<param name="Mfeed" type="int" min="0" max="1000" _gui-text="Move Feedrate:">300</param>
<param name="laser" type="int" min="0" max="100" _gui-text="Laser Intensity (0-100):">10</param>
<param name="homebefore" type="boolean" _gui-text="HOMEALL (G28) Before:">true</param>
<param name="homeafter" type="boolean" _gui-text="HOMEALL (G28) After:">false</param>
<param name="Xscale" type="float" precision="4" min="-1000" max="1000" _gui-text="Scale along X axis:">1</param>
<param name="Yscale" type="float" precision="4" min="-1000" max="1000" _gui-text="Scale along Y axis:">1</param>
......
......@@ -431,7 +431,8 @@ class Gcode_tools(inkex.Effect):
self.OptionParser.add_option("-p", "--feed", action="store", type="int", dest="feed", default="60", help="Cut Feed rate in unit/min")
self.OptionParser.add_option("-m", "--Mfeed", action="store", type="int", dest="Mfeed", default="300", help="Move Feed rate in unit/min")
self.OptionParser.add_option("-l", "--laser", action="store", type="int", dest="laser", default="10", help="Laser intensity (0-100)")
self.OptionParser.add_option("", "--homebefore", action="store", type="inkbool", dest="homebefore", default=True, help="Home all beofre starting (G28)")
self.OptionParser.add_option("-b", "--homebefore", action="store", type="inkbool", dest="homebefore", default=True, help="Home all axis beofre starting (G28)")
self.OptionParser.add_option("-a", "--homeafter", action="store", type="inkbool", dest="homeafter", default=False, help="Home all axis at end of job (G28)")
self.OptionParser.add_option("", "--biarc-tolerance", action="store", type="float", dest="biarc_tolerance", default="1", help="Tolerance used when calculating biarc interpolation.")
......@@ -658,9 +659,12 @@ class Gcode_tools(inkex.Effect):
gcode += "G01 " +self.make_args(si[0]) + " F%i" % self.options.feed + "\n"
lg = 'G01'
# This added an extra M5 to final block (ajf)
if si[1] == 'end':
gcode += LASER_OFF
if self.options.homeafter:
gcode += "\n\nG28 ; home all"
return gcode
def tool_change(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment