# Examples from pyvista.DataSetFilters.clip_surface
# =================================================

# Clip a cube with a sphere.
import pyvista as pv
sphere = pv.Sphere(center=(-0.4, -0.4, -0.4))
cube = pv.Cube().triangulate().subdivide(3)
clipped = cube.clip_surface(sphere)
clipped.plot(show_edges=True, cpos='xy', line_width=3)

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