Mesh cutting + triangulation - how to identify hol

2019-06-14 09:26发布

问题:

I am in the research phase of my programming project. I have to cut a STL mesh with plane and "close" the holes which this cut made - so triangulate them - and make two new meshes this way.

Cutting the mesh seems quite simple. I also read about a lot of algorithms which should do the triangulation and even some libraries which can do it (Triangle, poly2tri, CGAL)

But, I can't understand how to identify those holes. And even if I would, when I looked into poly2tri algorithm, there is a function addHole(vector (Point*) Polyline) which indicates, that hole has to be describable with one polyline, but what about something like this: http://imgur.com/a/4xcrt Its top view of a cylinder and two "pipes" with longer radius. If I would cut this, the white space would be a hole and I cant represent it with one polyline.

Can someone please explain this me, or share some work which explains this problem so I could understand it properly?

(I searched through stackoverflow and didn't find an answer)