Program to scale gcode

More
10 Mar 2018 02:22 #107181 by tim@home
So right after I started cutting gcode files with my router I noticed EMC had no scaling capabilities within the program, nor could I just tell EMC to "cut this code 3 times in succession lowering z by .125" each time" simply. I did notice that the EMC logo file that loads when EMC starts contained #scale = 1.0 that could be changed to any scale. I wanted those two features in my gcode - scaling and multipass cutting and I did not want to keep returning to Qcad to accomplish it. The attached is my solution - for me at least - and for anyone else that may be able to use it. It uses SED, the linux substitution editor to read a gcode file output by Qcad and insert the code to create the subroutine for multipass cutting as well as that ultra handy #scale component. Line 63 in the bash file is the form of the bash command to use in terminal. The parameters are on line 64 with explanations as comments. Just copy your gcode file into the same folder as the bash file and rename it to test.ngc. The output is test1.ngc. It works with output by Qcad but can be tweaked for other Cam output files I'm sure. PS because the .sh file extension is not an allowed type I have renamed it with .txt change it back and make it executable on your machine.
Attachments:
The following user(s) said Thank You: nkp, tommylight
More
10 Mar 2018 10:24 #107183 by tommylight
Replied by tommylight on topic Program to scale gcode
Inkscape has the option to export parametrized gcode for Linuxcnc, but changing the scale will also change the Z depth, it has no separate scales for XY and Z.
This is a nice addition.
Thank you.
Time to create page: 0.057 seconds
Powered by Kunena Forum