compose_multicolor_3mf
Combine multiple STL files into one print-ready multi-color .3mf with per-part extruder assignments, so any FDM slicer and printer handles the whole design as a single file.
Instructions
Compose a multi-color / multi-material .3mf from multiple STL files.
Creates a **single print-ready .3mf** containing all parts with per-part
AMS/extruder slot assignments. This is the correct way to send a
multi-color design to any FDM printer — the printer receives one file,
not multiple.
Compatible with:
* **BambuStudio / Bambu A1, X1, P1 + AMS** — reads ``Metadata/model_settings.config``
* **PrusaSlicer / MMU** — reads ``slic3rpe:extruder`` on each ``<item>``
* **Cura** and any 3MF-capable slicer
Typical two-color workflow::
# 1. Export body STL (main color, e.g. grey PLA)
# 2. Export accent STL (second color, same coordinate origin)
# 3. Compose:
result = compose_multicolor_3mf(parts=[
{"stl_path": "/tmp/body.stl", "extruder": 1,
"name": "body", "color": "#AAAAAA", "material": "PLA Grey"},
{"stl_path": "/tmp/qr_pads.stl", "extruder": 2,
"name": "qr_code", "color": "#111111", "material": "PLA Black"},
])
# 4. Upload and print:
upload_file(result["output_path"])
start_print(result["output_path"])
Args:
parts: List of part dicts. Each dict requires:
* ``stl_path`` (str) — absolute path to the STL for this part
* ``extruder`` (int) — 1-indexed AMS slot (1 = AMS tray 1 on Bambu)
Optional per-part keys:
* ``name`` (str) — label shown in the slicer object list
* ``color`` (str) — hex preview color e.g. ``"#AAAAAA"`` (display only)
* ``material`` (str) — filament label e.g. ``"PLA Grey"`` (display only)
output_path: Where to write the .3mf. Defaults to a temp file whose
path is returned in the result.
Returns:
Dict with ``success``, ``output_path``, ``parts``, ``total_triangles``,
``total_vertices``, ``extruder_map``, and ``message``.INLINE 3D STAGE: on success this tool also opens Kiln's interactive 3D stage — an inline viewer panel the user can orbit, zoom, and turn over — in hosts that render MCP Apps panels (Kiln's hosted connection attaches a browser stage link for hosts that don't). Oversized meshes are decimated automatically for the stage; the PNG preview is the floor, not the whole experience.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| parts | Yes | ||
| output_path | No |