Detect orientation of intersecting lines

Hey there, i want to build a pipe-generator where i simply draw lines and GH makes pipes out of it. The connectors are modeled seperately and i would like to put them in place with GH.
Therefore i need the type of intersection and orientation but all could manage so far are the coordinates. At the moment it detects if lines are in contact, lists the coordinates without using them multiple times.

Can anybody give me a hint how to achieve my goals?



rohre_internalised.gh (12.2 KB)

Hello,

Not sure this was really the question, but at least it was a fun exercise !
For now it only detects three configurations based on your example, but with more geometrical tests, it could work for any amount of configurations, as long as you list them properly.

rohre_internalised.gh (27.1 KB)

1 Like

hey @magicteddy, thank you so much!!
I found a lot of useful tricks in your solution and i learnd how to work with oriented planes. nice!

The file is quite huge because i included the final geometry of the connectors.

rohre_2a.gh (2.3 MB)

1 Like