<jupyter_start><jupyter_text>Spline Widget=============A spline widget can be enabled and disabled by the`pyvista.WidgetHelper.add_spline_widget`{.interpreted-text role="func"}and `pyvista.WidgetHelper.clear_spline_widgets`{.interpreted-textrole="func"} methods respectively. This widget allows users tointeractively create a poly line (spline) through a scene and use thatspline.A common task with splines is to slice a volumetric dataset using anirregular path. To do this, we have added a convenient helper methodwhich leverages the`pyvista.DataSetFilters.slice_along_line`{.interpreted-text role="func"}filter named`pyvista.WidgetHelper.add_mesh_slice_spline`{.interpreted-textrole="func"}.<jupyter_code>import numpy as np

import pyvista as pv
mesh = pv.Wavelet()

# initial spline to seed the example
points = np.array([[-8.64208925, -7.34294559, -9.13803458],
                   [-8.25601497, -2.54814702,  0.93860914],
                   [-0.30179377, -3.21555997, -4.19999019],
                   [ 3.24099167,  2.05814768,  3.39041509],
                   [ 4.39935227,  4.18804542,  8.96391132]])

p = pv.Plotter()
p.add_mesh(mesh.outline(), color='black')
p.add_mesh_slice_spline(mesh, initial_points=points, n_handles=5)
p.camera_position = [(30, -42, 30),
 (0.0, 0.0, 0.0),
 (-0.09, 0.53, 0.84)]
p.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13501483679525222, 'fraction_numerical': 0.11646884272997032, 'mean_word_length': 4.2084942084942085, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '293898', 'license': 'MIT', 'n_tokens_mistral': 571, 'n_tokens_neox': 475, 'n_words': 107, 'path': 'spline-widget.ipynb', 'repo_name': 'UttamBasu/ipygany_examples', 'size': '1348'}