validate_and_prepare_mesh
Validates, repairs, analyzes, and prepares a 3D mesh for printing. Chains validation, auto-repair, printability scoring, and build volume checks into a single quality gate.
Instructions
Full validation pipeline: validate, repair, analyze, and prepare a mesh for printing.
**See also:** ``validate_and_prepare`` for a more comprehensive
10-step pipeline (format, mesh, scale, repair, printability,
structural, bed-fit, material, and cost estimation).
Runs every AI-generated mesh through Kiln's engineering review before
it reaches the slicer or printer. Chains validation → auto-repair →
printability analysis → build volume check into a single quality gate.
**Use this instead of ``validate_generated_mesh`` when you want the
full pipeline** — repair, printability scoring, build volume checks,
and actionable recommendations.
The mesh file may be modified in place if ``auto_repair`` or
``auto_scale`` is enabled. The response includes the final file
path (which may differ from the input if repairs created a new file).
Args:
file_path: Path to an STL, OBJ, or GLB file.
material: Filament material for printability analysis (default PLA).
nozzle_diameter: Printer nozzle diameter in mm (default 0.4).
layer_height: Print layer height in mm (default 0.2).
build_volume_x: Optional X build dimension (mm).
build_volume_y: Optional Y build dimension (mm).
build_volume_z: Optional Z build dimension (mm).
printer_id: Optional supported printer model id. When
provided, printer intelligence supplies the build volume.
auto_repair: Auto-repair non-manifold meshes (default True).
auto_scale: Auto-scale if mesh exceeds build volume (default False).
min_printability_score: Minimum score (0-100) to pass (default 40).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| material | No | PLA | |
| file_path | Yes | ||
| auto_scale | No | ||
| printer_id | No | ||
| auto_repair | No | ||
| layer_height | No | ||
| build_volume_x | No | ||
| build_volume_y | No | ||
| build_volume_z | No | ||
| nozzle_diameter | No | ||
| min_printability_score | No |