pyvista.PolyData.n_faces_strict

pyvista.PolyData.n_faces_strict#

property PolyData.n_faces_strict: int[source]#

Return the number of polygonal faces.

This is the total number of TRIANGLE, QUAD, and POLYGON cells defined in the faces connectivity array.

See also

faces
n_verts, n_lines, n_strips

Number of cells in other connectivity arrays.

pyvista.DataSet.n_cells, pyvista.DataSet.n_points

Number of total cells and points in this mesh.

Examples

Create a mesh with one face and one line

>>> import pyvista as pv
>>> mesh = pv.PolyData(
...     [(0.0, 0, 0), (1, 0, 0), (0, 1, 0)],
...     faces=[3, 0, 1, 2],
...     lines=[2, 0, 1],
... )
>>> mesh.n_cells, mesh.n_faces_strict, mesh.n_lines
(2, 1, 1)