Sort lines by horizontal vertical and diagonal directions

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.

_SortLineSegmentsOrthoDiag.gh (28.9 KB)