Originally shared by Nathaniel Stenzel I was playing with some python code for making

Originally shared by Nathaniel Stenzel

I was playing with some python code for making more efficient CNC toolpaths. Below are the results.

http://pastebin.com/raw.php?i=9xb5L3QR

For clarity, my cutting bits do not cut very well on the sides, so this code makes it easier on me. If you have a cutting bit and router that can cut 1 inch deep and then move sideways to cut some more, you probably don’t need cutting paths like this.

Some quick questions:

If you say G1F127, does it set the speed for all future G1 commands until otherwise set?

If you say G0F127, does it set the speed for all future G0 commands until otherwise set?

If you say “G0” or “G1”, does it change to coordinated or rapid movement mode and stay in that mode until you use another G command to switch modes?

if you put F20, for example on the end of a command that does not have G in it, does it affect just that command or does it affect all movements of the current G mode?

I am wanting to make sure I am putting together this code correctly.

I am trying to make it move in Z slowly and cut slowly, but make fast rapids when not cutting.
Does this gcode make sense for that?

G21
G0F20.000000
G1F10.000000
G1
Z10.000000F10.000000
G0
X1.000000Y1.000000
Z-1.000000
X2.000000Y1.000000
Z-1.000000
X3.000000Y1.000000
Z-1.000000
X4.000000Y1.000000
Z-1.000000
G1
Z-2.000000F10.000000
G0
X3.000000Y1.000000