I have a script that sort horizontal and vertical lines but not diagonal lines. This script i found on the GH forums and i want to sort/filter diagonal lines out cause of trusses i want to make in an structure. Is there anyone who can help me out here? The GH script is attached.
I was looking for a definition that did this, found this thread, and then realized I needed a definition that was more universally usable, so I made one.
This one sorts line segments not by “horizontal, vertical, diagonal”, but by whether they’re parallel to the X, Y, or Z, axis (orthogonal) or whether they’re diagonal and parallel to the XY, XZ, or YZ plane, or whether they’re diagonal and go through all axis/planes (XYZ).
Also made it tidy and ready to cluster, and there’s internalized geometry for testing if you edit the definition- segments connecting all the vertices of a cube, joined randomly.
You will need to download sasquatch for version 2 to work. But version 2 is pretty much glitch proof, where version one often failed to correctly recognize orthogonal lines on edges of objects created using boolean union in rhino.
You should also look for the topologizer component elsewhere, and simplify curve. There are ways to put those together with my little sorter that eliminate all accidental bad inputs for feeding a number of types of definition downstream.
I am a newb and these clusters may very well do things that other components can already do, I’d love to know if I’m duplicating existing stuff.
OK. Alternatively, use version 2, but open up the cluster and replace all instances of Sasquatch’s “document tolerance” with Panel components, into which you enter your document tolerance.