enable_point_picking

Plotter.enable_point_picking(callback=None, show_message=True, font_size=18, color='pink', point_size=10, use_mesh=False, show_point=True, tolerance=0.025, **kwargs)

Enable picking at points.

Enable picking a point at the mouse location in the render view using the P key. This point is saved to the .picked_point attrbute on the plotter. Pass a callback function that takes that point as an argument. The picked point can either be a point on the first intersecting mesh, or a point in the 3D window.

Parameters
callbackcallable(), optional

When input, calls this function after a pick is made. The picked point is input as the first parameter to this function. If use_mesh is True, the callback function will be passed a pointer to the picked mesh and the point ID of the selected mesh.

show_messagebool or str, optional

Show the message about how to use the point picking tool. If this is a string, that will be the message shown.

font_sizeint, optional

Sets the size of the message.

colorstr, optional

The color of the selected mesh is shown.

point_sizeint, optional

Size of picked points if show_point is True. Default 10.

use_meshbool, optional

If True, the callback function will be passed a pointer to the picked mesh and the point ID of the selected mesh.

show_pointbool, optional

Show the picked point after clicking.

tolerancefloat, optional

Specify tolerance for performing pick operation. Tolerance is specified as fraction of rendering window size. Rendering window size is measured across diagonal.

**kwargsdict, optional

All remaining keyword arguments are used to control how the picked point is interactively displayed.