Repository navigation
Add native Bambu Studio .3mf export with layer color swaps - #67
Merged
Merged
Conversation
rbd3453
commented
Nov 13, 2026
Contributor
- Implement autoforge.helpers.export_3mf for native Bambu Studio / OrcaSlicer OPC archive packaging
- Parse swap_instructions.txt to sequence layer tool changes with exact top_z boundaries
- Auto-center models on build plate with z=0 flush alignment
- Configure dual-variant H3C filament profiles and 100% zig-zag infill to prevent profile reset warnings
- Add one-click .3mf download in WebUI FileMenu and bundle into project export ZIP
- Implement autoforge.helpers.export_3mf for native Bambu Studio / OrcaSlicer OPC archive packaging - Parse swap_instructions.txt to sequence layer tool changes with exact top_z boundaries - Auto-center models on build plate with z=0 flush alignment - Configure dual-variant H3C filament profiles and 100% zig-zag infill to prevent profile reset warnings - Add one-click .3mf download in WebUI FileMenu and bundle into project export ZIP
rbd3453
marked this pull request as ready for review
November 13, 2026 17:54
The 3mf export was hardwired to a single Bambu printer. It now builds the project from OrcaSlicer's own printer, process and filament presets. - Bundle a small index of Orca's printers (1167 of them), not the profiles - Fetch a printer's profile files from Orca's GitHub on first use and cache them - Swaps come from the solution/sliders instead of parsing the instructions text - Printers without AMS/MMU/tool changer pause with their own pause G-code - Add a flush matrix and keep the wipe tower spot on the bed, or Orca won't slice - Faster STL reading with numpy - No automatic 3mf at the end of every run; --orca_printer for the CLI
- File > Slicer project opens a dialog: search or brand/printer/nozzle - Choose between the printer's own filament changes and pausing for a hand swap - The choice is saved in the project, so the export zip includes the 3mf too - Send the resolved base filament with the zip and 3mf requests
- Export runs as a background task with progress, cancel and a one-time download - Load a printer's profiles ahead of time, downloads in parallel - Read the STL while the printer settings load - Faster vertex merging, mesh cache for re-exports, zip level 1
- Ask for the printer only the first time, then export in one click - Progress card with stage, percentage, cancel and retry - Picker: search with keyboard, popular printers, 0.4 mm nozzle first - Printer section in the settings; reset keeps the printer - Fetch the printer's profiles while it is being picked
- Use the printer's preset for the nozzle the result was made with - Warn when the printer has no preset for that nozzle (dialog, export card, zip, CLI) - Picker offers the preset closest to the configured nozzle first - Prefetch the preset the export will actually use - Picking a printer no longer marks the result as outdated
- Optional AutoForge print settings (on by default), from published colour-layer presets - Write every option with Orca's defaults; a missing one came from another printer - Leave different_settings_to_system empty so Orca uses the project as written - Clamp values to Orca's ranges and fix profile contradictions it refuses - Convert legacy wall_infill_order and hybrid supports like Orca does on load - Split a base thicker than a small nozzle into whole layers - Use the native rectilinear name, drop pellet and 2 mm+ nozzle printers - Every one of the 1162 printers slices in OrcaSlicer 2.5, with and without the settings
- Checkbox in the printer dialog with a list of what it changes - Remembered with the printer, shown in the settings, kept on reset
- Hand swaps are pause entries in the 3mf instead of change-filament G-code - OrcaSlicer skips that G-code on the first tool change, which on Bambu was the first swap - Raise the printer's max layer height when AutoForge's layers are thicker - Integration test checks layer and base heights in the G-code, incl. Bambu hand swaps
- tests/test_orca_printer_sweep.py: one test per printer and mode, off unless AUTOFORGE_ORCA_SWEEP is set - Slices in parallel, then retries failures one at a time - Shared slicing and G-code checks in tests/orca_slicing.py, unit-tested
- List every option as changed, so Orca doesn't load the printer's stock profile - Rename the print settings option to AutoForge print settings
Owner
|
Thanks for the PR. I expanded it a bit, as your PR only focused the H3C printer. Now users can simply select the printer from a list they want and the 3mf is created for exactly that printer. I also added recommended settings for the 3mf from some online guides. |
Contributor
Author
|
Very cool, thank you for everything on this project! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.