Skip to content

Add filament calibration feature#855

Open
SmoothBrainIT wants to merge 1 commit into
Donkie:masterfrom
SmoothBrainIT:master
Open

Add filament calibration feature#855
SmoothBrainIT wants to merge 1 commit into
Donkie:masterfrom
SmoothBrainIT:master

Conversation

@SmoothBrainIT
Copy link
Copy Markdown

@SmoothBrainIT SmoothBrainIT commented Feb 21, 2026

Summary

  • Adds a guided calibration workflow attached to filaments, allowing users to run and record results for standard FDM calibration steps (temperature tower, flow rate, pressure advance, VFA, input shaping, and more) directly within Spoolman
  • Calibration data is linked to the filament (not a spool) so settings follow the material across all spools
  • A Calibration Wizard walks users step-by-step with contextual instructions, test-setup inputs, auto-computed results (e.g. PA = step × height), and links to the OrcaSlicer wiki for each step
  • Pressure Advance supports both Tower (auto-compute from step × height) and Pattern / Line (direct entry) methods
  • Steps can be marked Skipped for printers where a step isn't applicable (e.g. Input Shaping on a printer with built-in IS)
  • Calibrated settings are surfaced as a summary panel on the Filament show page

Screenshots

filament_page_with_calibration filament_calibration_wizard

Changes

Backend

  • New calibration_session and calibration_step DB models (spoolman/database/models.py) with two Alembic migrations
  • REST API: full CRUD for sessions and steps under /api/v1/calibration/ with Pydantic response models
  • Integration tests covering create, get, list, update, and delete for both sessions and steps

Frontend

  • CalibrationSection — embedded panel on the Filament show page; lists sessions with status badges and per-step results
  • CalibrationWizard — step-by-step modal with instructions, inputs, auto-computed results, and OrcaSlicer wiki links
  • StepResultDrawer — inline drawer for editing or re-recording a saved step result
  • SessionFormModal — create/edit session metadata (printer name, nozzle diameter, notes)

Other

  • Added .env.production to client/.gitignore to prevent local dev artifacts from being committed

Test plan

  • Create a calibration session on a filament
  • Run through all wizard steps, including Skip on an inapplicable step
  • Verify PA Tower auto-compute (PA = step × height) and Pattern/Line direct entry
  • Edit a saved step result via the drawer
  • Delete a step and a session
  • Confirm calibrated settings summary panel updates correctly
  • Run integration tests: poe itest

Notes

  • i18n: UI copy is currently English-only. Translations will be contributed to Weblate in a follow-up PR.
  • The _skipped sentinel (outputs: { _skipped: true }) is a frontend convention stored in the step's JSON outputs field; it is not a separate DB column.

Adds a guided calibration workflow attached to filaments, allowing users
to run and record results for standard FDM calibration steps (temperature
tower, flow rate, pressure advance, VFA, input shaping) directly within
Spoolman.

Backend:
- New `calibration_session` and `calibration_step` DB models with Alembic
  migrations; sessions are linked to a filament (not a spool) so calibration
  data follows the material
- REST API: CRUD for sessions and steps under `/api/v1/calibration/`
- Pydantic response models with `from_db()` helpers

Frontend:
- `CalibrationSection` embedded on the Filament show page; lists sessions
  with status badges and per-step results in a collapsible panel
- `CalibrationWizard` — step-by-step modal with contextual instructions,
  test-setup inputs, auto-computed results (e.g. PA = step × height), and
  OrcaSlicer wiki links per step
- `StepResultDrawer` — inline drawer for editing/re-recording a saved step
- Pressure Advance supports Tower method (auto-compute) and Pattern/Line
  method (direct entry) via a Segmented toggle
- Steps can be marked as Skipped (sentinel `{ _skipped: true }` in outputs)
  for steps not applicable to a given printer
- `SessionFormModal` for creating / editing session metadata

Tests:
- Integration tests for session and step CRUD covering create, get, list,
  update, and delete

Note: UI copy is currently English-only. i18n strings will be contributed
to Weblate in a follow-up PR.
@SmoothBrainIT
Copy link
Copy Markdown
Author

Roadmap — Open to Additional Ideas

This PR lays the groundwork for calibration data to live in Spoolman. Below are natural next steps we'd love community input on before implementing. All are open for discussion.


🎯 Slicer Profile Export / Import

The most impactful near-term extension. Our calibration results map almost 1:1 to slicer filament profile fields:

Spoolman calibration result OrcaSlicer / Bambu Studio field
Temperature → optimal temp temperature
Pressure Advance → PA value pressure_advance
Flow Rate → flow ratio filament_flow_ratio
Retraction → length & speed filament_retract_length, filament_retract_speed
Volumetric Speed → max flow filament_max_volumetric_speed
Filament bed temp (existing) bed_temperature

Proposed features:

  • Export: Generate a ready-to-import .json filament profile from a completed calibration session (OrcaSlicer / Bambu Studio format initially, PrusaSlicer / SuperSlicer as follow-ups)
  • Import: Parse an existing slicer profile into a Spoolman calibration session, pre-filling results from already-tuned profiles
  • Round-trip: OrcaSlicer already has a Spoolman integration for spool tracking — a deep integration could allow syncing calibration data directly from the slicer

🖨️ Printer Profiles

Currently printer_name is a free-text field on a session. A structured Printer entity would allow:

  • Filtering the calibration summary panel to show only results for the printer you're currently using
  • Storing per-printer flags (e.g. "has built-in Input Shaping" to auto-skip that step)
  • Multi-printer households to track which filaments have been calibrated on which machine

📊 Calibration History & Trends

  • Side-by-side comparison of two calibration sessions for the same filament
  • Charts showing how PA / flow / temp drift over time (useful for detecting filament moisture absorption or aging)
  • "Needs recalibration" flag after a configurable number of prints or elapsed time

🔔 Calibration Reminders / Status Indicators

  • Surface an "uncalibrated" badge on spools using a filament with no completed calibration
  • Opt-in reminders to recalibrate after a threshold of material has been used

🌐 i18n

UI copy in this PR is English-only. All strings are hardcoded candidates for Weblate translation — planned as a follow-up PR once the feature stabilizes.


💡 Other Ideas Welcome

If you have use cases not covered above — different slicer formats, API integrations, mobile QR-scan-to-load-settings workflows — please comment below. This is intentionally left open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant