Commit 6ca5199f authored by nextime's avatar nextime

Add support for cooler and enlarge feed limits

parent a992b5a7
...@@ -55,6 +55,9 @@ For the latest revision please visit https://github.com/TurnkeyTyranny/laser-gco ...@@ -55,6 +55,9 @@ For the latest revision please visit https://github.com/TurnkeyTyranny/laser-gco
<param name="optimiseraster" type="boolean" _gui-text="Optimise raster horizontal scanning speed:">true</param> <param name="optimiseraster" type="boolean" _gui-text="Optimise raster horizontal scanning speed:">true</param>
<_param name="help" type="description">Will optimise raster paths, may cause slight overburn at the edges of the raster.</_param> <_param name="help" type="description">Will optimise raster paths, may cause slight overburn at the edges of the raster.</_param>
<param name="dpi" type="int" min="90" max="900" _gui-text="Set exported image DPI">270</param> <param name="dpi" type="int" min="90" max="900" _gui-text="Set exported image DPI">270</param>
<param name="cooler" type="float" precision="1" min="0.0", max="35.0" _gui-text="Cooler target temperature (celsius)">0.0</param>
<_param name="help" type="description">Set 0 to disable cooling</_param>
<param name="cooleronstop" type="boolean" _gui-text="continue to cool down laser when finished">false</param>
</page> </page>
<page name='tab' _gui-text='Preferences'> <page name='tab' _gui-text='Preferences'>
...@@ -66,8 +69,8 @@ For the latest revision please visit https://github.com/TurnkeyTyranny/laser-gco ...@@ -66,8 +69,8 @@ For the latest revision please visit https://github.com/TurnkeyTyranny/laser-gco
<param name="filename" type="string" _gui-text="File name: ">output.g</param> <param name="filename" type="string" _gui-text="File name: ">output.g</param>
<param name="directory" type="string" _gui-text="Directory: "></param> <param name="directory" type="string" _gui-text="Directory: "></param>
<_param name="help" type="description">(blank is your desktop)</_param> <_param name="help" type="description">(blank is your desktop)</_param>
<param name="feed" type="int" min="0" max="5000" _gui-text="Default Cut Feedrate:">300</param> <param name="feed" type="int" min="0" max="30000" _gui-text="Default Cut Feedrate:">300</param>
<param name="Mfeed" type="int" min="0" max="5000" _gui-text="Default Traversal Feedrate:">2000</param> <param name="Mfeed" type="int" min="0" max="30000" _gui-text="Default Traversal Feedrate:">2000</param>
<param name="laser" type="int" min="0" max="100" _gui-text="Default Laser Intensity (0-100%):">10</param> <param name="laser" type="int" min="0" max="100" _gui-text="Default Laser Intensity (0-100%):">10</param>
<param name="homebefore" type="boolean" _gui-text="Home X and Y Before:">true</param> <param name="homebefore" type="boolean" _gui-text="Home X and Y Before:">true</param>
<param name="homeafter" type="boolean" _gui-text="Home X and Y After:">false</param> <param name="homeafter" type="boolean" _gui-text="Home X and Y After:">false</param>
......
...@@ -495,6 +495,8 @@ class Gcode_tools(inkex.Effect): ...@@ -495,6 +495,8 @@ class Gcode_tools(inkex.Effect):
self.OptionParser.add_option("", "--colorspace", action="store", type="int", dest="colorspace", default="256", help="reduce colorspace") self.OptionParser.add_option("", "--colorspace", action="store", type="int", dest="colorspace", default="256", help="reduce colorspace")
self.OptionParser.add_option("", "--dpi", action="store", type="int", dest="dpi", default="270", help="set DPI for inkscape export") self.OptionParser.add_option("", "--dpi", action="store", type="int", dest="dpi", default="270", help="set DPI for inkscape export")
self.OptionParser.add_option("", "--invert", action="store", type="inkbool", dest="invert", default=True, help="swap to negative colors") self.OptionParser.add_option("", "--invert", action="store", type="inkbool", dest="invert", default=True, help="swap to negative colors")
self.OptionParser.add_option("", "--cooler" action="store", type="float", dest="cooler", default="0.0", help="set cooler temperature. 0 to disable")
self.OptionParser.add_option("", "--cooleronstop" action="store", type="float", dest="cooleronstop", default=False, help="continue to cool down when finished")
def parse_curve(self, path): def parse_curve(self, path):
# if self.options.Xscale!=self.options.Yscale: # if self.options.Xscale!=self.options.Yscale:
...@@ -816,6 +818,8 @@ class Gcode_tools(inkex.Effect): ...@@ -816,6 +818,8 @@ class Gcode_tools(inkex.Effect):
gcode += ("M5 \n"); gcode += ("M5 \n");
gcode += ';End of Raster Image '+str(curve['id'])+'\n\n' gcode += ';End of Raster Image '+str(curve['id'])+'\n\n'
if float(self.options.cooler) > 0.0 and bool(self.options.coolerstop):
gcode += 'M140 C'+str(self.options.cooler)+' ; continue to cool down laser\n'
return gcode return gcode
...@@ -1444,7 +1448,8 @@ class Gcode_tools(inkex.Effect): ...@@ -1444,7 +1448,8 @@ class Gcode_tools(inkex.Effect):
return return
gcode += "M80 ; Turn on Optional Peripherals Board at LMN\n" gcode += "M80 ; Turn on Optional Peripherals Board at LMN\n"
if float(self.options.cooler) > 0:
gcode +="M140 C S"+str(self.options.cooler)+"\n"
#Put the header data in the gcode file #Put the header data in the gcode file
gcode += """ gcode += """
......
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