Determining whether an edge on a mesh is convex or concave

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

Recommended Posts

Can anyone suggest a robust way of determining whether an edge on a mesh is convex or concave? An edge is concave if the interior angle between the triangles connected by the edge is > 180 degrees, so any suggestion how to get that (or the exterior angle) would solve the problem.

Share on other sites
If na and nb are the normals of the both adjacent faces, and pa and pb vertices of the both faces that are not connected to the edge in question, wherein na and pa belongs to the face A, and nb and pb to the face B, then

( pb - pa ) . na <= 0 => ridge edge

as well as

( pb - pa ) . na > 0 => valley edge

where "ridge edge" denotes what you have named convex edge, and "valley edge" denotes what you've named concave edge.

You can avoid numerical inaccuracies in nearly flat connections to be classified if you compute the dot-product of the both normals and compare that with a defined threshold, and do the above decision only of the threshold is exceeded.

Share on other sites
check if opposite vertex on one of the triangle is back-facing the other triangle's plane.

e.g. triangle A, B, C, and C, B, D are linked by edge BC.

check if A is back facing or front facing the plane of [C, B, D].

Share on other sites
Thanks, gonna try it out when I get the time :)

1. 1
2. 2
Rutin
24
3. 3
4. 4
JoeJ
18
5. 5

• 14
• 28
• 11
• 11
• 9
• Forum Statistics

• Total Topics
631772
• Total Posts
3002260
×

Important Information

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!