DataSet.distinct_cell_types#
- property DataSet.distinct_cell_types: set[CellType][source]#
Return the set of distinct cell types in this dataset.
The set contains
CellTypevalues corresponding to thepyvista.Cell.typeof each distinct cell in the dataset.Warning
Computing distinct cell types can be very slow for complex meshes with VTK version less than 9.6.
Added in version 0.47.
Examples
Load a mesh with linear
pyvista.CellType.HEXAHEDRONcells.>>> from pyvista import examples >>> hex_beam = examples.load_hexbeam() >>> hex_beam.distinct_cell_types {<CellType.HEXAHEDRON: 12>}
Load a mesh with mixed cells.
>>> mesh = examples.download_cow() >>> sorted(mesh.distinct_cell_types) [<CellType.TRIANGLE: 5>, <CellType.POLYGON: 7>, <CellType.QUAD: 9>]
Load 2D image.
>>> mesh = examples.load_logo() >>> mesh.distinct_cell_types {<CellType.PIXEL: 8>}