Filter curves of complex geometry

i have truss curved and need to make his members in groups like verticale member in one group and diagonals and horizontal this a script and what i reached to



revProj1.gh (7.1 MB)

Define horizontal and vertical in this case.
Diagonals have longer lengths, cull them by it.

i do that and can get diagonals but i need to sperated vertical and horizonal members of truss in seperated groups

Define horizontal and vertical in this case.


top and bottom lines is horizontal and right and left is vertical like this

revProj1 Edited V0.gh (7.0 MB)

1 Like

This code attempts to isolate the square curves (cyan group, one missing?) and then compare its segments with a Z vector to color them white (vertical) or blue (horizontal), but fails in two areas where the squares are rotated near 45 degrees.


revProj1_2023Jun3a.gh (6.6 MB)

File size is an “ouch”! Would prefer geometry in a Rhino file when it’s this large.

The squares are not sequential; it would be helpful to have a curve that corresponds to the center (or one corner) of the truss.

P.S. This is definitely a case where useful information that must have been available when creating the truss is missing. The figure-8 curve is just one of those missing pieces. It can be amusing to reverse engineer stuff like this, but only to a point.

This component from the NGON plugin can get the center curve.
But even with that defining direction H and V is difficult.
I tried to compare them to the binormal vector of the center curve, but that is not working either.

image