How to remove self-intersection of a mesh with the Meshlab application or vcglib?
-
Adding backlink to related question: https://stackoverflow.com/questions/52730931/how-do-i-remove-self-intersecting-triangles-from-a-3d-surface-mesh – nh2 Mar 02 '20 at 19:44
2 Answers
This is out of the scope but there are some functions in CGAL. This is still experimental and not documented but you can use the function remove_self_intersections()
. Depending on the type of self-intersections, you can also use the (also experimental) function autorefine_and_remove_self_intersections()
. The first function is more likely to be used when you want to remove self-intersection due to loss of precision (doing somehow a local remeshing) while the second is to be used when you have strong self-intersections.
If you are looking for a trivial solution with Meshlab, you can do the following:
Filters -> Cleaning and Repairing -> Select Self Intersecting Faces: You will see the self-intersections colored in red.
Filters -> Selection -> Delete Selected Faces: The self-intersecting faces will be deleted.
Edit -> Fill Hole: You need to go through the list of holes and click on select checkbox for all holes resulting from the deleted faces. If your mesh has lots of holes, this may be a cumbersome task. There is a good chance that the deleted faces may have left non-manifold holes, so you can use that to select which holes to fill.

- 2,641
- 1
- 17
- 31
-
1The extended procedure after removed self-intersecting faces is 1. Vertices Fixing: Filters -> Cleaning and Repairing -> Remove Unreferenced vertices / Remove Isolated pieces to delete floating vertices and faces 2. Edges Fixing: Filters -> Cleaning and Repairing -> Repair non manifold edge by removing faces to fix the non manifold edge before closing holes 3, Faces Fixing: Filters ->Remeshing, Simplification and Reconstruction -> Close Holes (checked prevent creation of selfIntersecting faces) Loop until the mesh is two-manifold and has no self-intersecting faces – Nodtem66 Mar 08 '20 at 12:08
-
1I tried fixing my mesh by using these steps, but nothing changes. I keep having the same self-intersecting spots in every iteration (tried for at least 6 iterations for each mesh). – Sarah_A Dec 06 '20 at 12:30