import_step_file
Convert STEP/STP CAD files into printable meshes: plain solids become STL, while assemblies with colors or multiple parts become a single 3MF that keeps each part's name, position and color.
Instructions
Import a STEP (.step/.stp) CAD file and convert it for Kiln's mesh pipeline.
Converts STEP files using whichever backend is available (the
OCCT kernel that ``kiln install-step-backend`` sets up, or an
existing FreeCAD / Gmsh / CadQuery install).
**The output format follows what the file carries.** A plain
single-solid STEP becomes an STL. A STEP with part colours or
several parts (an assembly: each placed part, a part placed
twice is two) becomes ONE 3MF that keeps each part's name,
position and colour — so a CAD assembly arrives as its parts,
ready to print apart or together, instead of one flattened mesh.
Colours need the OCCT kernel; every backend keeps the parts.
Pass ``output_format="stl"`` or ``"3mf"`` to force either.
Use ``check_step_support`` first to verify that a conversion
backend is installed. After conversion, use ``diagnose_mesh``
or ``analyze_mesh_geometry`` to validate the output.
If this returns ``code="NO_BACKEND"``, read the ``remedy`` field
rather than guessing: when ``remedy.actionable_by_caller`` is
True, tell the user to run ``remedy.command`` (``kiln
install-step-backend``) — one command and it works. When it is
False the caller is on a hosted server and has nothing to
install; say so plainly and suggest ``report_issue``. Never
hand a hosted user an install instruction.
Args:
brief_id: The saved goal's id from ``design_session``, so this make
is recorded against the goal and checked against it. Empty when
there is no goal.
file_path: Path to the STEP/STP file.
output_format: ``"auto"`` (default — 3MF when colour or
multiple bodies are present, else STL), ``"stl"``, or
``"3mf"``.
merge_bodies: Leave unset to follow the format: ``"auto"``
and ``"3mf"`` keep the parts, ``"stl"`` fuses them into
one STL. ``True`` fuses every part into one STL (with
``"auto"`` too; refused with ``"3mf"``). ``False`` keeps
them apart, one STL per part with ``"stl"``.
output_dir: Directory for output files. Defaults to
the STEP file's parent directory.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": {
"file_path": "<file_path>"
},
"name": "import_step_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| brief_id | No | The saved goal's id from ``design_session``, so this make is recorded against the goal and checked against it. Empty when there is no goal. Default: "". | |
| file_path | Yes | Path to the STEP/STP file. | |
| output_dir | No | Directory for output files. Defaults to the STEP file's parent directory. | |
| merge_bodies | No | Leave unset to follow the format: ``"auto"`` and ``"3mf"`` keep the parts, ``"stl"`` fuses them into one STL. ``True`` fuses every part into one STL (with ``"auto"`` too; refused with ``"3mf"``). ``False`` keeps them apart, one STL per part with ``"stl"``. | |
| output_format | No | ``"auto"`` (default — 3MF when colour or multiple bodies are present, else STL), ``"stl"``, or ``"3mf"``. Default: "auto". |