scale_mesh_to_fit
Automatically scale a 3D mesh to fit within a printer's build volume while preserving aspect ratio, solving oversized model issues.
Instructions
Auto-scale a mesh to fit within a build volume while maintaining aspect ratio.
Useful when a model is too large for your printer -- this uniformly
shrinks it to the largest size that fits.
:param file_path: Path to mesh file (.stl).
:param max_x_mm: Maximum X dimension of build volume.
:param max_y_mm: Maximum Y dimension of build volume.
:param max_z_mm: Maximum Z dimension of build volume.
:param printer_id: Optional supported printer model id. When
provided, printer intelligence supplies the build volume.
:param output_path: Output path. Defaults to overwriting input.
:returns: Dict with original/new dimensions and scale factor.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_x_mm | No | ||
| max_y_mm | No | ||
| max_z_mm | No | ||
| file_path | Yes | ||
| printer_id | No | ||
| output_path | No |