Topological problems

Starting point is a PolyData object that is supposed to be the watertight surface of one or several “bodies” that also does not include any non-manifold edges, but input may not always be like that!

  • I realize that testing for “watertightness” can be done with the vtkFeatureEdges filter by checking if I have no “boundary edges”. Fine.

  • Next I can find also non-manifold edges with the same filter. If before I checked that I have no boundaries, I may still have things like this:

Here it would be great if I could “split” this non-manifold edge into two: Is there any filter that would support such an operation?

  • Finally it is still possible that the polydata actually describes more than one “body” topologically: Is there a way I can split it into several polydata that describe only one body each?

Thanks for any helpful hints!

vtkPolyDataConnectivityFilter will let you extract separate connected portions of a polydata. That might help you on your second point.

I do not know of a VTK filter to fix non manifold meshes, though vtkCleanPolyData will often help merge overlapping points/cells and vtkFillHolesFilter will help close non watertight meshes.

I more often then not use the blender extension called 3D Print to clean my meshes.