pyvista.DataSet.n_cells#
- property DataSet.n_cells: int[source]#
Return the number of cells in the entire dataset.
- Returns:
int
Number of cells in the entire dataset.
Notes
This returns the total number of cells – for
pyvista.PolyData
this includes vertices, lines, triangle strips and polygonal faces.Examples
Create a mesh and return the number of cells in the mesh.
>>> import pyvista as pv >>> cube = pv.Cube() >>> cube.n_cells 6