Suggestion for Unused Gcode For Arc Command Settings

Hi all! I just finished up some changes to the prusa fork of Marlin to fix some arc (g2/g3) printing issues I've been encountering. I've added a new gcode (tentatively M213) that allows one to set the arc printing parameters via gcode (savable to EEPROM via M500). However, I'm not sure if M213 is good or bad. I don't want to conflict with any existing gcodes.

So, is M213 OK to choose? Here is the definition:

M213 - Set Arc configuration values (Use M500 to store in eeprom)

Usage

    M213 [N] [S] [R] [F] [P]

Parameters

- `N` - A float representing the max and default millimeters per arc segment.  Must be greater than 0.
- `S` - A float representing the minimum allowable millimeters per arc segment.  Set to 0 to disable
- `R` - An int representing the minimum number of segments per arcs of any radius,
        except when the results in segment lengths greater than or less than the minimum
        and maximum segment length.  Set to 0 to disable.
- 'F' - An int representing the number of segments per second, unless this results in segment lengths
        greater than or less than the minimum and maximum segment length.  Set to 0 to disable.
- 'P' - An integer representing the number of segments that should be generated using a sin/cos approximation
        before using a real sin/cos calc.  Set to 0 to disable correction.
2 Likes

As for


https://reprap.org/wiki/G-code
and
https://prusa3d.github.io/Prusa-Firmware-Doc/group__GCodes.html
M213 is not used yet.

Any thoughts about the parameter names? I just sort of made them up too :joy:

I dunno. M212 is used in reprap. So just like you, somebody out there is probably working on some additional feature and it's a race to see which of you wins. If it were me, I'd leapfrog by one and go with M214 instead.

Not a bad idea. I will do this.

Which slicer generates arc commands ?

None that I know of, though KISslicer supposedly is working on this. The G2/G3 commands I am working with come from an algorithm I wrote to convert G0/G1 commands to G2/G3 in post processing. Check out this thread regarding the new plugin (alpha, not released officially yet).