# Non manifoldness in a mesh

This topic is 2922 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

How to check non- manifoldness in the mesh and how to eliminate them?

Are there any algorithms available?

##### Share on other sites
Topologically, I think all you need is the following:
- It's a manifold if every edge is shared by exactly two triangles
- It's a manifold-with-boundary if every edge is shared by either one or two triangles.

However, this doesn't deal with geometric issues, like self-intersection or t-junctions (so you don't know if the manifold is embedded in R[sup]3[/sup] or merely immersed).

##### Share on other sites

Topologically, I think all you need is the following:
- It's a manifold if every edge is shared by exactly two triangles
- It's a manifold-with-boundary if every edge is shared by either one or two triangles.

However, this doesn't deal with geometric issues, like self-intersection or t-junctions (so you don't know if the manifold is embedded in R[sup]3[/sup] or merely immersed).

So to determine the presence of non manifoldness, it is enough to check whether no of triangles shared are more than 2.
But how do I remove non-manifoldness. It is difficult to figure out, which among the two shared triangles are real ones.

However, this doesn't deal with geometric issues, like self-intersection or t-junctions (so you don't know if the manifold is embedded in R[sup]3[/sup] or merely immersed).

How to deal with self intersections and t junctions in the mesh?

##### Share on other sites
Easy, but possibly slow way to check for self-intersection
 foreach (triangle A in mesh) { foreach (triangle B in mesh) { if tri_tri_intersect(A, B)) return true; } } return false; 

• ### Game Developer Survey

We are looking for qualified game developers to participate in a 10-minute online survey. Qualified participants will be offered a \$15 incentive for your time and insights. Click here to start!

• 13
• 9
• 11
• 15
• 21