How can I split a polyline into its linear segments?

Huh! I didn’t realize that, good find!

FYI: PyVista has direct access to that filter:

import pyvista as pv
from pyvista import examples

# Example mesh with a single PolyLine cell
polyline = examples.load_spline()
# use vtk.vtkTriangleFilter to create lines
lines = polyline.triangulate()
1 Like