Tue, 10/13/2015 - 17:22
Forums:
I have two gp_Lin elements (lin1 and lin2), and I know that they intersect in 3D space (the value of lin1.distance(lin2) is 0). Is there a function I can use to find the point at which they intersect instead of coding it all by hand (I could not find one)?
Thanks for any help!
Roy
Tue, 10/13/2015 - 18:06
Hi Roy,
It is always a challenge to find the intersection of 3d lines/curves, because of computational error. You might be better served using something like GeomAPI_ExtremaCurveCurve to find the closest point. You can then compare the distance to make sure it is within some tolerance of 0. Then, simply take the extrema point from one of the curves.
Rob
Thu, 10/15/2015 - 17:47
Yes, the solution you proposed seemed to work quite well. Thanks a lot!
Roy