rebuild_design
Rebuild a 3D print design from a saved recipe, recompiling parametric models or re-slicing meshes to generate a fresh print-ready artifact.
Instructions
Re-execute the full build pipeline from a saved design recipe.
Two modes, chosen by what the recipe carries — the result names
which one ran:
- **Parametric** (the recipe has OpenSCAD source): the geometry
is RE-DERIVED. The recipe's numeric parameters are applied to
the source and recompiled, so wall thicknesses and fastener
holes come out exactly as designed. To resize a parametric
design, change the parameter — with ``update_scad_parameter``
on the source, or on the recipe's parameters — and rebuild.
Never scale the mesh instead: it scales every feature with
the body, so a 3mm wall becomes 3.6mm and a 3.4mm M3
clearance hole becomes 4.08mm — no longer the fit it was
dimensioned for.
- **Mesh** (no source): the recorded part meshes are re-sliced
exactly as they are. A geometry change needs a mesh edit first
(``rescale_model``, ``thicken_mesh_walls``, ...), then a rebuild.
Every parameter is itemized as applied, absent from the source,
or skipped with a reason — an edit this tool cannot honor is
reported, never silently dropped.
The artifact is a print-ready 3MF where a Bambu printer is
registered and the merged G-code otherwise (send that with
``upload_file``); ``wrapped`` says which one you got.
When the render pipeline is available this also returns an
inline preview of the rebuilt design; display that image to the
user rather than summarizing it. The rebuild itself never
depends on it.
Example: rebuild_design("prints/bracket/")
:param recipe_path: The design directory, or the recipe file.
:param brief_id: Optional saved-goal id. When supplied it is
recorded on the recipe before the rebuild, so the output
carries the goal in its provenance; when omitted the
recipe's existing goal is kept, so iterating a
goal-attached design keeps it automatically.
:returns: Dict with the print artifact, the mode used, and
per-part or per-parameter results.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 |
|---|---|---|---|
| brief_id | No | ||
| recipe_path | Yes |