Mesh with holes: points inside/outside 3-D closed contour?

It can be done by starting from point that is in region (inside contour) and iteratively expand region to points connected to already found points and stop if connection crosses contour or have some geometry property. Geometry tests can be.

Up vote 0 down vote favorite share g+ share fb share tw.

I have a 3-D surface polygonal mesh in which I've manually defined a closed contour, similar to this one (the closed contour being the green curve). I want to label only the points inside this contour but, as you can see in yellow, the surface contains holes and "bumps" which makes difficult this labeling. What I've decided is that I want to label only those points located in the "outer" surface, ie without going inside the holes or below the bumps (which in the end are just another type of holes).

At this point I've just come up with questions instead of ideas: How to determine if a point is inside or outside the closed contour? Once solved the problem of points inside/outside: How to take only those points inside of the closed contour but located at the outer surface? Thanks for any suggestion!

Computational-geometry link|improve this question asked Oct 7 '11 at 5:20msotaquira1486 86% accept rate.

It can be done by starting from point that is in region (inside contour) and iteratively expand region to points connected to already found points and stop if connection crosses contour or have some geometry property. Geometry tests can be: next point has position too high or too low, angle of connection from region point to new one is larger than some threshold.

Hi. The problem is precisely that I don't know which points are already inside the region. The only seeds I have at this point are the points in the contour, and thus a region growing approach might not be adequate in this case.

– msotaquira Oct 16 '11 at 2:07 If models are topological equivalent to sphere or plane with holes than contour split geometry in 2 parts. If they are not equivalent than contour maybe split geometry in 2 parts. After that you have to choose which region are you interested in.

Inside of contour is probably 'smaller', bounding box is smaller. Other criteria (angles, height) can be viewed also as contours, so they also split geometry or part of geometry in 2 parts. – Ante Oct 16 '11 at 8:30.

I finally found a solution: To determine if the point is inside/outside contour: I projected each point in the mesh, as well as the contour, onto the z=0 plane, thus reducing the dimensionality of the problem (from 3-D to 2-D) I constructed a polygon (2-D) corresponding to my contour. Then I applied the "Point in polygon" test using ray casting see Wikipedia To take only points on the "outer" surface: I took average contour normal and then compare it with the normal of each point already labeled as inside the contour (previous step). If angle(normal_vertex, normal_contour) > threshold (in my case 60º) then I labeled the vertex as outside the contour.

At this point the algorithm is working as expected. Thanks, Miguel.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions