- Plotter.add_spline_widget(callback, bounds=None, factor=1.25, n_handles=5, resolution=25, color='yellow', show_ribbon=False, ribbon_color='pink', ribbon_opacity=0.5, pass_widget=False, closed=False, initial_points=None)#
Create and add a spline widget to the scene.
Use the bounds argument to place this widget. Several “handles” are used to control a parametric function for building this spline. Click directly on the line to translate the widget.
The method called every time the spline is updated. This passes a
pyvista.PolyDataobject to the callback function of the generated spline.
Length 6 tuple of the bounding box where the widget is placed.
An inflation factor to expand on the bounds when placing.
The number of interactive spheres to control the spline’s parametric function.
The number of points in the spline created between all the handles.
Either a string, RGB sequence, or hex color string.
True, the poly plane used for slicing will also be shown.
Color of the ribbon. Either a string, RGB sequence, or hex color string.
Opacity of ribbon. Defaults to 1.0 and must be between
True, the widget will be passed as the last argument of the callback.
Make the spline a closed loop.
The points to initialize the widget placement. Must have same number of elements as
n_handles. If the first and last point are the same, this will be a closed loop spline.
The newly created spline widget.
This widget has trouble displaying certain colors. Use only simple colors (white, black, yellow).