pyvista.PolyData.regular_faces#

property PolyData.regular_faces: ndarray[Any, dtype[integer]][source]#

Return a face array of point indices when all faces have the same size.

Returns:
numpy.ndarray

Array of face indices with shape (n_faces, face_size).

Notes

This property does not validate that the mesh’s faces are all actually the same size. If they’re not, this property may either raise a ValueError or silently return an incorrect array.

Examples

Get the regular face array of a plane with 2x2 arrangement of cells as a 4x4 array.

>>> import pyvista as pv
>>> plane = pv.Plane(i_resolution=2, j_resolution=2)
>>> plane.regular_faces
array([[0, 1, 4, 3],
       [1, 2, 5, 4],
       [3, 4, 7, 6],
       [4, 5, 8, 7]])