auto_color_by_height
Divides a 3D model into horizontal color zones by height, outputting separate STL files per zone and a multicolor 3MF for multi-material 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.
: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.
: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 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 |
|---|---|---|---|
| input_path | Yes | ||
| num_colors | No | ||
| color_palette | No |