rebuild_design
Re-executes a saved design recipe to regenerate print-ready output: recompiles OpenSCAD source with saved parameters for exact geometry or re-slices recorded meshes after edits.
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.
The slicer's own time estimate for the rebuilt slice is kept on
the version, and ``print_time`` says it ("About 3h 1m, the
slicer's estimate.") when the slice states one.
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 goal_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.
:param speed_by_height: The person's own speeds for height ranges of the part, only when they
ask for them: a list like ``[{"from_mm": 0, "to_mm": 6, "percent": 50}, {"from_mm": 6,
"speed_mm_s": 120}]`` (millimetres up from the plate; ``to_mm`` left out means to the top;
one speed per range), or ``"kiln"`` to have Kiln choose them from the part's shape (Kiln
Pro). ``slice_model`` says what is read back and what is refused.
:param mixed_nozzle_experiment: The person has said yes, for this print, to a slice
refused with ``MULTI_NOZZLE_MIXED_SIZES`` (nozzles of different sizes at once, an
experiment). Only on their yes, each time; ``slice_model`` says what follows.
:param soft_nozzle_confirmed: The owner has said to print anyway
a slice refused with ``ABRASIVE_ON_SOFT_NOZZLE`` (an abrasive
filament through a nozzle on record that is not
wear-resistant). Only on their word, never on your own
judgement.
:param filament_map: Only for a printer with more than one
nozzle: the nozzle (1 for the first) each filament prints
from, one number per filament in filament order. Leave
unset to let the slicer choose.
:returns: Dict with the print artifact, the mode used, and
per-part or per-parameter results.INLINE 3D STAGE: on success this tool 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.
MAKE DOORS: design_session, Kiln's front door for making an object, is not installed here (signed in to Kiln it runs on Kiln's servers). On this install compile_scad IS the make → preview → iterate loop: make it, show the preview, iterate.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"recipe_path": "<recipe_path>"
},
"name": "rebuild_design"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| goal_id | No | 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. Default: "". | |
| recipe_path | Yes | The design directory, or the recipe file. | |
| filament_map | No | Only for a printer with more than one nozzle: the nozzle (1 for the first) each filament prints from, one number per filament in filament order. Leave unset to let the slicer choose. | |
| speed_by_height | No | The person's own speeds for height ranges of the part, only when they ask for them: a list like ``[{"from_mm": 0, "to_mm": 6, "percent": 50}, {"from_mm": 6, "speed_mm_s": 120}]`` (millimetres up from the plate; ``to_mm`` left out means to the top; one speed per range), or ``"kiln"`` to have Kiln choose them from the part's shape (Kiln Pro). ``slice_model`` says what is read back and what is refused. | |
| soft_nozzle_confirmed | No | The owner has said to print anyway a slice refused with ``ABRASIVE_ON_SOFT_NOZZLE`` (an abrasive filament through a nozzle on record that is not wear-resistant). Only on their word, never on your own judgement. Default: false. | |
| mixed_nozzle_experiment | No | The person has said yes, for this print, to a slice refused with ``MULTI_NOZZLE_MIXED_SIZES`` (nozzles of different sizes at once, an experiment). Only on their yes, each time; ``slice_model`` says what follows. Default: false. |