So, you can take your GCode file, clean it - which sets things up - and then split it into individual cutting actions.
But why? I hear you mumble unenthuasticially over your /
Two main reasons
This lets you extract some key cutting step from an existing GCode file as a self-contained Gcode file that you can run on its own.
This is a key precursor for ‘travelling’ optimisation. ie. where you go between cuts.
As usual, please let me know if you find bugs.
An important note: previously you just ran GCodeClean through the command line, and it only did one thing. Now, it has two ‘commands’ clean (the original) and split (the new). It does not (yet) do ‘all the things’ in one go - and that is not a priority. Solving the ‘travelling’ optimisation and back-porting to TypeScript (for inclusion with the new Maslow 4 code) are my priorities.
Go to the usual Release page in Github to get the executables; for Linux, Pi (Linux-arm) and Windows
So yeah, bugs with the deep copy code I had introduced - seriously if I had run my tests I would have found them - you would think I’d have learned by now.
Also cleaned up some of the “magic characters” throughout the code. These were the for some of the leading letters of certain GCode ‘words’.
I came across the weird ‘block delete’ character in the NIST GCode spec. So I’ve added support for that. I’m guessing it’s not something that a Maslow will ever use but who knows And I’ve added one test for it, and updated another.
Also I’ve added support for putting the tool number into the travelling comment in the cleaned file, and into the filename for each cutting path split out of a file.