FormerLurker / ArcWelderPlugin

A plugin for OctoPrint used to convert G0/G1 commands to G2/G3 commands. Reduce the size of your gcode files, and reduce number of gcodes per second sent to your printer.
Other
444 stars 25 forks source link

Artifact on arc-welded file #233

Closed ldursw closed 2 years ago

ldursw commented 2 years ago

I've noticed some artifacts on a model with lots of arcs. I'm not sure if this is my configuration or something else.

Preview without arc-welder ![image](https://user-images.githubusercontent.com/37294448/166741148-d021ae28-3db3-4f2a-91f4-f0473dbed330.png) ![image](https://user-images.githubusercontent.com/37294448/166741161-aa2c304f-5f74-45ca-84b3-9e5f767cd913.png)
Preview with arc-welder ![image](https://user-images.githubusercontent.com/37294448/166741199-60f9dc96-1548-41b0-a04e-f4732f37a36c.png) ![image](https://user-images.githubusercontent.com/37294448/166741205-0ec8f064-cffc-444b-9d52-4808d7f19326.png)
Version v1.1.0rc4

Plugin Status: Enabled
Pre-Processing Types: All New Files
G90 Influences Extruder: true (using octoprint settings)
Allow 3D Arcs: True
Allow Travel Arcs: True
Resolution: 0.025mm (max deviation ±0.0125mm)
Path Tolerance: 0.5%
Extrusion Rate Variance: 0.3%
Dynamic GCode Precision: Enabled
Default XYZ Precision: 6 decimal places
Default E Precision: 6 decimal places
Maximum Arc Radius: 9999mm
Maximum GCode Length: Unlimited
Firmware Compensation: Disabled
Output File Name: source_file_name.aw.gcode
Delete Source File: Disabled
Print After Processing: Disabled
Select After Processing: Always

Source File: hominho_livro3.gcode
Target File: hominho_livro3.aw.gcode
Arcs: Created 60.2K from 575.2K extrusions
Flowrate Changes: 15.1K arcs aborted
Target/Source Extrusions: 131.0K ⁄ 645.3K = 79.7% reduction
Target/Source Travels: 18.0K ⁄ 18.7K = 3.5% reduction
Compression: 3.0∶1 (66.7%)
File Size: 18.9 M - 12.6 M = 6.3 M
Line Count: 687.0K - 575.2K = 111.8K
Processing Time: 10 seconds

Slicer settings image

STL and both gcode files

FormerLurker commented 2 years ago

The preview is NOT indicative of the quality you will get, unfortunately. I actually added the visualization for G2/G3 to the prettygcode viewer you are using :) Simplify (which doesn't need to run in a browser) does a better job:

image

Also 6 decimal places of XYZ precision is probably not necessary. Not many printers can move accurately on the micron scale :) This will just cause the gcode to be larger than it needs, taking more serial transfer time. My calipers won't even measure that.

Your precision (0.025) is twice the maximum deviation (0.05) that is configured in cura. If you want, drop your maximum deviation in cura down to 0.025 or even lower. This actually helps arcwelder find more arcs, and more closely match your geometry. 0.05 (the default) is likely below what you will be able to see without a magnifying glass/microscope. This is pretty close to the maximum resolution for most printers. I would set Maximum Deviation in cura to 0.025 and resolution in arcwelder to 0.05. Warning: if you print non-arcwelded files you should reset the maximum deviation, else this might introduce stuttering. Remember, cura's solution to stuttering is to 'downsample' the print.

Anyway, as an experiment you could try printing two small conical objects with the defaults, one welded and the other not, and see if you can tell the difference. Your firmware settings are probably more important, regarding how well G2/G3 commands come out.

Does that help

ldursw commented 2 years ago

I've sliced the model again with Maximum Deviation set to 0.02 and changed the Arc-Welder settings to 0.05 resolution, 3 decimal places for XYZ, 5 decimal places for E, 1% extrusion rate variance and printed it. PrettyGCode still shows the artifact but the print turned out flawless.

You're right, this is not a resin printer and the added resolution was just wasting processing time. The firmware would have to do all the precise calculations but the motors can't physically be that precise. Your suggestion increased the compression from 66.7% to 78%.

Thanks a lot for your help and this awesome plugin.

FormerLurker commented 2 years ago

Awesome!!!!

FYI, the next thing you might want to check out is your arc interpolation settings. Prusa Firmware for the MK2/3 will soon have a gcode to control this, but as far as I know all other firmware (besides klipper actually) requires a recompile to adjust them. If you're running Marlin 2.x, you should be fine with the defaults.

Enjoy!