RhinoCommon. Intersection between two lines


I’m trying to get a 3d point as a result of an intersection between two lines with:

Rhino.Geometry.Intersect.Intersection.LineLine (linea_1, linea_2)

and I get:

True, 0.47286821705426446, 0.41485371342835614

but I need a punto3d.

Anyone have any suggestions?

regards and thanks

Hi Juan

that method returns the parameters along the lines where they best approximate each other. To get the intersection point, evaluate one of the lines at the given parameter. If the lines do not fully intersect, then you can get a better answer by evaluating both lines at both parameters, then computing the average point coordinate.

David Rutten

withRhino.Geometry.Intersect.IntersectionEvent.PointA ?

I have it already solved

ptoInt = Rhino.Geometry.Intersect.Intersection.LineLine(linea_1, linea_2) linea_1.PointAt(ptoInt[1])

thank David