Has anyone tried ArcWelder?

Has anyone tried post processing Sandify pattern files using ArcWelder to convert segmented curves into gcode arcs for their ZenXY table?

I tried it. I had high hopes, but it seems that it doesn’t like something about the way that Sandify does things. I keep getting “0 arcs welded” messages every time I attempt it. @jeffeb3 speculated that it might be looking for moves with extrusion.

According to the web site,

" How Arc Welder Works

Arc Welder reads each GCode in the source file, searching for three extrusion or retraction commands in a row. It adds adds these points to a special shape detection class that determines if the collected points can be represented by an arc command (G2/G3)."

It’s looking for extrusion or retraction, so simply appending an Exx to the end of every G01 line would fool arcwelder into doing its thing, I think.

That should be easy with Notepad ++, at least for testing purposes.

I tried taking a simple file from sandify and appending E1, E2, etc. to the end of each statement and arcwelder does nothing to the file except add its header. I posted a question at the arcwelder discussion page on github- we’ll see if anyone has an answer.

1 Like

OK, I changed all the G01 commands to G1 (arcwelder doesn’t like G01, it likes G1), and I appended some Exx to the ends of some of the G1 commands, and arcwelder does convert to arcs. My table isn’t up and running at the moment, so I can’t test to see what it looks like. Maybe it can just be plugged into a gcode renderer to see what it looks like.

D:\Libraries\Downloads\arc\bin>arcwelder.exe clover.gcode clover.aw.gcode
2021-04-10 16:20:17.001 - arc_welder.gcode_conversion - INFO - Processing Gcode
Source File Path : clover.gcode
Target File File : clover.aw.gcode
Resolution : 0.0500mm (±0.02500mm)
Path Tolerance : 5.000%
Maximum Arc Radius : 1000000mm
Min Arc Segments : 0
MM Per Arc Segment : 0.000
Allow 3D Arcs : False
Allow Dynamic Precision : False
Default XYZ Precision : 3
Default E Precision : 5
G90/G91 Influences Extruder : False
Log Level : INFO
Hide Progress Updates : False
2021-04-10 16:20:17.003 - arc_welder.gcode_conversion - INFO - arc_welder::process - Parameters received: source_file_path: ‘clover.gcode’, target_file_path:‘clover.aw.gcode’, resolution_mm:0.05mm (±0.03mm), path_tolerance_percent: 0.05, max_radius_mm:1000000.00, min_arc_segments:0, mm_per_arc_segment:0, g90_91_influences_extruder: False, allow_3d_arcs: False, allow_dynamic_precision: False, default_xyz_precision: 3, default_e_precision: 5
Progress: percent_complete:0.00, seconds_elapsed:0.00, seconds_remaining:inf, gcodes_processed: 0, current_file_line: 0, points_compressed: 0, arcs_created: 0, num_firmware_compensations: 0, compression_ratio: 0.00, size_reduction: 0.00%
Progress: percent_complete:100.00, seconds_elapsed:0.01, seconds_remaining:0.00, gcodes_processed: 1270, current_file_line: 1310, points_compressed: 99, arcs_created: 17, num_firmware_compensations: 0, compression_ratio: 1.01, size_reduction: 0.79%
2021-04-10 16:20:17.009 - arc_welder.gcode_conversion - INFO -
Min Max Source Target Change

0.000mm to 0.002mm 0 0 0.0%
0.002mm to 0.005mm 0 0 0.0%
0.005mm to 0.010mm 2 0-100.0%
0.010mm to 0.050mm 1 0-100.0%
0.050mm to 0.100mm 2 0-100.0%
0.100mm to 0.500mm 28 0-100.0%
0.500mm to 1.000mm 42 2 -95.2%
1.000mm to 5.000mm 24 12 -50.0%
5.000mm to 10.000mm 0 2 INF
10.000mm to 20.000mm 0 1 INF
20.000mm to 50.000mm 0 0 0.0%
50.000mm to 100.000mm 0 0 0.0%
>= 100.000mm 1 1 0.0%

Total distance source:…428.107mm
Total distance target:…428.104mm
Total count source:…100
Total count target:…18
Total percent change:…-82.0%
2021-04-10 16:20:17.010 - arc_welder.gcode_conversion - INFO - Arc Welder process completed successfully.

I appended Exx to 100 lines (which is the “total count source” above) and they were converted to 18 lines of G3 arcs (total count target).

So arcwelder just needs to have some extrusion in the form of E appended to the sandify pattern file G01 statements, and to have all the “G01” strings converted to “G1”.

Here are the source and output files:

clover.aw.gcode (27.0 KB) clover.gcode (27.2 KB)

1 Like

Marlin won’t like the E commands. I am not sure if grbl will just ignore them, or skip them. Are you removing them afterward?

I didn’t, and I don’t think they’ll affect the way the firmware treats them, but maybe I’ll have to check it when the table is running again, hopefully tomorrow. How does Marlin specify extrusion if not with an Exxx.xxx at the end of a movement command?

The Exxx.xxx strings could easily be removed in one operation in Notepad++, or a simple pearl or maybe python program (since no one seems to like pearl any more), could do the work. I’ll use Notepad++ while I’m testing, until I have the necessary settings worked out, then look into programming it- assuming it has a good effect on the sand patterns.

here’s the relevant thread at the arcwelder site: https://github.com/FormerLurker/ArcWelderPlugin/discussions/188

So for now it seems that the way to get arcwelder to convert Sandify patterns to include arcs is to
a) change all “G01” to “G1”
b) add and “M83” command somewhere before the G1 statements to tell arcwelder that extrusions are specified in relative coordinate
c) append an " E1" string to the end of all the G1 commands (which means extrude 1mm of filament).
d) delete the “Exxxx.xxxx” strings from the commands in the output file (to keep 3D printer firmware happy).

Now arcwelder sees all those G1 commands as movement with extrusion and it converts them to arcs.

Marlin won’t do any of the commands because it won’t move the motor if the extruder temp is below 150C. If you turn off that safety check, then at the very least you will find some moves will slow way down so the extruder accelerations and jerk don’t try to push too much plastic. It could be done, but there are quite a few settings related to extrusion (it is very important in 3D printing, obv.).

I’m glad you found a workaround. I would love it if sandify could use arcs. I could probably do something similar and weld the points at the end. I could probably also then use lower resolution points earlier in the process, which would make the whole thing snappier. I would love making the whole thing think in arcs, but making every operation able to accept arcs instead of just lines is a ton of work.

What happens if you just don’t define an extruder in the configuration files?
It’s easy to delete the Exxx.xxx strings in the output file so the 3D printer firmware won’t get mad. I added it to the sequence in my previous post.

I ran one file multiple times, changing the resolution in arcwelder. At low (r=0.5) resolution settings it converts more of the pattern to arcs. At high resolution settings (r=.005) it converts fewer command sequences to arcs. It would be interesting to run both patterns and see what the differences are, if any, in the sand.

arcwelder input file: clover.gcode (31.8 KB)

low res (r=0.5) output file: clover.aw.gcode (8.1 KB)

high res (r=0.005) output file:clover.aw.hr.gcode (33.3 KB)

I used the command line executable in windows:
D:\Libraries\Downloads\arc\bin>arcwelder.exe -r=.005 clover.gcode clover.aw.hr.gcode

1 Like

It might be more to the point to fork the arcwelder source to not need extrusion, and recognize sandify output. This might break current functionality, so would have to be used with caution.

I can see a few ways that it might NOT break current functionality, and might be usable for CNC as well.

  1. Look instead of a series of moves with no Z component. Well, I’ve seen some 3D printing where it tries to do some Z movement as well, but I’d treat that as an edge case. My printer certainly can’t handle much of that and still be expected to function.

  2. Look for moves where the extrusion rate is CONSISTENT, including zero. Possibly include commanded speeds being consistent. That can be implied with no “F” parameter specified, just like zero extrusion can be implied by no “E” parameter.

In the case of regular slicer output, #1 above there should cover almost all regular cases, and in fact be more reliable, since a retraction move at the end of an extrusion included into the whole arc could actually cause some underextrusion on the whole arc, and a re-priming move going back down could cause overextrusion on another arc, or you might just lose the whole retraction/re-priming. Not likely, though since these are also generally included with a lift/drop motion that will probably not coincide with a curve at reasonable resolutions.

This would almost certainly work well with sfy output, and probably require very modest changes to the existing codebase, so it could probably be forked from the arcwelder repository (Maybe call it “Sandcaster” instead, lol.)

The author of the program says he’ll soon be taking out the requirement that extrusion has to accompany the arc moves. Then it will just be a matter of converting G01 from Sandify to G1.

1 Like

I’ve used ArcWelder a bit on my printer and I’m inclined to say it’s not ready for primetime. It’s a brilliant idea but it will do stupid stuff occasionally. Mind you, so will Cura. My 2 cents… dive in to the “Issues” in the Git and see what people are finding.

I’ve used it recently on small parts and it’s better than it was but it still put a move in there in the middle of a curve which was, unfortunately, a place where dimensional accuracy was very important. It almost looked like a seam but definitely wasn’t.

Interesting - I use ArcWelder all the time for my 3D prints but never had any issues so far.
I wonder if you have enabled or disabled “Use Octoprint Settings” and “G90/G91 Influence Extruder” in ArcWelders’s settings menu?