repair_mesh
Repair 3D mesh defects such as degenerate triangles, bad normals, and open holes. Use the default pass for fast safe fixes or enable close_holes for watertight results.
Instructions
Repair mesh defects: degenerate triangles, bad normals, open holes.
The default pass is fast and safe: removes zero-area triangles and
recomputes face normals. Use it on meshes from AI generation
providers before slicing. Pass ``close_holes=True`` for the deep
pass, which additionally finds boundary edges (edges shared by only
one triangle) and closes small holes via fan triangulation — use it
when the mesh is not watertight.
:param file_path: Path to the STL file to repair.
:param output_path: Output path. Defaults to overwriting the input.
:param close_holes: Also close open holes and fix boundary edges
(slower; default False).
:returns: Dict with repair statistics.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | ||
| close_holes | No | ||
| output_path | No |