Export finished STL meshes to a real Bambu Studio .3mf PROJECT with print settings baked in, no "not from Bambu Lab, load geometry data only" warning, support/infill/profile already set. Use when the user wants a sliceable/printable file for a Bambu Lab printer (A1/A1 Mini/P1/X1), to "export to 3mf", bake print settings, split parts across plates, or set up FINE/FAST print profiles. Also the reference for Bambu .3mf internals and lib3mf gotchas. Pairs with the 3d-print-modeling skill.
$npx -y skills add m-esm/bambu-3mf-export --skill bambu-3mf-exportInstalls into the current project.
Run `npx skills use "https://github.com/m-esm/bambu-3mf-export" --skill "m-esm/bambu-3mf-export"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.
Use the skills in "https://github.com/m-esm/bambu-3mf-export" that are relevant to the current task. Run `npx skills add "https://github.com/m-esm/bambu-3mf-export"` and select the relevant skills, then follow their instructions.
| 1 | # bambu-3mf-export — a Claude Code skill for sliceable Bambu Studio `.3mf` projects |
| 2 | |
| 3 | [](LICENSE) |
| 4 | [](https://code.claude.com/docs/en/skills) |
| 5 | [](#install) |
| 6 |  |
| 7 | |
| 8 | Export finished STL meshes to a real **Bambu Studio `.3mf` project** with print settings baked in. No "The 3mf is not from Bambu Lab, load geometry data only" warning. Support, infill, filament, and profile already set, multiple parts packed across **named plates**. |
| 9 | |
| 10 | A plain `trimesh` or `lib3mf` `.3mf` carries geometry only, so Bambu Studio makes you re-enter every setting by hand. This skill writes the same package layout Bambu Studio itself writes, so the file opens as a real project with nothing to redial. |
| 11 | |
| 12 |  |
| 13 | |
| 14 | > One `.3mf`, seven named plates, settings baked in. Parts are grouped by category and placed on Bambu Studio's real `PartPlate` grid, so every part seats on its plate instead of floating off in a row. |
| 15 | |
| 16 | ## Why |
| 17 | |
| 18 | Geometry-only `.3mf` files are why "export to printer" usually means twenty minutes of redialing layer height, walls, infill, supports, and filament in Bambu Studio, every single time. And `lib3mf` silently drops Bambu's sidecar config files, so the official library can't write a project either. This skill hand-assembles the ZIP the way Bambu Studio does, so the export opens print-ready. |
| 19 | |
| 20 | ## What it does |
| 21 | |
| 22 | - **Opens as a Bambu project, not raw geometry.** Starts from a validated A1 process / filament / printer profile template and overrides only the keys you care about. No "not from Bambu Lab" warning. |
| 23 | - **Per-object overrides.** Support on for the one part that needs it, denser infill for the load-bearing one, more walls for the threaded one, all in a single file. |
| 24 | - **FINE / FAST profile splits.** Print detail parts (gears, threads) at 0.16mm and bulk parts (housings) at 0.28mm with lightning infill, in the same export. |
| 25 | - **Multi-plate packing.** Groups parts onto named plates and lays them out in Bambu Studio's exact `PartPlate` grid (`cols = round(sqrt(n))`, `stride = bed × 1.2`, rows toward −Y), so parts land on their plates instead of in one floating row. |
| 26 | - **Reference for `.3mf` internals.** `SKILL.md` documents the lib3mf gotchas (why we hand-assemble the ZIP), the two transform conventions, `negative_part` carving rules, XML-escaping, plate-name validation, and BambuStudio-CLI slicing for real time / filament measurement. |
| 27 | |
| 28 | Pairs with **[3d-print-modeling](https://github.com/m-esm/3d-print-modeling)** for the design-and-verify loop that produces the STLs. |
| 29 | |
| 30 |  |
| 31 | |
| 32 | ## Install |
| 33 | |
| 34 | ### Option 1: Manual (works everywhere, all projects) |
| 35 | |
| 36 | ```bash |
| 37 | git clone https://github.com/m-esm/bambu-3mf-export ~/.claude/skills/bambu-3mf-export |
| 38 | ``` |
| 39 | |
| 40 | Restart Claude Code. The skill auto-loads when you ask to export a sliceable file, or run `/bambu-3mf-export`. |
| 41 | |
| 42 | ### Option 2: Plugin marketplace (supports updates) |
| 43 | |
| 44 | ``` |
| 45 | /plugin marketplace add m-esm/bambu-3mf-export |
| 46 | /plugin install bambu-3mf-export@bambu-3mf-export |
| 47 | ``` |
| 48 | |
| 49 | Update later with `/plugin marketplace update bambu-3mf-export`. |
| 50 | |
| 51 | ## Usage |
| 52 | |
| 53 | > Export these STLs to a Bambu A1 .3mf with support on the bracket only and the gears at 0.16mm. |
| 54 | |
| 55 | > Pack all 24 parts onto plates by category and write one sliceable project for PETG. |
| 56 | |
| 57 | Or invoke it explicitly with `/bambu-3mf-export`. |
| 58 | |
| 59 | ## The writer |
| 60 | |
| 61 | `scripts/bambu3mf.py` exposes one function: |
| 62 | |
| 63 | ```python |
| 64 | from bambu3mf import write_bambu_3mf |
| 65 | |
| 66 | write_bambu_3mf( |
| 67 | "out.3mf", |
| 68 | plates, # list of {"name": str, "parts": [{name, mesh, pos, obj_settings}]} |
| 69 | overrides, # project_settings.config keys to override (layer height, walls, ...) |
| 70 | ) |
| 71 | ``` |
| 72 | |
| 73 | A flat list of parts is treated as a single plate. `scripts/export_bambu_example.py` is a worked FINE/FAST two-profile export you adapt to your project. `scripts/bambu_profile_template.json` is the A1 profile base and must sit next to `bambu3mf.py`. |
| 74 | |
| 75 | ## Requirements |
| 76 | |
| 77 | - Python 3.9+, `trimesh`, `numpy`. No lib3mf (the ZIP is hand-assembled, which is the whole point: lib3mf silently drops Bambu's sidecar configs). |
| 78 | - Profiles target the Bambu Lab A1 / A1 Mini by default; adapt the template for P1 / X1. |
| 79 | |
| 80 | ## Security |
| 81 | |
| 82 | Skills can run code. This one ships Python that Claude executes to assemble a `.3mf` ZIP from your meshes plus a JSON profile template. No network calls, no credential access. Read `SKILL.md` and `scripts/` before installing. |
| 83 | |
| 84 | ## License |
| 85 | |
| 86 | MIT. See [LICENSE](LICENSE). |
| 87 | |
| 88 | --- |
| 89 | |
| 90 | <sub>Keywords: Claude Code |