Division based on length for bracing

So I’d like to create 2D truss with lunchbox plugin and base the division of the truss on the length of the vertical members length. if the vertical length is x < 5500 the number of divisions is 2; if 5500 < x < 7000 → division = 3; if 7000 < x → division = 4.

I managed to do it with a double if but its not very elegant in my opinion :smiley: Also I’d like to know if there is a more general approach to this in case i need more combinations?

bracingBasedonLength.gh (13.7 KB)

Here is one idea.

bracingBasedonLength_v2.gh (18.2 KB)

1 Like

for your case:

bracingBasedonLength_v3.gh (33.3 KB)


Yeah, both are definietly better solutions. Thanks for both!

1 Like