G1 vs G2/G3 for CNC
I'm using a DuetWifi to control a CNC router. I modified a Fusion360 post for the use with it which can be found on https://github.com/mwinterm/fusion_post. I have seen that most posts for RepRep Firmware like controls only use linear G0/G1 commands and don't use the ciruclar G2/G3 commands. On industrial CNC controls it is typically an advantage to use G2/G3 to reduce the number of commands and generate smoother moves and/or better surface finish. I'm wondering using G2/G3 would make sense for the Duet boards as well or if there is a specific reason to only use linear moves?
We support G2/G3 commands if your Gcode generation tool produces them, see:
3d printer slicers do not generate G2/G3 commands, however CNC programming does.
I'm aware that you support them. My question is rather if it is useful to use them which comes down to how the control handles them. E.g. if the control generates a series of G1 out of every G2/G3 then I rather do the linearization in my NC software where I have a control parameter regarding desired accuracy. However if there the controller provides an implementation of G2/G3 which is closer to the hardware then it would make sense to modify the post to generate these commands and allowing to do e.g. arc filtering.
Currently, G2 and G3 on the Duet split arcs into segments 0.2mm long. We can make that value configurable if it would be useful to do so.
Thank you, that is good to know. Therefore it makes sense for posts not to issue G2/G3 as they do not provide a performance increase over G1.
For me there is no need to configure this segment length as I have much more options in the CAM software to modify the linearization. Anyway for me the segment length is not a suitable parameter in this context. More meaningful would be a segmentation based on tolerance value i.e. one would specify the maximum deviation from the circle allowable and by that the segmentation would be determined individually for each G2/G3.
But anyway I'm not sure how important G2/G3 still are with today's compute power in controls. I think it might be a better investment to make sure that global movements are still smooth despite huge amounts of linear commands (invest into some lower level smoothing on the controller level) as for more complex shapes (already circles not along the main axis) we are anyway down to linear segments.
However speaking of this the DuetWifi I'm using is performing very good for me so far
Jacotheron last edited by
In my opinion this is where a Duet powered CNC differs from other CNC machines in a good way.
Typically the other CNC machines are run from a different computer/device over USB (using some form of Gcode Sender software) - USB (or more specifically an older Serial connection) is slow, have delays and a few other factors making it less ideal to send a lot of small line segments in quick succession (this is why I don't like to 3D print over USB and also advise against it). For these machines to implement such an arc feature where the arc is sent as a single segment, then divided into smaller segments by the machine machine (in all 3 planes), makes a lot of sense (less data to send).
The Duet in comparison have high speed SPI to the microSD card, uses a much more capable processor and thus can read the line segments in quick succession without the delay of Serial over USB.
I have, with my Duet powered CNC cut wavy shapes and they came out smooth (without a noticeable stutter, using the Post side segmentation - having a powerful PC calculate them is more efficient than having to calculate them on an under powered processor as long as you can get all of the information transmitted/read fast enough).