Premium apps Part of Renderloom
3D Mesh Repair (STL, OBJ, PLY)
Weld, clean, reorient and close small holes in a mesh; get a report of every change.
Try an example: Close an open box, fix a flipped and a duplicated triangle (OBJ → binary STL) · Turn an inside-out tetrahedron outward (ASCII PLY)
How it works
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.
- 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.
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.
Sources
- STL format (StereoLithography Interface Specification) (Marshall Burns, Fabbers.com)
- Wavefront OBJ file format (Paul Bourke)
- PLY polygon file format (Paul Bourke)
- Efficient feature extraction for 2D/3D objects in mesh representation (signed volume) (Cha Zhang and Tsuhan Chen, IEEE ICIP 2001)
Part of Renderloom
-
Renderloom 3D scene & material studio
Shape a scene. Find its light. Keep every idea editable.
How to repair an STL, OBJ or PLY mesh and see what changed
Weld vertices, remove bad triangles, fix flipped normals and close small holes, then download the repaired mesh with a change report.
What it is for
3D Mesh Repair fixes the common defects that stop a slicer or a print service from accepting a mesh: duplicate vertices that leave cracks, zero-area and duplicated triangles, triangles facing the wrong way, whole shells that are inside out, and small holes. It returns the repaired file in the format you choose and a report listing every change, so nothing happens behind your back.
It is a cleanup tool, not a remodelling tool. It does not resolve self-intersections, overlapping parts, thin walls or large missing surfaces, and the patches it puts into holes are flat. Check the analyzer result and your slicer preview afterwards.
Worked example
The first example is an OBJ box with three problems: the top is missing, one bottom triangle is flipped and one side triangle is duplicated. Before repair it has 11 triangles, 3 open boundary edges, 2 non-manifold edges and 4 edges with opposite winding. The summary then reads: "1 duplicate triangle was removed. 1 triangle was flipped to match its neighbours and point outward. 1 hole was filled with 2 triangles."
The before → after table confirms it: watertight changes from No to Yes, triangles from 11 to 12, the signed volume from 5333.33 to 8000 (a 20 mm cube in cubic millimetres) and the surface area from 2200 to 2400. The repaired file is a 684-byte binary STL, exactly 84 + 50 × 12 bytes.
The second example pastes an ASCII PLY tetrahedron whose triangles all point inward. It is closed, so only orientation is wrong: 4 triangles are flipped and the signed volume changes from −4500 to 4500.
If you run the first example with Largest hole to fill set to 3, the 4-edge hole is reported as "left open because it is too large or not simple" and the result is not watertight.
How to read the result
What changed lists the edits in plain sentences. The Changes table counts each step: welded vertices, removed zero-area and duplicate triangles, removed unused vertices, flipped triangles, filled holes and added triangles.
Before → after compares the checks that matter for printing. A positive signed volume after repair means the normals now point outward. The Holes table lists every hole with its edge count and the outcome: filled, larger than the limit, touching itself, crossing itself when projected, or not triangulable.
Tips and common mistakes
- Choose Same as the input to keep your format, or Binary STL for the smallest file most slicers read.
- Raise the hole limit carefully. A flat patch over a curved 150-edge opening may close the mesh but change the shape.
- Hollow parts are handled: an inner cavity shell is detected by ray casting and kept pointing inward, so a 3 mm cube with a 1 mm cavity keeps 26 mm³ of material.
- Binary STL and PLY store 32-bit coordinates. Choose OBJ or ASCII STL if you need full precision.
- Run 3D Mesh Analyzer on the repaired file to read the full topology table.
FAQ
Will repair change the shape of my part?
Welding, removals and flipping do not move any surface. Hole filling adds flat triangles across each filled opening.
Why is my mesh still not watertight?
Holes above the limit, holes that touch themselves and edges shared by three or more triangles stay as they are. The report names each case.
What does "cannot be oriented consistently" mean?
Part of the surface is one-sided, like a Möbius strip, or sheets cross along an edge. No winding works everywhere there.
Can I repair the file without uploading it?
Yes. Open Renderloom Mesh Lab, choose the file and press Repair and download. It uses the same engine in your browser.
Guide last updated:
For scripts and AI agents
- JSON API:
POST https://renderloommeshrepair.usefulweb.site/api/v1/calculate(same calculation as this page) - Interface description: OpenAPI 3.1 · AI guide: llms.txt
- MCP server (Streamable HTTP):
https://renderloommeshrepair.usefulweb.site/mcp· tool namerenderloom_mesh_repair
Example request
curl -s -X POST https://renderloommeshrepair.usefulweb.site/api/v1/calculate \
-H 'content-type: application/json' \
-d '{"file":{"filename":"open-box.obj","contentType":"model/obj","contentBase64":"IyBSZW5kZXJsb29tIG1lc2ggKHVzZWZ1bHdlYi5zaXRlKQp2IDAgMCAwCnYgMjAgMCAwCnYgMjAgMjAgMAp2IDAgMjAgMAp2IDAgMCAyMAp2IDIwIDAgMjAKdiAyMCAyMCAyMAp2IDAgMjAgMjAKZiAxIDIgMwpmIDEgNCAzCmYgMSAyIDYKZiAxIDYgNQpmIDIgMyA3CmYgMiA3IDYKZiAzIDQgOApmIDMgOCA3CmYgNCAxIDUKZiA0IDUgOApmIDEgNiA1Cg=="},"output":"stl-binary"}'