MeshView
← All posts

How to repair an STL file

Repairing an STL means turning a broken triangle mesh back into a closed solid that a slicer can understand. Most broken files have one of a handful of faults, and most of those can be fixed for free. The trick is to know what is wrong before you start, and to check again afterwards.

Step 1: find out what is broken

Do not run a repair blindly. Different faults need different fixes, and an automatic repair can hide a problem rather than solve it. Check the file for:

  • Open edges and holes, where triangles are missing
  • Non-manifold edges, shared by more than two triangles
  • Flipped normals, triangles facing the wrong way
  • Degenerate triangles with zero area
  • Separate parts you did not expect, such as floating fragments

MeshView shows a quick verdict when a model opens. Pro opens the detailed report with counts for open edges, non-manifold edges, flipped normals and degenerate faces, and can highlight defects on the model. For what each fault means, see how to check an STL before you print it.

Step 2: try the cleanest fix first

  1. Re-export from the source. If you or the designer have the original CAD or modelling file, export the STL again. A bad export setting causes many faults, and a fresh export is the most faithful fix.
  2. Let the slicer repair it. Most slicers fix small problems such as flipped normals and tiny holes automatically when they load a file, and some offer an explicit repair command. For minor faults this is often enough.
  3. Use a mesh editor for bigger problems. Free options include Blender, with its 3D Print Toolbox add-on, and Meshmixer, an Autodesk tool that is no longer actively developed but still widely used. Both can close holes, recalculate normals and merge overlapping shells.
  4. Online repair services can fix a file in a browser. They work, but they mean uploading the model to someone else’s server. Do not use them for confidential or paid designs.

Repair an STL on Android

  1. Open the STL in MeshView 1.8.0 or later and tap the printability verdict to open its details.
  2. If MeshView finds something it can repair, Fix it becomes available. Tap it with MeshView Pro to see the repaired copy and the before-and-after counts.
  3. Tap Save repaired STL to save a separate file. The original stays intact.

MeshView can remove duplicate and degenerate faces, close small gaps, correct winding and fill small planar holes. Large holes and non-manifold edges caused by touching or overlapping shells can need a slicer or mesh editor. If a defect remains in the preview, check it in your slicer before printing.

In our Android test, a damaged Benchy went from 15 open edges to zero. The saved STL had no remaining defects in MeshView’s printability check, and the original file stayed intact.

Step 3: fix by fault type

  • Holes and open edges: use a fill-holes or close-holes command. Large holes may need the missing surface rebuilt by hand.
  • Flipped normals: recalculate normals so they all face outward.
  • Non-manifold edges: separate touching parts or merge them properly with a union. See what is a non-manifold edge.
  • Degenerate triangles: remove them or merge the vertices that collapse.
  • Floating fragments: delete loose pieces you do not need. See separate parts in an STL.

Step 4: check again

A repair tool reports success when it has done what it can, not when the mesh is perfect. Open the repaired file and run the check again. The volume is a good quick test: a watertight mesh has a real volume, while MeshView shows “not watertight” when the mesh still has holes.

When repair is the wrong answer

If a model is badly broken, such as a scan full of holes or a mesh made of dozens of overlapping shells, repair can change its shape in ways you do not want. Look for a cleaner version from the designer, or rebuild the part. A clean file is worth more than a heavily patched one.