Oh, I should probably add that the G-code isn’t usable in RepetierHost as generated by FlatCAM (no spaces between X and Y moves). It is also weak on feeds and speeds.
I ran this on the generated G-code, which seemed to do what I wanted:
sed -i -e 's/\([0-9]\)Y/\1 Y/g' -e 's/Z\(-*[0-9+$]\)/Z\1 F60/g' -e 's/G00 \([X|Y]\)\(-*.*$\)/G00 \1\2 F8000/g' -e 's/G01 \([X|Y]\)\(.*$\)/G01 \1\2 F900/g'
In order, the expressions:
- add a space between X and Y arguments to any move
- add a feedrate to any Z axis move (F60, in this case)
- add a feedrate to any G00 move (F8000, in this case, which I learned was a bit much)
- add a feedrate to any G01 move (F900, in this case)