DataSetFilters.separate_cells#
- DataSetFilters.separate_cells() PolyData | UnstructuredGrid[source]#
Return a copy of the dataset with separated cells with no shared points.
This method may be useful when datasets have scalars that need to be associated to each point of each cell rather than either each cell or just the points of the dataset.
- Returns:
pyvista.PolyData|pyvista.UnstructuredGridMesh with isolated cells. A
PolyDatagives aPolyData; every other dataset gives anUnstructuredGrid.
Examples#
Download Python source code | Download Jupyter notebook
Load the example hex beam and separate its cells. This increases the total number of points in the dataset since points are no longer shared.
>>> from pyvista import examples
>>> grid = examples.load_hexbeam()
>>> grid.n_points
99
>>> sep_grid = grid.separate_cells()
>>> sep_grid.n_points
320
Used In#
API Examples
_BaseDataSetMapper.resolve(1 use)
Gallery Examples