auto_color_by_region
Split a 3D model into color zones by geometric region using height, face normal, or random assignment, then export zones with colors and AMS slot mapping.
Instructions
Split a 3D model into color zones by geometric region.
Supports multiple assignment methods:
- ``"z_height"``: horizontal bands by Z-height (default)
- ``"normal"``: group by face normal direction
(top / bottom / sides)
- ``"random"``: random face assignment for artistic prints
Zero cloud dependencies — pure geometry.
:param input_path: Path to a binary STL file.
:param num_colors: Number of color zones (default 4).
:param method: Assignment method — ``"z_height"``,
``"normal"``, or ``"random"``.
:param color_palette: List of hex colors. Defaults to
white/red/black/grey.
:returns: Dict with zone STL paths, hex colors, face counts,
AMS slot mapping, weight estimates, and optional 3MF path.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| method | No | z_height | |
| input_path | Yes | ||
| num_colors | No | ||
| color_palette | No |