Find Perpendicular Intersection on Curve from independent test point

Hi All,

I have a curve and I have a test point (not on the curve).
I want to find the point(s) on the curve where a line from the test point to the curve would intersect the curve perpendicular to it.

Is there a Python method or approach to do this?

Regards,

Shane.

It would be nice if you can upload a sketch of what you are trying to achieve. Or even if you have a script you tried, please upload it. I think it can be done in grasshopper also without using Python. But I am not sure what you are trying to achieve through your description.

A line from the the test point to the closest point on the curve will be perpendicular to the curve, if the curve is C1 (tangency) continuous and the closest point is not at the end of the curve. In regular Rhino the closest point can be found using ClosestPt.

If the closest point is at the end of the curve then a line between the test point and the closest point may or may not be perpendicular to the curve.

There may be additional points on the curve than the closest point for which a line between the test point and the point on the curve will be perpendicular to the curve. Each of these points will be the closest point to the test point for some portion of the curve.

If the curve has a kink and is therefore not C1 continuous then the closest point may be at a kink.

1 Like

Hi @shanew06,

If you are using Python, you might try using Curve.GetLocalPerpPoint.

– Dale

Thanks All.

@dale that’s the one I’m looking for! BUT, it seems to be only in Rhino 6.
Sorry, I should have mentioned it’s for Rhino 5. Any options there?
Thanks very much.

Shane.

Yeah, sorry no. Rhino 6 or greater.

– Dale