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.