Jump to content

Arc Welder Anti Stutter plugin


ahoeben

Recommended Posts

Posted (edited) · Arc Welder Anti Stutter plugin

I'm working on a plugin that wraps FormerLurker's command line version of the ArcWelder plugin originally developed for OctoPrint. The plugin attempts to reduce stutter by simplifying gcode. It analyses subsequent G0 or G1 movements that make up arcs and replaces these sequences with G2 or G3 lines. Gcode containing these arcs may or may not print well on your printer, depending on the type of controller and the configuration of the firmware. For more information about ArcWelder, read the description of the original plugin, and the discussion of realworld results.

 

3dbenchy_before_after.png

Gcode before and after GCode processing by Arc Welder. The image above is gcode created with PrusaSlicer with and visualized with ncviewer. Image by FormerLurker

 

An early development version of the plugin for Cura 4.4 and later can be downloaded here: Cura-ArcWelderPlugin Cura-ArcWelderPlugin (once available from the Marketplace, the plugin will be compatible with Cura 3.5 and newer). You can install it by dropping the file onto the Cura buildplate as if you were opening a 3d model.

 

The plugin adds settings to the "Special Modes" category. You can easily find these settings by typing `Arc Welder` in the search field on top of the Custom settings panel.

 

The plugin has not had extensive testing, and is fairly barebones at the moment. I have not personally tested printing with curve commands yet.

 

When discussing results, it helps to include what printer you use, how you print (via USB or SD), and if you have customised the electronics or firmware at all.

 

Edit: updated link to newer development snapshot

Edit 2: the plugin is now available from the Ultimaker Marketplace; no need to manually install development snapshots.

Edited by ahoeben
  • Like 5
Link to post
Share on other sites

  • ahoeben changed the title to Arc Welder Anti Stutter plugin
Posted · Arc Welder Anti Stutter plugin

Thank you for putting this together. I have been following the Arc Welder development for a long time and even tested the early stages of ArcWelder (when it was called AntiStutter). Looking forward when it is fully developed.

One question: Does the current beta version of the Cura plugin also work in vase mode (Spiralize Outer Contour)?

  • Link to post
    Share on other sites

    Posted (edited) · Arc Welder Anti Stutter plugin

    I sliced this part both with ArcWelder and without (guessing what this is gets a prize!).  It was the only change between the two slices and the resultant Gcode files.  I printed about 12mm of each file.  Max Resolution 0.8 and Max Deviation .025 and the Arc settings were Max R 1,000,000 and Tolerance 1%.  I'm in compatibility mode so no fancy views of the layers.  I'll attach the STL file.  I did not read through all the background material.  Just dropped it into Cura, restarted, and sliced the part.

    Ind4.thumb.png.7f67fe41b168cf3dd50d7f0cab497b73.png

    The file size using ArcWelder is about 10% of the same file without ArcWelder.  That was true of the three models I sliced.  All three models were basically round.

     

    It is really difficult to quantify the resolution difference between the two test prints.  At this point I'm going to say that the print using ArcWelder is very marginally nicer than the conventional print.  I aborted each print at a different point, but I will guess that the printing time would be the same with either file.

     

    *When the console portion started, my anti-virus wasn't happy.  It took a bit for it to decide to let it run.

     

    ** Creality Ender3Pro with: All metal hot end, Creality 1.1.5 mainboard, Marlin 1.1.8

    IND Cyl4.stl

    Edited by GregValiant
    Add info
  • Link to post
    Share on other sites

    Posted · Arc Welder Anti Stutter plugin
    8 hours ago, PricklyPear said:

    Does the current beta version of the Cura plugin also work in vase mode (Spiralize Outer Contour)?

    The current version does not, but FormerLurker is working on a version of the ArcWelder tool that does.

  • Link to post
    Share on other sites

    Posted · Arc Welder Anti Stutter plugin
    8 hours ago, GregValiant said:

    I sliced this part both with ArcWelder and without

    When discussing results, it helps to include what printer you use, how you print (via USB or SD), and if you have customised the electronics or firmware at all.

  • Link to post
    Share on other sites

    Posted · Arc Welder Anti Stutter plugin
    6 hours ago, UbuntuBirdy said:

    [Error 13] Keine Berechtigung

    I think that due to the way I created the package, the executable flag on the ArcWelder tool may be missing. I'll look in to that.

  • Link to post
    Share on other sites

    Posted (edited) · Arc Welder Anti Stutter plugin

    My First test with your PlugIn .. Works great on my Creality machine (basic Stock machine , no firmware modification, printing from sd card). No real difference of quality .. But the G02/G03 interpolation part is a "little" bit faster on the machine but not significant. 

     

     

    126981980_1470846176455074_1670163064617322411_o.jpg

     

    G1-G2G3.jpg

    Edited by Cuq
    Add Image G1 /G2G3
  • Link to post
    Share on other sites

    Posted (edited) · Arc Welder Anti Stutter plugin

    This is the representation in Cura when I sliced the model.

    T2.thumb.png.e96397c3051f84c03d56a1070a0b912d.png

     

    This is the Gcode file opened in Cura.  I assume Cura didn't know what to do with the G2 and G3 codes. 

    T1.thumb.png.f9cc6647ffdd2294fcdfe4d2265ebab2.png

     

    The model.

    T3.thumb.png.134377f997246d705ec4b8fad8279f40.png

    Edited by GregValiant
    Add image
  • Link to post
    Share on other sites

    Posted · Arc Welder Anti Stutter plugin
    10 hours ago, GregValiant said:

    I assume Cura didn't know what to do with the G2 and G3 codes. 

     

    That is correct. Cura normally does not output G2/G3 gcodes (nor do any other popular slicers), so there is no need to visualize them. Now that there's an egg, I can work on the chicken.

  • Link to post
    Share on other sites

    Posted · Arc Welder Anti Stutter plugin
    13 hours ago, Cuq said:

    printing from sd card

    The ArcWelder was originally conceived to reduce stutter resulting from buffer underruns while sending many small gcode moves over the USB connection. The protocol for printing over USB is rather inefficient, and if processing the transfer of a gcode command takes longer than actually doing the move then you get a stutter. Printing from SD does not suffer from this.

    • Like 1
    Link to post
    Share on other sites

    Posted · Arc Welder Anti Stutter plugin

    Thanks for you comment @ahoeben . Finaly this 

    solution is not for me, I'm always printing from the SD card and on a test part like the Benchy I can see a lost of quality on small radius without real benefits on printing time. But I'm pleased to have run my machine in G2/G3 mode for the first times. It was not a wast of times. Thanks again for the amazing work you made for the community.

  • Link to post
    Share on other sites

    Posted · Arc Welder Anti Stutter plugin
    2 minutes ago, Cuq said:

    Thanks again for the amazing work you made for the community.

    Thanks, but in this case the amazing work has been done by FormerLurker.

    • Like 3
    Link to post
    Share on other sites

    Posted · Arc Welder Anti Stutter plugin

    So, I wanted to mention two changes to Arc Welder:

     

    1.  Vase Mode (3D arcs) seems to be working well so far.  I've printed several, and haven't had any issues  However, I'd still love to have a few testers if anyone is interested. Here is a link to the original feature request.

    2.  I added two new settings that enable Firmware Compensation for printers that do not have all of the goodies in Marlin 2, like MIN_ARC_SEGMENTS.  Typically these printers have only one real arc interpolation adjustment: MM_PER_ARC_SEGMENT, which is typically set to 1mm.  This is producing the flat edges that @Cuq saw.  It simulates the MIN_ARC_SEGMENTS setting (I suggest setting this to 12) at the cost of producing fewer arcs.  See this link for details and photos showing the differences of having this enabled vs not.

     

    For the console application, you can enable 3D arcs with either of these two flags:  --allow-z-axis-changes, -z

    I'm thinking of changing the parameter to --allow-3d-arcs since that is more intuitive.  Let me know if this seems reasonable.

     

    To enable firmware compensation BOTH of these flags must be included and must be greater than 0:  --mm-per-arc-segment and --min-arc-segments (or -s and -a if that's the way you roll!)

     

    For most firmware that has the 'flat arc' issue, adding this will suffice:  --mm-per-arc-segment=1 --min-arc-segments-12

     

    Also, the code for both of these enhancements is in the devel branch of both the ArcWelderPlugin and ArcWelderLib.

     

    Thanks to @fieldOfView for getting this done!  It would have been a couple of months before I would have gotten around to it, and I'm sure it would have taken me 10x longer to do :)

    • Like 5
    Link to post
    Share on other sites

    Posted · Arc Welder Anti Stutter plugin

    I can't seem to edit my post yet, but here is a correction to the firmware compensation parameters:

    --mm-per-arc-segment=1 --min-arc-segments=12

    I had a dash where it should have been an equal sign.

  • Link to post
    Share on other sites

    Posted (edited) · Arc Welder Anti Stutter plugin

    Thanks @FormerLurker for this information. Where can we find the updated release of the console application ?  the source code on github seems to be an old version.

    Edited by Cuq
  • Link to post
    Share on other sites

    Posted · Arc Welder Anti Stutter plugin

    @Cuq, it looks old because I haven't updated the master branch.  Find the most recent artifacts here. You can see which branch they are associated with on the right.  Find 'ArcWelder' or 'ArcWelder.exe' in the bin folder of the zip and run with the --help flag for documentation.  Let me know how it goes!

     

    • Like 1
    Link to post
    Share on other sites

    Posted · Arc Welder Anti Stutter plugin

    So, I made an executive decision and renamed allow---z-axis-changes to --allow-3d-arcs.  I figure that's easier to understand, and better to do it now than later.  The artifacts should be rebuilding as we speak.

    Also, there is no raspberry pi console app in case anyone is wondering.  I can build one, but still working to get a self hosted runner so that it's automatic.

    • Like 2
    Link to post
    Share on other sites

    Posted · Arc Welder Anti Stutter plugin

    Ok , I will wait for an update from @ahoeben and then I will give a try to your new options to test if it's solved the issue on small arc on a basic machine like mine.  Thanks a lot for your work @FormerLurker I hop it will push a little bit the 3D printing limits 

  • Link to post
    Share on other sites

    Posted · Arc Welder Anti Stutter plugin
    On 11/23/2020 at 7:41 PM, FormerLurker said:

    I can't seem to edit my post yet, but here is a correction to the firmware compensation parameters:

    --mm-per-arc-segment=1 --min-arc-segments=12

    I had a dash where it should have been an equal sign.

    Hello @FormerLurker,

     

    We should use :

    • --mm-per-arc-segment=1 
    • --min-arc-segments=12

    or 

    • -a=1 
    • -s=12

    What is the recommanded  command syntax ?

    Cmd.JPG

  • Link to post
    Share on other sites

    Posted · Arc Welder Anti Stutter plugin

    @cuq, either works.  One is shorthand, the other is a bit more verbose.  This is a standard feature of the command line parameter library I am using.

  • Link to post
    Share on other sites

    Posted (edited) · Arc Welder Anti Stutter plugin

    ok .. I have made some minor modification on the @ahoeben Plug-in for my own tests.  I will made some tests regarding  you new settings this weekend. I will give you some feedback.   I only have an Ender-3; so I don't know if this machine will support the 3D circular interpolation.  I don't expect to get real benefits in terms of quality or machine dynamique but I want to test if your new settings will give the possibility to respect the initial small radius shape on this machine.  

    Right now, just on the the theoretical point of view the conversion into 3D arc is correct . Let's see tomorrow if it's ok in the real life.

    Edited by Cuq
    • Like 2
    Link to post
    Share on other sites

    Posted (edited) · Arc Welder Anti Stutter plugin

    First results, the plugin works fine now, and G02 G03 movements with Z also work well on my Marlin firmware.

    Finally, contrary to what I expected on a simple high-speed part, circular interpolation eliminates certain micro-pauses in the machine which generate slight defects on the print.

    Inked20201128_141123_LI.jpg

    Edited by Cuq
    • Like 1
    Link to post
    Share on other sites

    Posted · Arc Welder Anti Stutter plugin

    The new options minimum number of segments  and mm per arc segment  do the job.  With a slight reduction of the Gcode size compression (54% intstead of 57% ) the smallest radius are now correct.  

    Using the recommanded settings 

    • minimum number of segments  =12
    • mm per arc segment  = 1.0

     

    IMG_5981.jpg

    • Like 1
    Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

    • Our picks

      • UltiMaker Cura 5.8 Stable released 🎉
        In the Cura 5.8 stable release, everyone can now tune their Z seams to look better than ever. Method series users get access to new material profiles, and the base Method model now has a printer profile, meaning the whole Method series is now supported in Cura!
        • 5 replies
      • Introducing the UltiMaker Factor 4
        We are happy to announce the next evolution in the UltiMaker 3D printer lineup: the UltiMaker Factor 4 industrial-grade 3D printer, designed to take manufacturing to new levels of efficiency and reliability. Factor 4 is an end-to-end 3D printing solution for light industrial applications
          • Thanks
          • Like
        • 3 replies
    ×
    ×
    • Create New...