add_mesh_clip_box

WidgetHelper.add_mesh_clip_box(mesh, invert=False, rotation_enabled=True, widget_color=None, outline_translation=True, **kwargs)

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
meshpyvista.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_colorstr or sequence, optional

Color of the widget. Either a string, RGB sequence, or hex color string. For example:

  • color='white'

  • color='w'

  • color=[1, 1, 1]

  • color='#FFFFFF'

outline_translationbool, optional

If False, the plane widget cannot be translated and is strictly placed at the given bounds.

**kwargsdict, optional

All additional keyword arguments are passed to BasePlotter.add_mesh() to control how the mesh is displayed.

Returns
vtk.vtkActor

VTK actor of the mesh.