CellType.n_points#
- property CellType.n_points: int[source]#
Return the number of points defined by this cell type.
Added in version 0.48.
- Raises:
ValueErrorIf the number of points cannot be determined without a concrete instance. Composite cells, higher order cells, polygon, and polyhedron will all raise an error.
See also
Examples#
Download Python source code | Download Jupyter notebook
LINE has a fixed number of points.
>>> import pyvista as pv
>>> pv.CellType.LINE.n_points
2
POLY_LINE has a variable number of points and raises a ValueError.
>>> try:
... pv.CellType.POLY_LINE.n_points
... except ValueError as error:
... print(error)
Cannot determine number of points for 'POLY_LINE' without a concrete cell instance.