Input variables
| Variable | Meaning | Unit |
|---|---|---|
| total | Loaded spool mass | g |
| empty | Empty spool mass | g |
| d | Filament diameter | mm |
| rho | Material density | g/cm3 |
| job | Slicer filament estimate | g |
Equations
Filament remaining · g
mass = max(0,total-empty)
Estimated remaining length · m
length = mass/(rho*PI*(d/2)**2)
Whole jobs before reserve · jobs
jobs = floor(mass/max(job,0.001))
Notation
PI means π. ** means a power, sqrt means square root, and abs gives the absolute value. Trigonometric functions use radians. min and max select the smallest or largest argument.
ceil rounds upward, floor rounds downward, and round rounds to the nearest integer with halves toward positive infinity. roundup(value, step) rounds upward to the next multiple of the step; a zero step leaves the value unchanged.
Assumptions
- Density is a user-supplied material value. Filled filaments can differ substantially from ordinary PLA.
- A wrong empty-spool mass directly changes the remaining-material estimate.
- The length conversion accounts for square millimeters to cubic centimeters and meters.
- Purge lines, supports, waste and a reserve are additional to an object-only slicer estimate.
Precision and verification
The tool uses ordinary double-precision numeric arithmetic. Output is displayed to at most four decimal places; measurement precision is usually much lower. Check the worked examples, your project’s specifications, and a real sample before committing material.