pyvista.Cell.dimension#

property Cell.dimension: int[source]#

Return the cell dimension.

This returns the dimensionality of the cell. For example, 1 for an edge, 2 for a triangle, and 3 for a tetrahedron.

Returns:
int

The cell dimension.

Examples

>>> import pyvista as pv
>>> mesh = pv.Sphere()
>>> mesh.get_cell(0).dimension
2