pyvista.UnstructuredGrid.celltypes#
- property UnstructuredGrid.celltypes: NumpyArray[np.uint8][source]#
Return the cell types array.
The array contains integer values corresponding to the
pyvista.Cell.type
of each cell in the dataset. See thepyvista.CellType
enum for more information about cell type.- Returns:
numpy.ndarray
Array of cell types.
Examples
This mesh contains only linear hexahedral cells, type
pyvista.CellType.HEXAHEDRON
, which evaluates to 12.>>> import pyvista as pv >>> from pyvista import examples >>> hex_beam = examples.load_hexbeam() >>> hex_beam.celltypes array([12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12], dtype=uint8)