Cura Extension ArcWelder

Discuss 3D printing software.

Moderator: CrazyIvan

Post Reply
KenW
Posts: 26
Joined: Fri Sep 08, 2023 10:10 am
Has thanked: 6 times
Been thanked: 6 times

Cura Extension ArcWelder

Post by KenW »

Hi, not sure whether to put this under “software” or in the Tina2 section, but here goes:

I thought I would try out the Arcwelder extension in Cura. The idea is (or so I understand is) to post-process the slicer output to convert a curve which has been described as a series of straight-line segments into a single arc statement in the gcode and engage the arc capability in the printer firmware (which is otherwise unused).

That’s fine, except the first print I tried with Arcwelder selected clearly wasn’t printing correctly so I aborted. I re-sliced with Arcwelder turned off and that printed fine.

My question is this: is the Tina2 incapable of interpreting arc commands, or is there a bug in the Arcwelder extension (or perhaps its output is different from what the Tina2 requires)?

User avatar
CrazyIvan
Posts: 157
Joined: Mon Jul 10, 2023 10:25 am
Has thanked: 12 times
Been thanked: 26 times

Re: Cura Extension Arcwelder

Post by CrazyIvan »

KenW wrote: Fri Sep 08, 2023 11:21 am not sure whether to put this under “software” or in the Tina2 section...
If this turns out to be a Tina2 problem, I can move the thread or link to it from the Tina2 section.

...the first print I tried with Arcwelder selected clearly wasn’t printing correctly so I aborted. I re-sliced with Arcwelder turned off and that printed fine.
I've tried a print with ArcWelder (using a Tina2), and I agree the nozzle does not follow the correct path.

My question is this: is the Tina2 incapable of interpreting arc commands, or is there a bug in the Arcwelder extension (or perhaps its output is different from what the Tina2 requires)?
I don't know at the moment, I will investigate.

User avatar
CrazyIvan
Posts: 157
Joined: Mon Jul 10, 2023 10:25 am
Has thanked: 12 times
Been thanked: 26 times

Re: Cura Extension ArcWelder

Post by CrazyIvan »

And... the results are in...

I was intrigued by the possibility of ArcWelder, and had toyed with it a little myself (but the job I was doing was urgent so I didn't stick with it when I was having problems). This has given me the opportunity to really pin things down once and for all.


What Is ArcWelder

ArcWelder can be downloaded as an extension in the Cura Marketplace. The idea is that instead of the slicer outputting circular arcs as a series of small linear segments, with ArcWelder enabled the gcode output is post-processed to recognise a series of G1 segments comprising a circular arc, and replace them with a G2 or G3 command (clockwise and anticlockwise arc).

The benefit is a smaller gcode file, but also the task of drawing an arc is off-loaded to the printer firmware, which should be able to interpolate the stepper motions much better than the slicer outputting G1 segments and produce nice smooth circular motion.

I'm not convinced how good post-processing can be compared with doing it at source, but... (see later).


Testing

What I wanted was a test file I could run on my Tina2 which would exercise the G2/G3 commands in a simple and obvious way. I started out hand-crafting one, but realised I didn't know enough about the intricacies. So I drew up a sample in FreeCAD, defining single-line-width & single-layer-height bodies of a square nested in a circle nested in a square. My reasoning is that if the G2/G3 codes work then they will all get drawn on the bed, but if the G2/G3 doesn't work just the squares will get drawn.

Cura sliced it (with ArcWelder selected), and I analysed the .gcode file. I didn't like what I saw - even the straight edges of the squares were a series of segments (perhaps something to do with accelerating and decelerating the print head, but I'm not sure)... but there were also large blocks of G1 codes in between the G3 codes (no G2 at all, I suppose because of the direction Cura had decided to plot the circle in). Nonetheless, I tested the gcode in an on-line simulator/viewer, and it looked OK, but I felt I wanted something more definite - I could not tell how the interceding G1 commands would obscure the yes/no result.

So I hand-hacked the gcode, replacing all the segmented straight lines with single segments, and drawing the circle as four quadrant arcs with G3 commands. I used the information from the original Cura gcode to set everything else (Z, feed-rate, extruder motion, initialisation, termination).

[Incidentally - I wrote a spreadsheet to do a lot of gcode analysis automatically - if anyone wants it let me know.]

The next thing was to verify my hand-crafted gcode, so I ran it in the on-line simulator I tried before... it didn't work! To cut a lot of hair-pulling short, it turns out the simulator couldn't do G3, and what I saw before was it simulating the G1s and ignoring the G3s. The Cura simulator didn't work either. Eventually I downloaded the Prusa slicer and tested my gcode in the Prusa simulator, and it worked exactly as intended.


Tina2

So the last thing was to run the test file on the Tina2. Sure enough, it drew the two squares and ignored the G3 commands. (Just as a point of fact: it didn't actually "draw" anything, I have probably upset the extruder calculations, but I could watch the nozzle moving and interpret what I saw.)


Conclusions
  1. The Tina2 does not support G3 (nor probably G2) arc commands, even though its firmware appears to be based on Marlin;
  2. Even if a particular printer does support G2/G3, the ArcWelder post-processor does not do a good job of identifying and converting G1 segments into G2/G3 arcs, even when the model is a pure circle - in other words, it doesn't (currently) seem worth the bother.
This forum doesn't seem to support post attachments, so I'll find some other mechanism to share my stl and gcode for anyone else to try out.

KenW
Posts: 26
Joined: Fri Sep 08, 2023 10:10 am
Has thanked: 6 times
Been thanked: 6 times

Re: Cura Extension ArcWelder

Post by KenW »

That’s brilliant! Thanks.

I guess I won’t bother with arcwelder then. Not that it matters for my Tina2, but I wonder whether Prusa Slicer does a better job with arcs?

Post Reply