Connecting Lines in 3D space
Hey, I'm fairly a newbie to coding in general and first time asking for help on a forum so hopefully its a decent enough explanation.
I have a list of Lines, and there will always be two outer vertical lines, which I can get easily enough.
I'm now trying to create two lists of the upper lines and the lower lines. As shown in the images in blue/red. Any ideas on how I can best achieve this?
2 Replies
A slow solution is simply storing all of the endpoints of the line segment in a collection, then starting from the top of one, find non vertical lines with an endpoint within 0.0001 of the top, then removing that line from the collection, then continuing until you reach the other vertical lines top.
Do it efficiently with an octree or similar spatial collection.
Thank you! got it working