I made a cluster that sorts orthogonal and diagonal lines into X, Y, Z orthogonals and XY, XZ, YZ and XYZ diagonals.
It seems to work perfectly on lines I draw manually using ortho snap.
It also works fine on lines that I derive from the edges of boxes (X lines in white):
When I do a boolean union of the boxes, either in Rhino or in Grasshopper, some of the edge lines of the resulting solid don’t sort properly (note a couple white X lines are missing).
The missing lines above that should be sorted as X orthogonal lines get recognized as diagonal lines (the white lines here are from my XZ diagonals output.)
Is this a tolerance issue in my sorting definition?
I tried playing with different tolerances but it didn’t help.
Or is it a document tolerance problem?
I tried changing document tolerance and redoing the booleans. Didn’t help.
Or have I overlooked something in the structure of the definition?
What am I missing here? Any suggestions much appreciated.
Thanks! This is perfect! You actually went beyond what I needed here.
The “edges from directions” component is all I needed. It just works.
I’m still curious why my homemade sorter fails here. It works in all other situations, but since there’s another solution in this situation, my issue is solved.
The lines in the background are there because I’m working out a definition that sorts all the different ways orthogonal lines can intersect. I don’t actually need to isolate them from the Brep edges. I’ll post that in another thread. Hopefully that sorter is not also something that exists as a single component. I mean, it would be super convenient, but also I would have spend a bunch of time on something that already exists.
Hmm. I have a second little cluster that merges and consolidates overlapping lines and then flips them to all the same direction. I’ll try putting that in front and see if it changes anything.
The glitch was due to using many instances of the similarity component. I replaced it with the “equality with tolerance” component, set to document tolerance, and everything now works.