pyvista.Plotter.enable_element_picking#
- Plotter.enable_element_picking(
- callback=None,
- mode='cell',
- show=True,
- show_message=True,
- font_size=18,
- color='pink',
- tolerance=0.025,
- pickable_window=False,
- left_clicking=False,
- picker=PickerType.CELL,
- **kwargs,
Select individual elements on a mesh.
- Parameters:
- callback
callable()
,optional
When input, calls this callable after a selection is made. The
mesh
is input as the first parameter to this callable.- mode
str
|ElementType
, default: “cell” The picking mode. Either
"mesh"
,"cell"
,"face"
,"edge"
, or"point"
.- showbool, default:
True
Show the selection interactively.
- show_messagebool |
str
, default:True
Show the message about how to use the mesh picking tool. If this is a string, that will be the message shown.
- font_size
int
, default: 18 Sets the font size of the message.
- color
ColorLike
, default: “pink” The color of the selected mesh when shown.
- tolerance
float
, default: 0.025 Specify tolerance for performing pick operation. Tolerance is specified as fraction of rendering window size. Rendering window size is measured across diagonal.
Warning
This is ignored with the
'hardware'
picker
.- pickable_windowbool, default:
False
When
True
, points in the 3D window are pickable.- left_clickingbool, default:
False
When
True
, meshes can be picked by clicking the left mousebutton.Note
If enabled, left-clicking will not display the bounding box around the picked mesh.
- picker
str
|PickerType
,optional
Choice of VTK picker class type:
'hardware'
: UsesvtkHardwarePicker
which is more performant for large geometries (default).'cell'
: UsesvtkCellPicker
.'point'
: UsesvtkPointPicker
which will snap to points on the surface of the mesh.'volume'
: UsesvtkVolumePicker
.
- **kwargs
dict
,optional
All remaining keyword arguments are used to control how the picked path is interactively displayed.
- callback