Program to scale gcode
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.
Time to create page: 0.082 seconds