You can compute the distance along the curve once and store the distance values in point data. You could then find a particular distance value in the array very quickly (as the distance values are inherently sorted).

However, we found that simple on-the-fly computation of sum of Euclidean distances between curve points are fast enough for interactive use (e.g., for sliding a marker point along the curve by a specific distance). We usually have less than 1000 points in the curve - probably if we had hundreds of thousands of points then we would need to precompute, store, and look up distances.

So I’d have to compute the euclidean distances between each point and consecutively sum them to get the distance. This isn’t exactly what I was hoping for but I suppose it will approximate the distance.For some reason, I was thinking that vtk.vtkParametricFunctionSource would have an implicit function that could represent a smooth version of the line in 3D space for me to compute distances on… now realizing it doesn’t have that.

Computing distance from linear segments is not necessarily a limitation but often preferable, because it guarantees that the curve that the user can see (which is always made up of linear segments, as required by the renderer) is the same model that is used for computations.

Ah, I’m realizing this now… I don’t work with poly lines often so I didn’t realize they were always linearly segmented. I had been working with very high resolution lines so my eyes couldn’t tell