And there’s another new release (the actual prebuilt releases are still uploading, but the code is there for the ‘built-it-yourself’ types).
There’s a certain set of GCode commands that should always be present.
But many are just simply assumed to be ‘set to’ some default, which you don’t really know what that is…
This release sets up a limited set of GCode commands as a ‘preamble’. When the first movement command is detected, any of these ‘preamble’ codes that have not yet been seen are injected into the GCode above that movement command.
This also adds the concept of a ‘Context’ (i.e. the state as identified by the various commands seen so far, or the state that is desired), the preamble is the first such ‘Context’.
This sets up for working with the Plane Selection GCodes (G17, G18, G19).
I assumed optimistically that the --annotate would interpret all of the G-codes with a comment something like M3 (Spindle ON CW Rotation) but all I got was (Preamble completed by GCodeClean). Am I right or wrong? Thanks
v0.8.5.4 is up in GitHub right now, along with the releases for OSX, Windows and Linux.
This fixes issue #1 removing the redundant (and according to the spec wrong) G0 command right at the start of some GCode files, e.g. those generating by Fusion 360.
The DedupLinearToArc function has also been improved to ‘screw up even less’. There still seems to be an issue in a handful of cases, current suspect is movement through the 3rd axis relative to the current ‘plane’.
A little bit of refactoring to remove some redundant constant values.
v0.8.6.0 is now up on GitHub, and the releases for Linux, OSX, and Windows as well.
This fixes the mis-handling of the I J K arguments, as a result I think this is now pretty close to being v1.
I’d appreciate anyone who wants to throw their own gcode at it to see how it compares.
So it now converts very short arcs (G2 and G3) into straight lines (G1).
And then ironically it feeds that back into the LinearToArcDedup algorithm, which results in much better curves.
I’ve also added command line options to set the general tolerance value (this affects the clipping of decimal places, and some maths operations), and an arcTolerance value for the above function.
Version 0.8.8.0 is now on Github along with the release for Linux, OSX and Windows
This is a partial answer to all those “why does it pointlessly raise and lower z-axis?” type of issues that we all have.
First, all positive z-axis values are clamped to a single value. The default is 0.2"" or 5mm.
Second, there is a command line option to change this value to something else (within limits).
Finally, the existing deduping algorithm will remove some of the now pointless duplicate z-axis movements.
I’d appreciate it if anyone can reply with GCode files that have the “uppy downy thing” happening (AKA “Raveling Nancy” for those who know their Blackadder).
I know it’s called GCodeClean and it does a few M-Codes but would it be possible to get the rest of the M-Codes? Sorry to be a bother. Thanks
M0 (Program Stop)
M1 (Optional Program Stop)
M2 (Program End)
M3 (Turn Spindle: Clockwise)
M4 (Turn Spindle: Counterclockwise)
M5 (Turn Spindle: Stop)
M6 (Tool Change)
M7 (Coolant: Mist, On)
M8 (Coolant: Flood, On)
M9 (Coolant: Mist and Flood, Off)
M10
M11
M13
M19
M21
M22
M23
M24
M30 (Program End, Pallet Shuttle, and Reset)
M41
M42
M43
M44
M48 (Speed and Feed Overrides: Enable)
M49 (Speed and Feed Overrides: Disable)
M52
M60 (Pallet Shuttle and Program Stop)
M98
M99