# 3D Mesh Repair (STL, OBJ, PLY) > Weld, clean, reorient and close small holes in a mesh; get a report of every change. Repair an STL, OBJ or PLY mesh: weld duplicate vertices, remove zero-area and duplicate triangles, make the winding consistent with outward normals and fill small holes. Download the repaired file and a before/after report. Part of usefulweb.site (https://usefulweb.site/). Part of [Renderloom](https://renderloom.usefulweb.site/) (ownerApp: renderloom). Results are deterministic calculations from the inputs and the listed assumptions; the API returns exactly what the web page shows. ## Use it - Human interface: https://renderloommeshrepair.usefulweb.site/ (interactive tool at https://renderloommeshrepair.usefulweb.site/tool) - JSON API: POST https://renderloommeshrepair.usefulweb.site/api/v1/calculate with a JSON object of inputs (schema: https://renderloommeshrepair.usefulweb.site/api/v1/tool) - OpenAPI: https://renderloommeshrepair.usefulweb.site/openapi.json - MCP (Streamable HTTP): https://renderloommeshrepair.usefulweb.site/mcp - tool `renderloom_mesh_repair` ## Inputs - file (file): Mesh file (STL, OBJ or PLY) - Binary or ASCII STL, OBJ, or ASCII/binary PLY up to 30 MB and 500000 triangles. - meshText (textarea): Or paste an ASCII STL, OBJ or PLY mesh - output (select): Output format - weld (select): Vertex welding - fillHoles (boolean): Fill small holes - maxHoleEdges (integer): Largest hole to fill (edges) ## Method - Steps run in a fixed order: weld vertices within the tolerance, remove triangles with a repeated vertex or an area of at most 1e-12 × diagonal², remove triangles that use the same three vertices as an earlier triangle, then drop unused vertices. - Winding is propagated breadth-first across edges shared by exactly two triangles, so neighbours traverse their common edge in opposite directions. Open surfaces keep the majority of their original windings. - Each closed shell is turned outward when its divergence-theorem volume is negative. Shells inside other shells (cavities) are detected by ray-casting parity and point inward. Up to 64 closed shells are checked for nesting. - Boundary loops with at most the chosen number of edges are projected onto their best-fit (Newell) plane and filled by ear clipping. Loops that touch themselves or cross themselves in projection are left open. Orientation is checked again after filling. - The repaired mesh is written in the chosen format. Binary STL and PLY store 32-bit floating-point coordinates. ## Limits - Holes are closed with flat ear-clipped patches, which may not match the intended surface. Self-intersections, thin walls and overlapping parts are not repaired. Inspect the result before printing.