OrcaSlicer
OrcaSlicer copied to clipboard
feat: add native Export for Snapmaker U1 (bl2u1 integration)
Summary
This PR integrates the bl2u1 converter as a native OrcaSlicer feature, adding a File → Export → Export for Snapmaker U1... menu item.
bl2u1 is a standalone Flask web app that converts Bambu Studio .3mf projects to Snapmaker U1-compatible format. This integration brings that conversion directly into OrcaSlicer with no external tools needed.
What it does
- Adds a filament-mapping dialog that shows each extruder slot with a colour picker and filament-type dropdown (max 4, matching U1 hardware)
- Auto-maps filament types → Snapmaker U1 preset names (
PLA→Snapmaker PLA SnapSpeed @U1, etc.) - Applies the Snapmaker U1 printer profile from the profile library to the exported config
- Pads the filament list to exactly 4 slots, filling unused slots with white PLA (same behaviour as bl2u1)
- Remaps per-volume extruder IDs so multi-colour prints transfer correctly
- Exports the modified project non-destructively (live scene is not changed) via the existing
store_bbs_3mf()infrastructure
Files changed
| File | Change |
|---|---|
src/slic3r/GUI/ExportSnapmakerU1.hpp |
New – types, constants, ExportSnapmakerU1Dialog class |
src/slic3r/GUI/ExportSnapmakerU1.cpp |
New – dialog UI implementation |
src/slic3r/GUI/Plater_export_snapmaker_u1.cpp |
New – Plater::export_snapmaker_u1() |
src/slic3r/GUI/Plater.hpp |
+1 line – function declaration |
src/slic3r/GUI/MainFrame.cpp |
+3 lines – menu item after "Export Generic 3MF" |
src/slic3r/CMakeLists.txt |
+2 lines – register new source files |
User flow
File → Export → Export for Snapmaker U1…
│
▼
Filament mapping dialog
┌──────────────────────────────────────┐
│ ✓ Filament 1 [■ colour] [PLA ▾] │
│ Profile: Snapmaker PLA SnapSpeed │
│ → Slot 1 │
│ ✓ Filament 2 [■ colour] [PETG ▾] │
│ → Slot 2 │
│ □ Filament 3 (excluded) │
└──────────────────────────────────────┘
│ OK → wxFileDialog → .3mf
Test plan
- [ ] Build compiles without errors on Linux, macOS, Windows
- [x] Menu item appears under File → Export when a model is loaded
- [x] Menu item is greyed out when no model is loaded
- [ ] Dialog shows correct filament count from the active project
- [x] Enabling >4 filaments is blocked with an appropriate message
- [ ] Output
.3mfopens in OrcaSlicer with Snapmaker U1 printer selected - [ ] Output
.3mfopens in Snapmaker Luban without errors - [ ] Multi-colour model retains correct extruder assignments after export
- [x] Live scene is unchanged after export (non-destructive)
🤖 Generated with Claude Code