prepare_ai_model_for_print
Detects and fixes unit mismatches in AI-generated 3D models, scales them to printable size, and provides recommendations for mesh simplification and hollowing to ensure successful prints.
Instructions
Prepare any AI-generated model for printing — auto-fixes the unit problem.
AI model generators (Meshy, Tripo, Stability, Gemini) routinely
export models in meters instead of millimeters, producing figurines
that are 1.9mm tall. This tool detects and fixes that, plus runs
the full validation pipeline and provides smart recommendations
for simplification and hollowing.
Pipeline:
1. Run validate_and_prepare for baseline analysis
2. Auto-scale detection — if max dim < 10mm, scale to a
reasonable size (or to target_height_mm if provided)
3. Mesh simplification recommendation (if > 100K triangles)
4. Smart hollow recommendation (only when appropriate)
5. Re-validate the scaled model
6. Return combined before/after comparison
Works with STL, OBJ, and 3MF files.
:param input_path: Path to the AI-generated model file.
:param target_height_mm: Desired height in mm. If 0, auto-detects
a reasonable size based on model aspect ratio.
:param printer_id: Optional printer model ID for bed-fit checking.
:param material: Material name (default "PLA") for material checks.
:returns: Dict with original/prepared comparison, actions taken,
recommendations, and next_action for slicing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| material | No | PLA | |
| input_path | Yes | ||
| printer_id | No | ||
| target_height_mm | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||