Mesh repair
Fix STL, 3MF and OBJ models that are not closed solids — weld, clean, remove debris, orient, split non-manifold edges, stitch slits, fill holes, union overlapping shells, or rebuild by voxel remesh — with the problems shown in 3-D, a step-by-step report, a before/after deviation map, and a hand-over to the mold maker and model splitter.
Added · updated 28 October 2026
Works with
- Mold maker CNC and 3D printingOpen in mold maker hands over the repaired mesh
- Model splitter CNC and 3D printingOpen in model splitter hands over the repaired mesh
- STEP and IGES viewer CNC and 3D printingtakes parts of a STEP or IGES assembly from its Open in mesh repair
How to use it
A model that looks fine on screen can still be useless to a slicer or a solid-modelling engine: a hole where a face is missing, two triangles that should share a corner but don’t quite, a face turned inside out, a stray triangle floating beside the part, two bodies pushed into each other. This tool finds those, shows you where they are, and repairs them in stages — stopping as soon as the mesh is a valid solid, so it changes no more than it must. Everything runs in your browser; your file is never uploaded.
The mold maker and the model splitter run the same repair automatically when a file fails to load (see below).
How to use it
-
Load a model. Drop a file on the view or use Open file: STL (binary or ASCII), 3MF (several objects and components are combined, with their transforms), OBJ, or STEP / IGES (meshed with OpenCascade). STL and OBJ carry no units: they are taken as millimetres. Files that the strict readers reject — a binary STL whose triangle count is wrong, a truncated or upper-case ASCII STL, NaN coordinates, a 3MF triangle that points at a missing vertex — are read leniently, with a note saying what was skipped. Or pick one of the broken samples.
-
Look at the problems (Problems tab, Original view). Open (boundary) edges are drawn in red, non-manifold edges (more than two faces on one edge) in orange; faces that disagree with their neighbours' orientation are tinted magenta, tiny shells cyan, faces that cut through another face yellow. The table counts holes (boundary loops, with the largest), degenerate and duplicate faces, shells and self-intersections. Use X-ray and the Section plane to see inside.
-
Repair. The model is repaired as soon as it loads, and again whenever you change a setting; ⚒ Repair runs it by hand. The stages, in order (each can be switched off in Settings):
-
Weld vertices closer than the tolerance (automatic: 10⁻⁵ of the model’s size). Unlike rounding to a grid, a chain of near copies welds into one vertex.
-
Remove degenerate and duplicate faces: collapsed triangles, exact duplicates, back-to-back double walls, and zero-area slivers (by splitting the neighbour, so no hole opens). This is what AI image-to-3-D exports typically need: tiny double-wall fins give them non-manifold edges.
-
Remove tiny shells: separate pieces smaller than the size limit (1 % of the model) or with fewer than 4 triangles. They are listed in the report with their position; the largest shell is never removed.
-
Orient faces consistently (a breadth-first walk over the edges shared by two faces, flipping neighbours that disagree) and outward (signed volume of each patch). A closed shell inside another is a cavity and is turned to face inward, so hollow models stay hollow.
-
Split non-manifold edges and vertices: the faces round an edge with more than two are paired by angle (each with the neighbour on its material side), and a vertex where separate fans meet is duplicated — two cubes sharing an edge become two cubes.
-
Stitch slits and fill holes: boundary points closer than the stitching tolerance are joined and T-junctions split (a crack between two separately meshed faces closes), then each remaining hole is filled — by ear clipping in its best-fit plane when it is flat, otherwise by a minimum-area triangulation (Liepa’s dynamic programme) refined and faired so the patch follows the curvature. Holes larger than the limits (edges, or % of the model size) are left open and reported.
-
Resolve self-intersections: shells that overlap (one partly inside another) are unioned with manifold-3d, a cavity staying with the body round it. A single shell that cuts through itself cannot be fixed this way.
-
Voxel remesh — the last resort, and approximate. The surface is rasterised into a grid, gaps up to the closing width are sealed, the outside is flood-filled from the edges of the grid, and a watertight surface is extracted by marching tetrahedra with sub-voxel placement from the distance to the original surface, then lightly smoothed (Taubin) and decimated (quadric edge collapse). Detail smaller than a voxel is lost and sharp edges are rounded. By default the tool asks first; Settings shows the grid size and its memory estimate.
-
-
Check the result (Report tab): what was found, what each stage did (● changed, ○ nothing to do, – skipped), before and after (triangles, volume, size), and the max deviation: how far the original surface lies from the repaired one, sampled at a few thousand points (a Hausdorff-like measure). New surface that fills a hole is reported separately — a cap over a 10 mm hole is up to about 5 mm from the old rim, which is not a loss of detail. The Overlay view shows the original see-through over the repair, and Deviation colours the repaired surface from blue (on the original) to red (furthest away).
-
Export the repaired model as STL, 3MF or OBJ, or Open in mold maker / Open in model splitter: the model goes over in a new tab through this browser’s storage (IndexedDB), never through a link.
Full screen (⛶, or F) gives the 3-D view the whole screen with the panels beside it (◫ hides them); Esc leaves.
Automatic repair in the mold maker and the model splitter
When a file loaded into the mold maker or the model splitter is not a closed solid — the error used to be "the mesh is not a closed solid … and could not be repaired automatically" — they now run this pipeline instead, with a progress bar, and show a notice of what was fixed ("Closed 3 holes, welded 412 vertices, removed 2 tiny shells; max deviation 0.02 mm"). View details opens the report; Open in Mesh repair brings the original here to try other settings; Use original anyway appears when the file could also be loaded the old way (holes capped with simple fans). If only the voxel remesh is left, the tool asks before using it. Repair broken meshes automatically (Part / Model tab) turns this off.
Limits
-
The checks are topological and geometric, not semantic: a hole the designer meant (a vent, the open top of a cup modelled as a surface) is filled like any other — raise or lower the hole limits.
-
Hole filling makes a plausible surface, not the original one; for a hole across a sharp feature (an edge, a corner), the patch rounds it.
-
A single shell that cuts through itself (a folded surface) is found but only the voxel remesh fixes it. Self-intersections are tested on meshes up to 400,000 triangles; overlapping shells at any size.
-
Welding and stitching tolerances that are too large merge real detail; the automatic values are small on purpose.
-
The voxel remesh needs memory: about 9 bytes per grid point (a 200³ grid is about 70 MB plus the surface), more with a wide gap closing. It fills concave detail narrower than about twice the closing width, and its deviation is typically half a voxel to a voxel and a half.
-
Large meshes work: a 2.1-million-triangle AI export is read, checked and repaired in seconds (typed arrays and hash tables throughout), but the 3-D view of millions of triangles needs a capable graphics card, and the voxel remesh and self-intersection test are limited by memory and time. Above 400,000 triangles the Export tab also offers a simplified STL (about 300,000 triangles, with the deviation shown).
Related: mold maker and model splitter (same mesh engine; they repair on import), STL, OBJ and 3MF viewer, OpenSCAD in the browser, print tolerances and fits, lithophane and sign maker.
Methods: P. Liepa, "Filling holes in meshes", Eurographics Symposium on Geometry Processing 2003 (minimum-weight triangulation, refinement and fairing); M. Garland and P. Heckbert, "Surface simplification using quadric error metrics", SIGGRAPH 1997; G. Taubin, "A signal processing approach to fair surface design", SIGGRAPH 1995 (λ|μ smoothing); A. Doi and A. Koide, "An efficient method of triangulating equi-valued surfaces by using tetrahedral cells", IEICE Transactions 1991 (marching tetrahedra); C. Ericson, Real-Time Collision Detection (2005), §5.1.5 (closest point on a triangle); T. Möller and B. Trumbore, "Fast, minimum storage ray/triangle intersection", 1997.
Engines: manifold-3d 3.5.4 (Apache-2.0) to validate and to union overlapping shells, occt-import-js 0.0.23 (LGPL-2.1, Open CASCADE Technology) for STEP and IGES, and three.js 0.147 for the view — loaded from jsDelivr the first time they are needed.
Linking to an example
Share link copies a URL with your settings — never your model. A link can also be written by hand:
/tools/mesh-repair/?example=shared-edge&view=overlay or /tools/mesh-repair/?example=shredded&voxel=auto&res=64.
| Parameter | Meaning |
|---|---|
|
Broken sample: |
|
|
|
Stages switched on, one letter each: |
|
Weld and slit-stitching tolerances, mm ( |
|
Tiny shell: smaller than this % of the model size, or fewer triangles than this |
|
Fill holes up to this many edges and this % of the model size; fair curved fillings ( |
|
Voxel remesh: |
|
Voxels along the longest side; smoothing passes; gap closing mm ( |
Presets:
-
A cube with a missing face — one flat hole, ear-clipped.
-
A ball with four holes — curved fillings, two holes sharing a corner.
-
Two cubes sharing an edge — a non-manifold edge split.
-
A slit — T-junctions and a 0.004 mm gap stitched.
-
Debris — stray triangles and a tiny shell removed.
-
Two overlapping boxes — unioned into one solid.
-
A hollow box — the cavity turned to face inward.
-
An AI export’s faults — back-to-back double walls (non-manifold edges), zero-area slivers and a collapsed triangle, as in image-to-3-D (Meshy) exports.
-
A shredded ball — rebuilt by voxel remesh.
Feedback is a gift. Something to improve, a feature to add, or a bug? Tell me.
Runs entirely in your browser; nothing you type leaves this page.