pyvista.DataSetFilters.split_bodies#
- DataSetFilters.split_bodies(label=False, progress_bar=False)[source]#
Find, label, and split connected bodies/volumes.
This splits different connected bodies into blocks in a
pyvista.MultiBlock
dataset.- Parameters:
- Returns:
pyvista.MultiBlock
MultiBlock with a split bodies.
See also
Examples
Split a uniform grid thresholded to be non-connected.
>>> from pyvista import examples >>> dataset = examples.load_uniform() >>> _ = dataset.set_active_scalars('Spatial Cell Data') >>> threshed = dataset.threshold_percent([0.15, 0.50], invert=True) >>> bodies = threshed.split_bodies() >>> len(bodies) 2
See Splitting Volumes for more examples using this filter.