Skip to content

Write Bambu Studio's setting values in Bambu 3mf exports - #71

Merged
hvoss-tech merged 1 commit into
hvoss-tech:mainfrom
IsraelShok:fix/bambu-3mf-layer-height
Nov 20, 2026
Merged

hvoss-tech merged 1 commit into
hvoss-tech:mainfrom
IsraelShok:fix/bambu-3mf-layer-height

Conversation

@IsraelShok

@IsraelShok IsraelShok commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #72

Problem

Bambu Studio refused 3mf projects exported for Bambu Lab printers ("Invalid parameter value(s) included in the 3mf file.").

The export writes some settings with OrcaSlicer's value names. Bambu Studio names these values differently and replaces a value it doesn't know with its default:

key = "sparse_infill_pattern"	 old_value = "rectilinear	new_value = "cubic"
key = "ensure_vertical_shell_thickness"	 old_value = "none	new_value = "enabled"
key = "enable_arc_fitting"	 old_value = "disabled	new_value = "0"

Cubic infill at the export's 100 % density is invalid in Bambu Studio, so it refused the project.

Fix

New make_bambu_compatible() in Export3MF.py, run for Bambu (BBL) printers only. It writes Bambu's value names:

  • rectilinear becomes zig-zag for the infill, surface and ironing patterns
  • arc fitting disabled/enabled becomes 0/1
  • vertical shell thickness becomes 0/1 (Bambu has no "off" level; 0 is "partial", which has no effect with every layer solid)

OrcaSlicer converts each of these back on load (handle_legacy). These are value-only conversions, so Orca doesn't add the keys to different_settings_to_system and doesn't reset the project to the system preset.

Testing

  • Two new unit tests in tests/test_slicer_project.py; the slicer test files pass (100 tests).
  • Bambu Studio 2.9.1.70 CLI on exports for all 14 Bambu 0.4 nozzle printers: all slice, Bambu substitutes no values, and the G-code has the project's layer_height (0.04).
  • Every exported value was checked against Bambu Studio's option definitions (PrintConfig.cpp at v02.09.01.70) for all Bambu printers and nozzles.
  • Every key of each export was compared with the config Bambu Studio dumped into the G-code. All AutoForge settings arrive as written; the only differences are Bambu's list formatting and the per-variant lists it trims to the active nozzle.
  • A real web UI export (P1S, 4 PETG filaments, 0.04 mm layers) slices in Bambu Studio with 61 layers at 0.04 mm.
  • Hand-swap mode on a P1S: the pause (M400 U1) lands on the swap layer.
  • Not tested: opening an export in OrcaSlicer (not installed here). Compatibility with OrcaSlicer is based on reading its v2.5.0 source.

🤖 Generated with Claude Code

Bambu Studio names some values differently from OrcaSlicer and swaps a
name it doesn't know for its default. The 100 % "rectilinear" infill
became "cubic", which it refuses at that density, so it dropped the
project's settings and opened the stock 0.2 mm profile instead of the
AutoForge layer height.

For Bambu printers, write Bambu's names: "zig-zag" for rectilinear
patterns, 0/1 for arc fitting and vertical shell thickness. OrcaSlicer
converts these back on load, so the project still opens there.

Checked with the Bambu Studio 2.9.1.70 CLI on every Bambu 0.4 nozzle
printer: all slice, no value substitutions, 0.04 mm layers in the G-code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@IsraelShok IsraelShok changed the title Keep the project's settings when Bambu Studio opens the 3mf Write Bambu Studio's setting values in Bambu 3mf exports Nov 19, 2026
@hvoss-tech

Copy link
Copy Markdown
Owner

Thank you very much for the PR :)

@hvoss-tech
hvoss-tech merged commit 3f499d4 into hvoss-tech:main Nov 20, 2026
3 of 4 checks passed
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.

Bambu Studio refuses the Bambu 3mf export: Orca-only setting values

2 participants