Create perpendicular distances between two 3D lines (with 10 cm integral)

Hello everyone! I’ve got a question regarding a script I created some days ago, in order to create perpendicular distances between two 3d lines with 10 cm integral (can be manually changed). At first the points are created to a target line. Then a perpendicular plane on these points and the intersection points with the other line are created. Then I get the distances subtracting the two points coordinates. Even though the script works when selecting any 3d line. It doesnt work the lines that I’m specifically trying to measure. I cannot see the reason why it wouldn’t work with these specific (pink and green line). The distances returned for these two lines are wrong. It might be that there is a problem with the WCS System? . If there is any suggestion or help please let me know. P.S. For some reason its impossible to upload the files yet

Regards

Hi @kko3EBDE,

Have you tried the Geometry.DistanceTo node?

1 Like

Hard to say anything without seeing your progress. Are the two 3D lines always parallel? If so, you should be able to use ClosestPointTo to find the perpendicular point on the opposing line.

What type of geometry are you working with? Feature Lines or something else?