PolyData.regular_faces#
- property PolyData.regular_faces: NumpyArray[int][source]#
Return a face array of point indices when all faces have the same size.
- Returns:
numpy.ndarrayArray of face indices with shape (
n_faces,face_size).
- Raises:
ValueErrorIf the mesh’s faces are irregular.
Examples#
Download Python source code | Download Jupyter notebook
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]]...)
See Also#
Used In#
Docstring Examples
PolyDataFilters.flip_faces(2 uses)PolyDataFilters.flip_normal_vectors(2 uses)