Hello,
First, I'd like to thank all the developers of Gcodetools. I use it several times a week since I got a 3-axis mill for my job, 1 and a half year ago.
I noticed that Gcodetools does the drilling operations with a G01 move.
This is sometimes a problem, especially when drilling deep holes with a router bit : the spindle can easily slow down, or even stop !
There are special Gcodes for drilling like
G73 and
G83.
So I made a small modification on Gcodetools source code to allow the user to choose the Gcode to use on drilling.
It adds a choice of drilling strategy in the options tab.
Here are the patches :
Код: Выделить всё
--- gcodetools-dev.inx 2012-09-01 18:50:24.010904548 +0200
+++ gcodetools-tomate.inx 2012-09-01 18:42:44.186907225 +0200
@@ -40,7 +40,11 @@
<param name="comment-gcode" type="string" _gui-text="Comment Gcode:"></param>
<param name="comment-gcode-from-properties" type="boolean" _gui-text="Get additional comments from object's properties">False</param>
<param name="debug-level" type="string" _gui-text="Debug level">0b0000000</param>
-
+ <param name="drilling-strategy" type="optiongroup" _gui-text="Drilling Strategy">
+ <option value='drillg01'>G01 : drills straight to the bottom of the hole</option>
+ <option value='drillg73'>G73 : drills with small upward moves on each step</option>
+ <option value='drillg83'>G83 : drills with complete retract moves on each step</option>
+ </param>
</page>
<!-- Gcodetools: /options block -->
Код: Выделить всё
--- gcodetools-dev.py 2012-09-01 18:50:33.070904494 +0200
+++ gcodetools-tomate.py 2012-09-01 18:28:02.242912362 +0200
@@ -4851,6 +4851,8 @@
self.OptionParser.add_option("", "--tools-library-type", action="store", type="string", dest="tools_library_type", default='cylinder cutter', help="Create tools definition")
self.OptionParser.add_option("", "--dxfpoints-action", action="store", type="string", dest="dxfpoints_action", default='replace', help="dxfpoint sign toggle")
+
+ self.OptionParser.add_option("", "--drilling-strategy", action="store", type="string", dest="drilling_strategy", default='drillg83', help="d")
self.OptionParser.add_option("", "--help-language", action="store", type="string", dest="help_language", default='http://www.cnc-club.ru/forum/viewtopic.php?f=33&t=35', help="Open help page in webbrowser.")
@@ -5839,7 +5841,12 @@
def print_dxfpoints(points):
gcode=""
for point in points:
- gcode +="(drilling dxfpoint)\nG00 Z%f\nG00 X%f Y%f\nG01 Z%f F%f\nG04 P%f\nG00 Z%f\n" % (self.options.Zsafe,point[0],point[1],self.Zcoordinates[layer][1],self.tools[layer][0]["penetration feed"],0.2,self.options.Zsafe)
+ if self.options.drilling_strategy == 'drillg01':
+ gcode +="(drilling dxfpoint)\nG00 Z%f\nG00 X%f Y%f\nG01 Z%f F%f\nG04 P%f\nG00 Z%f\n" % (self.options.Zsafe,point[0],point[1],self.Zcoordinates[layer][1],self.tools[layer][0]["penetration feed"],0.2,self.options.Zsafe)
+ if self.options.drilling_strategy == 'drillg73':
+ gcode +="(drilling dxfpoint)\nG00 Z%f\nG73 X%f Y%f Z%f R%f Q%f F%f\n" % (self.options.Zsafe,point[0],point[1],self.Zcoordinates[layer][1], self.options.Zsafe, self.tools[layer][0]["depth step"], self.tools[layer][0]["penetration feed"])
+ if self.options.drilling_strategy == 'drillg83':
+ gcode +="(drilling dxfpoint)\nG00 Z%f\nG83 X%f Y%f Z%f R%f Q%f F%f\n" % (self.options.Zsafe,point[0],point[1],self.Zcoordinates[layer][1], self.options.Zsafe, self.tools[layer][0]["depth step"], self.tools[layer][0]["penetration feed"])
# print_(("got dxfpoints array=",points))
return gcode
Thanks again,
Tomate