- DataSetFilters.connectivity(largest=False, progress_bar=False)¶
Find and label connected bodies/volumes.
This adds an ID array to the point and cell data to distinguish separate connected bodies. This applies a
vtkConnectivityFilterfilter which extracts cells that share common points and/or meet other connectivity criterion.
Cells that share vertices and meet other connectivity criterion such as scalar range are known as a region.
Dataset with labeled connected bodies. Return type matches input.
Join two meshes together and plot their connectivity.
>>> import pyvista >>> mesh = pyvista.Sphere() + pyvista.Sphere(center=(2, 0, 0)) >>> conn = mesh.connectivity(largest=False) >>> conn.plot(cmap=['red', 'blue'])
See Volumetric Analysis for more examples using this filter.