Fastest way to get polyline curve parameters


I need all parameters at a polylines edges. I tried to get all parameters at all curvepoints with

pars = [rs.CurveClosestPoint(curve, pt) for pt in curve_points]

My testcurve is over 8000mtrs in length with one curvepoint every mtr. On my pc this takes over 8 seconds.
It would nice to have some advanced way so it would be possible below one second, because the user has to wait for this to proceed :slight_smile:

Thanks a lot in advance!

The following only works because you have a polyline.

pars = curve.ToNurbsCurve().Knots

For a degree-1 NURBS (which is essentially a Polyline curve) the knot values are the same as the points of the polyline.

1 Like

Exactly what i was looking for - even faster! Thanks a lot menno.