Note
Click here to download the full example code
Picking Meshes#
This example demonstrates how to pick meshes using
enable_mesh_picking()
.
import pyvista as pv
Pick either a cube or a sphere using “p”#
sphere = pv.Sphere(center=(1, 0, 0))
cube = pv.Cube()
pl = pv.Plotter()
pl.add_mesh(sphere, color='r')
pl.add_mesh(cube, color='b')
pl.enable_mesh_picking()
pl.show()
