Hello everyone!
After my last question , to which I got a lot of useful suggestions, I managed to clip and cap a nested polydata.
The result is supposed to look like this:
The way I did this was to combine the inverted polydata from the inner element with the outer element using vtkPolyDataNormals (with FlipNormals on) and vtkAppendPolyData. Then I clipped the appended polydata with vtkClipPolyData and created a cap by using vtkCutter on the appended polydata and vtkContourTriangulator on the resulting contour.
My issue are these three things:
Inverted caps, in which the vtkContourTriangulator triangulates the outer contours and misses the actual inner part.
Situations in which the outer polydata is not really cut in such a way that there is a hole where the inverted inner polydata was appended, resulting in two caps being created on top of each other.
And finally the weird situation where both of these situations seem to cooccur and there are segments of the inner polydata missing, as if the vtkContourTriangulator skipped a triangle.
In this project I am using the Allen institute brain atlas for mice, and I am not entirely sure whether these issues occur due to problems with the model or mistakes in the way I am working with it.
I suspect that it has something to do with the way I cut the polydata, so that there are holes in the contour or the cap created by the triangulator.
How can I avoid these problems or fix them? Is there some step I am missing to properly cut the nested polydata?
Thanks in advance for any help you can give me with this!
-Marti