Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Retractions are not counted in total filament used #413

Open
3 tasks done
vehystrix opened this issue Oct 18, 2024 · 1 comment
Open
3 tasks done

[Bug]: Retractions are not counted in total filament used #413

vehystrix opened this issue Oct 18, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@vehystrix
Copy link

The problem

The filament used counter is incorrect, because it only counts positive values for the extruder. So depending on the model and the retraction settings, the total count will be off by a lot.

To reproduce, I sliced a simple cube with a retraction length set to an absurd 10mm.
Total extrusion length (sum of all positive G1 Exxx) of 7358.76547mm
Total retraction length (sum of all negative G1 E-xxx) of -3230mm
For a net total of 4128.76547mm of filament used

Screenshot of the dashboard when the print is almost done:
image

Or, as reported by the slicer:
image

The GCODE I used:
Cube_0.2mm_PLA_Elegoo Neptune 3 Plus_54m30s.txt

I calculated the totals using the following powershell commands:
Extrusion: Get-Content -Path 'Cube_0.2mm_PLA_Elegoo Neptune 3 Plus_54m30s.txt' | Select-String -Pattern 'G1.*E([0-9.]+)' | ForEach-Object {$_.Matches.Groups[1].Value} | Measure-Object -sum
Retraction: Get-Content -Path 'Cube_0.2mm_PLA_Elegoo Neptune 3 Plus_54m30s.txt' | Select-String -Pattern 'G1.*E(-[0-9.]+)' | ForEach-Object {$_.Matches.Groups[1].Value} | Measure-Object -sum
Net total: Get-Content -Path 'Cube_0.2mm_PLA_Elegoo Neptune 3 Plus_54m30s.txt' | Select-String -Pattern 'G1.*E([-0-9.]+)' | ForEach-Object {$_.Matches.Groups[1].Value} | Measure-Object -sum

I took a quick look at the dashboard code, and from what I can see here only positive values for e are processed for some reason

Version of OctoPrint

1.10.2

Platform

Intel x64

Operating system running OctoPrint

Debian linux

Dashboard version

1.19.12

Python version

3.11.2

Printer model & used firmware incl. version

Neptune 3 Plus on Marlin 2.1.1

Browser and version of browser, operating system running browser

Firefox 131.0.3 on Windows 10

Logs and other files needed for analysis

  • Systeminfo Bundle (always include!) See here if you don't know where to find that.
  • GCODE file with which to reproduce (always include if the issue happens while printing!)
  • Screenshots and/or videos showing the problem (always include in case of issues with the user interface)

File uploads & additional information

No response

@vehystrix vehystrix added the bug Something isn't working label Oct 18, 2024
@georgandersen
Copy link

Thanks for explaining the issue.
I am using a retraction of 5mm, so that's why extruded filament always is more than calculated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants