I have a set of 3d points defining a polygon A, and a set of points defining polygon B. All these points are planar, and A is actually a loop within B.
My question is: how can i generate a triangulated polygon with hole? ie. the green region on the right.
If you have concentric contours, you can append them before triangulating them. For good results, the contours should be in opposite directions. If B is counterclockwise, then A should be clockwise.
I tried the code above and encountered an empty result. After a bit of toggle I found that the root cause is I forgot to set the lines of polygon’s polydata. For anyone who needs to do the same, remember to set the lines before using vtkContourTriangulator.