It seems like a lot of people want to use vtk as a geometric modeling system, when it’s a visualization system
Having said that, you might be able to hack something together along the following lines. I can’t swear it will work, but maybe…
- Use vtkPolyDataNormals with the proper FeatureAngle (and make sure you have SplittingOn).
- Use vtkPolyDataConnectivityFilter to extract the appropriate connected regions.
#1 will break the object apart due to sharp edges. #2 will extract the regions you want. This procedure depends on having a manifold mesh (i.e. no cracks, t-junctions, etc. unless the cracks occur where the pipe seams are located).
Good luck!