Mesh cavity detection in grasshopper

Hi All,

Is there any possibility to detect such cavities on a mesh?
We could have mesh normals in each vertex easily, but what to do then?
How to find out vectors, facing to each other?
See blue scheme below.
123.stl (128.4 KB)

Help Us Help You - Grasshopper - McNeel Forum

Hi @Quan_Li
Attached sample of mesh to the 1st post.
Let me know if you meant something else.

It’s not entirely clear to me what you’re asking, but one way to show concave regions would be to measure distance from the convex hull:


concavity.gh (139.6 KB)
(using https://www.food4rhino.com/en/app/meshedit for convex hull)

If instead you want to look just at local curvature, then something like this:

3 Likes

Hi @DanielPiker

Thank you for the direction. It was really helpful.
Now I’m on the right way.

Equally unclear to me but when thinking about vectors ‘facing each other’ I considered neighboring vertices from each vertex?
Vneighbors.gh (130.4 KB)

Looks like it finds these naughty areas throughout this mesh:

Not sure they qualify as ‘cavity’, however I’m equally unsure vectors facing each others qualify as cavities either? Anyway another unsure thought was looking at the dot product between (A) normals at mesh vertices and (B) vectors from mesh vertices to mesh centroid.