UnstructuredGrid.celltypes#
- property UnstructuredGrid.celltypes: NumpyArray[np.uint8][source]#
Return the cell types array.
The array contains integer values corresponding to the
pyvista.Cell.typeof each cell in the dataset. See thepyvista.CellTypeenum for more information about cell type.- Returns:
numpy.ndarrayArray of cell types.
Examples#
Download Python source code | Download Jupyter notebook
This mesh contains only linear hexahedral cells, type
pyvista.CellType.HEXAHEDRON, which evaluates to 12.
>>> 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)
Compare this to distinct_cell_types.
>>> hex_beam.distinct_cell_types
{<CellType.HEXAHEDRON: 12>}
Used In#
Docstring Examples
BezierCurve(1 use)BezierHexahedron(1 use)BezierQuadrilateral(1 use)BezierTetrahedron(1 use)BezierTriangle(1 use)43 more
BezierWedge(1 use)BiQuadraticQuadraticHexahedron(1 use)BiQuadraticQuadraticWedge(1 use)BiQuadraticQuadrilateral(1 use)BiQuadraticTriangle(1 use)ConvexPointSet(1 use)CubicLine(1 use)Empty(1 use)HexagonalPrism(1 use)Hexahedron(1 use)LagrangeCurve(1 use)LagrangeHexahedron(1 use)LagrangeQuadrilateral(1 use)LagrangeTetrahedron(1 use)LagrangeTriangle(1 use)LagrangeWedge(1 use)Line(1 use)PentagonalPrism(1 use)Pixel(1 use)PolyLine(1 use)PolyVertex(1 use)Polygon(1 use)Polyhedron(1 use)Pyramid(1 use)QuadraticEdge(1 use)QuadraticHexahedron(1 use)QuadraticLinearQuadrilateral(1 use)QuadraticLinearWedge(1 use)QuadraticPolygon(1 use)QuadraticPyramid(1 use)QuadraticQuadrilateral(1 use)QuadraticTetrahedron(1 use)QuadraticTriangle(1 use)QuadraticWedge(1 use)Quadrilateral(1 use)Tetrahedron(1 use)TriQuadraticHexahedron(1 use)TriQuadraticPyramid(1 use)Triangle(1 use)TriangleStrip(1 use)Vertex(1 use)Voxel(1 use)Wedge(1 use)
Gallery Examples