add_mesh_clip_box#
- WidgetHelper.add_mesh_clip_box(mesh, invert=False, rotation_enabled=True, widget_color=None, outline_translation=True, merge_points=True, crinkle=False, **kwargs)[source]#
Clip a mesh using a box widget.
Add a mesh to the scene with a box widget that is used to clip the mesh interactively.
The clipped mesh is saved to the
.box_clipped_meshes
attribute on the plotter.- Parameters
- mesh
pyvista.DataSet
The input dataset to add to the scene and clip.
- invertbool,
optional
Flag on whether to flip/invert the clip.
- rotation_enabledbool,
optional
If
False
, the box widget cannot be rotated and is strictly orthogonal to the cartesian axes.- widget_color
color_like
,optional
Color of the widget. Either a string, RGB sequence, or hex color string. For example:
color='white'
color='w'
color=[1.0, 1.0, 1.0]
color='#FFFFFF'
- outline_translationbool,
optional
If
False
, the plane widget cannot be translated and is strictly placed at the given bounds.- merge_pointsbool,
optional
If
True
(default), coinciding points of independently defined mesh elements will be merged.- crinklebool,
optional
Crinkle the clip by extracting the entire cells along the clip.
- **kwargs
dict
,optional
All additional keyword arguments are passed to
BasePlotter.add_mesh()
to control how the mesh is displayed.
- mesh
- Returns
vtk.vtkActor
VTK actor of the mesh.