# Examples from pyvista.CellType.n_faces
# ======================================

# `WEDGE` has a fixed number of faces.
import pyvista as pv
pv.CellType.WEDGE.n_faces

# `POLYHEDRON` has a variable number of faces and raises a ValueError.
try:
    pv.CellType.POLYHEDRON.n_faces
except ValueError as error:
    print(error)

# Only three-dimensional cell types have faces.
pv.CellType.LINE.n_faces

pv.CellType.QUAD.n_faces

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

