# Examples from pyvista.PolyData.faces
# ====================================

import pyvista as pv
plane = pv.Plane(i_resolution=2, j_resolution=2)
plane.faces

# Note how the faces contain a "padding" indicating the number
# of points per face:
plane.faces.reshape(-1, 5)

# Set the faces directly. The following example creates a simple plane
# with a single square faces and modifies it to have two triangles
# instead.
mesh = pv.Plane(i_resolution=1, j_resolution=1)
mesh.faces = [3, 0, 1, 2, 3, 3, 2, 1]
mesh.faces

# ----------------------------------------------------------------------
# Generated by sphinx-examples-as-code https://github.com/pyvista/sphinx-examples-as-code

