What would be the shortest way to get following:
- I have a point
- I have a polyline
I need to know the closest line segment in polyline.
Is there something similar in RhinoCommon?
Or do I need to measure distance between all segments in polyline and take shortest one?
If I recall correctly, this is this method you want:
Where the integer part of the returned parameter corresponds to the segment index and the decimal part the t value along it.
Edit: Just checked, seems to be it:
Nice it outputs parameter with inteteger as segment id.
I remember you mentioned this before, but I did not put into my head.
Thank you Anders:)
Haha, I had a strange sense of déjà vu as well. The Polyline class truly is a unsung hero of RhinoCommon