Hello,
after some more try & error i got the vtkContourTriangulator working in a way, where it is triangulating all my layers.
I want to share my code, even there are probably muuuch better approaches :-).
Steps are:
- vktCleanPolyData with minimal tolerance
- vtkCutter with vtkPlane on the layerHeight
- vtkStripper
- vtkContourTriangulator
- check if it has errors
- if so: rotate around zAxis and triangulate again until no errors or until 360°
- if rotation > 360° use vtkCleanPolyData again with a higher tolerance
- rotate and triangulate again => if still errors until rotation > 360 => exception
- if so: rotate around zAxis and triangulate again until no errors or until 360°
- rotate back
- vtkFeatureEdges
CMakeLists.txt (755 Bytes)
contourTriangulatorTest.cxx (8.7 KB)
bd.vtp (154.0 KB)
PS: the polyData’s 3D file is from Microsoft (Bulldozer.3mf)
regards
philipp