Use a clipping plane#

This example shows how to use a clipping plane in the Visualization Interface Tool to cut a mesh.

import pyvista as pv

from ansys.tools.visualization_interface import ClipPlane, Plotter

mesh = pv.Cylinder()

Create a plotter and clip the mesh#

pl = Plotter()

# Create a clipping plane
clipping_plane = ClipPlane(normal=(1, 0, 0), origin=(0, 0, 0))

# Add the mesh to the plotter with the clipping plane
pl.plot(mesh, clipping_plane=clipping_plane)
pl.show()
clipping plane

Total running time of the script: (0 minutes 0.398 seconds)