add_mesh_clip_plane#
- Plotter.add_mesh_clip_plane(mesh, normal='x', invert=False, widget_color=None, value=0.0, assign_to_axis=None, tubing=False, origin_translation=True, outline_translation=False, implicit=True, normal_rotation=True, crinkle=False, **kwargs)#
Clip a mesh using a plane widget.
Add a mesh to the scene with a plane widget that is used to clip the mesh interactively.
The clipped mesh is saved to the
.plane_clipped_meshes
attribute on the plotter.- Parameters
- mesh
pyvista.DataSet
The input dataset to add to the scene and clip.
- normal
str
ortuple
(float
),optional
The starting normal vector of the plane.
- invertbool,
optional
Flag on whether to flip/invert the clip.
- widget_color
color_like
,optional
Either a string, RGB list, or hex color string.
- value
float
,optional
Set the clipping value along the normal direction. The default value is 0.0.
- assign_to_axis
str
orint
,optional
Assign the normal of the plane to be parallel with a given axis. Options are
(0, 'x')
,(1, 'y')
, or(2, 'z')
.- tubingbool,
optional
When using an implicit plane wiget, this controls whether or not tubing is shown around the plane’s boundaries.
- origin_translationbool,
optional
If
False
, the plane widget cannot be translated by its origin and is strictly placed at the given origin. Only valid when using an implicit plane.- outline_translationbool,
optional
If
False
, the box widget cannot be translated and is strictly placed at the given bounds.- implicitbool,
optional
When
True
, avtkImplicitPlaneWidget
is used and whenFalse
, avtkPlaneWidget
is used.- normal_rotationbool,
optional
Set the opacity of the normal vector arrow to 0 such that it is effectively disabled. This prevents the user from rotating the normal. This is forced to
False
whenassign_to_axis
is set.- 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.