Selecting points multiple times in one go #1886
-
|
Hi, I am using the Is there a way to tailor this method or is there another solution so that once I plot the mesh with the points, I can select multiple points and return them as a Thank you! This library is a lifesaver :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Totally possible. use the import pyvista as pv
from pyvista import examples
mesh = examples.download_bunny()
da_points = []
p = pv.Plotter(notebook=0)
p.add_mesh(mesh)
def callback(pt):
da_points.append(pt)
p.add_point_labels([pt,], ['You picked me!'], )
p.enable_point_picking(callback)
p.show()Screen.Recording.2021-11-28.at.1.58.55.PM.mov |
Beta Was this translation helpful? Give feedback.
Totally possible. use the
callbackargument ofenable_point_picking()to track your picked points. Something like:Screen.Recording.2021-11-28.at.1.58.55.PM.mov