G-code Filament Usage Estimation #47

Open
opened 2026-01-16 05:23:20 +00:00 by tonym · 0 comments
Owner

Summary

Import G-code files to estimate filament consumption before printing.

Upstream Issue

Use Case

For printers without OctoPrint/Moonraker integration (e.g., Bambu Lab X1C):

  1. Upload G-code file
  2. Parse filament usage estimates
  3. Check against current spool inventory
  4. Warn if insufficient filament

Proposed Features

1. G-code Parser

  • Extract filament usage from slicer comments
  • Support: PrusaSlicer, Cura, BambuStudio, OrcaSlicer
  • Parse multi-material usage

2. Pre-Print Check

  • Upload G-code, select spool(s)
  • Show if spool has enough filament
  • Suggest alternative spools if not

3. Quick Decrement

  • After successful print, one-click to subtract used amount
  • Or manual entry if actual differs from estimate

4. Batch Upload

  • Upload multiple G-codes
  • Sum total usage for project planning

Technical Notes

G-code comments vary by slicer:

; filament used [mm] = 1234.56
; filament used [g] = 12.34
; total filament used [g] = 12.34
  • Print job tracking (post-processing integration)
  • #39 Usage Statistics Dashboard
## Summary Import G-code files to estimate filament consumption before printing. ## Upstream Issue - https://github.com/Donkie/Spoolman/issues/430 (feature 2) ## Use Case For printers without OctoPrint/Moonraker integration (e.g., Bambu Lab X1C): 1. Upload G-code file 2. Parse filament usage estimates 3. Check against current spool inventory 4. Warn if insufficient filament ## Proposed Features ### 1. G-code Parser - Extract filament usage from slicer comments - Support: PrusaSlicer, Cura, BambuStudio, OrcaSlicer - Parse multi-material usage ### 2. Pre-Print Check - Upload G-code, select spool(s) - Show if spool has enough filament - Suggest alternative spools if not ### 3. Quick Decrement - After successful print, one-click to subtract used amount - Or manual entry if actual differs from estimate ### 4. Batch Upload - Upload multiple G-codes - Sum total usage for project planning ## Technical Notes G-code comments vary by slicer: ```gcode ; filament used [mm] = 1234.56 ; filament used [g] = 12.34 ; total filament used [g] = 12.34 ``` ## Related - Print job tracking (post-processing integration) - #39 Usage Statistics Dashboard
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: tonym/spoolman2#47
No description provided.