# Examples from pyvista.PolyDataFilters.compute_normals
# =====================================================

# Compute the point normals of the surface of a sphere.
import pyvista as pv
sphere = pv.Sphere()
sphere = sphere.compute_normals(cell_normals=False)
normals = sphere['Normals']
normals.shape

# Alternatively, create a new mesh when computing the normals
# and compute both cell and point normals.
import pyvista as pv
sphere = pv.Sphere()
sphere_with_norm = sphere.compute_normals()
sphere_with_norm.point_data['Normals'].shape
sphere_with_norm.cell_data['Normals'].shape

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