auto_color_by_height
Split a 3D model into equal horizontal color bands by Z-height, cutting and capping faces at each boundary to produce closed per-zone STLs and a multicolor 3MF ready for AMS/MMU printing.
Instructions
Split a 3D model into horizontal color zones by Z-height.
Divides the model's height into N equal bands. Faces that
cross a band edge are cut exactly at it, so the line where two
colors meet is the straight horizontal line the bands name —
never a sawtooth of whole faces, on any tessellation. The
cut faces are capped at the band planes, so each zone of a
closed model is itself a closed solid ready to slice.
Produces separate STL files per zone and (if available) a
multicolor 3MF ready for AMS/MMU printers.
Zero cloud dependencies — pure geometry.
Says whether its colours are on the printer, as
``colour_availability`` (absent when Kiln cannot see what is
loaded). Relay its ``say`` as written and add nothing about
filament: never suggest buying filament unless the person asks
for one or says yes to the offer in ``say``. On a yes, call
``find_closest_filaments`` with these colours and the print's
material.
:param input_path: Path to a binary STL file.
:param num_colors: Number of color zones (default 4).
:param color_palette: List of hex colors (e.g.
``["#FF0000", "#00FF00"]``). Defaults to white/red/black/grey.
:param material: Optional material the part will be printed in
(e.g. ``"PETG"``). A spool on record in a clearly
different material is then not named as one to load.
:param printer_id: Optional supported printer model id. Names
the bed the composed 3MF is placed on, so a model sitting
off the plate is centred on the machine's real bed rather
than an assumed 256mm one.
:returns: Dict with zone STL paths, hex colors, face counts
(boundary faces are cut and capped, so counts can exceed
the input's), per-zone ``watertight`` verdicts, AMS slot
mapping, weight estimates, and optional 3MF path.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.
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": {
"input_path": "<input_path>"
},
"name": "auto_color_by_height"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| material | No | Optional material the part will be printed in (e.g. ``"PETG"``). A spool on record in a clearly different material is then not named as one to load. Default: "". | |
| input_path | Yes | Path to a binary STL file. | |
| num_colors | No | Number of color zones (default 4). Default: 4. | |
| printer_id | No | Optional supported printer model id. Names the bed the composed 3MF is placed on, so a model sitting off the plate is centred on the machine's real bed rather than an assumed 256mm one. Default: "". | |
| color_palette | No | List of hex colors (e.g. ``["#FF0000", "#00FF00"]``). Defaults to white/red/black/grey. |