I’ve dropped this project onto GitHub: https://github.com/md8n/GCodeClean
There’s a self-contained 64bit
Release build for Linux, Windows and OSX, you can get the relevant one from https://github.com/md8n/GCodeClean/releases (open up
Assets within the latest version )
But you can also build it yourself (e.g. for other chipsets like ARM, 32bit, specific Linux flavours, etc.).
This does require the .net Core 3.1 SDK - but that runs on anything (Linux, OSX, Windows) and hopefully I’ve included enough instructions for anyone familiar with a command prompt / shell to be able to build it.
I had a 14.7MB .nc file (output from estlcam) that I was able to ‘clean’ down to an 8.92MB file with a tolerance of < 0.001mm on all commands.
Please note that it’s still a “work in progress” as I add support for more of gcode spec (yep there is actually a spec). But what’s there already seems to work well for many gcode files.
Two things are particularly useful for ‘explaining’ gcode:
- An optional
--annotateflag, where it will add inline comments describing what each line does.
per linelinter, where lines with multiple commands (G, M, F, S, T) are split up onto individual lines in the order that they should be processed (according to the specification).