jshell
Posts: 7
Joined: Sun Jul 12, 2020 8:24 pm

Over extrusion bug

I believe there is a bug in the gcode generation which is triggering an error state in the printer firmware.

The bug only seems to appear on the attached model with a 0.2mm layer height and a 0.4mm line width. If I change either of those parameters the generated gcode is clean.

The stl attached is a popular model that has been printed many times.
HDMI7_Uni_Lid_v24.gcode
(1.38 MiB) Downloaded 101 times
On line 908 and 933 you'll see a large extrusion right before a large change in travel distance. It seems to me that this is an off by one error. If I replace the extrusion value on the offending lines with something more reasonable the print proceeds without error or defect with the large extrusion occuring on the same line as the large travel giving an extrusion to travel ratio that is similar to all other travel movements.

This has been reported on Klipper forums over the years but I don't know how many times it's been reported here.

[Edit] For anyone facing this bug, while we wait for a fix I've written a little post processor that fixes the issue and allows those broken files to print.
https://github.com/jasonshelley/S3DExtrusionFix
Barely tested! Use at your own risk.
Last edited by jshell on Tue Jul 28, 2020 8:58 pm, edited 2 times in total.
S3D-Alex
Posts: 456
Joined: Thu Aug 30, 2018 1:23 pm

Re: Over extrusion bug

It does indeed look like the E value for line 903 is one off so to speak. Could you please post a Factory File so we can look into this a bit further?
jshell
Posts: 7
Joined: Sun Jul 12, 2020 8:24 pm

Re: Over extrusion bug

Thanks for your response. I've resliced the original STL and the bug as reared its ugly head again. I've hit this bug on another model as well in recent days.
HDMI7_Uni_Lid_v24.test.gcode
(1.34 MiB) Downloaded 94 times
On lines 788 and 795 you'll see the same off by one error. I've written a little app to find these lines btw. I'm not scanning manually ;-)

Cheers
Attachments
HDMI7_Uni_Lid_v24.factory
(215.9 KiB) Downloaded 96 times
jshell
Posts: 7
Joined: Sun Jul 12, 2020 8:24 pm

Re: Over extrusion bug

Further experimentation: By changing the X offset I can make the error change lines, or not appear at all. In the attached file, if I use any offset from -187.99 to -187.91, except the calculated value of -187.92 the error is not present. If I shift the model to an integral offset the error changes lines, but changes to the same line numbers for any given integer offset that I've tried. (Lines 1421 and 1428) This strongly suggests a rounding error which is at quite a low level as it seems to effect everything. Good luck!

Thanks again
S3D-Alex
Posts: 456
Joined: Thu Aug 30, 2018 1:23 pm

Re: Over extrusion bug

Thank you so much for posting this info! We investigated this more on our end and it definitely does look to be an issue. I have documented the problem for our development team to look into. Thank you again for being so on top of this!
jshell
Posts: 7
Joined: Sun Jul 12, 2020 8:24 pm

Re: Over extrusion bug

Extra extra info. I'm set my app to run as a post processing step and there are errors in most files. My criteria is that the line width must be <= the indicated line width * the greater of the line width multipliers. Most errors are well below the 0.64mm^2 cross sectional area limit that triggers the firmware error state. For instance if I have a 0.4mm line width and I say I want single line extrusions with a max of 150%, then I expect a max line width of 0.6mm, but I'll see lines of 0.8 to 1.2 (most commonly). Actual big errors are more rare.

Cheers
S3D-Alex
Posts: 456
Joined: Thu Aug 30, 2018 1:23 pm

Re: Over extrusion bug

jshell wrote: Mon Aug 03, 2020 6:19 pm Extra extra info. I'm set my app to run as a post processing step and there are errors in most files. My criteria is that the line width must be <= the indicated line width * the greater of the line width multipliers. Most errors are well below the 0.64mm^2 cross sectional area limit that triggers the firmware error state. For instance if I have a 0.4mm line width and I say I want single line extrusions with a max of 150%, then I expect a max line width of 0.6mm, but I'll see lines of 0.8 to 1.2 (most commonly). Actual big errors are more rare.

Cheers
Could you post a gcode or Factory File where you are seeing this issue?

Return to “Troubleshooting and Bug Reports”