Changing the orientation of multiple diagonal lines


I am trying to construct a 2D truss which consists of multiple lines (assemblies) which are divided with different lengths. The line segments’ end points are connected with each other to produce the diagonal braces.

I maganed to change the diagonal orientations for the whole structure, but my main goal is to change it individually for every assembly (A1-A3 in the picture)


My thinking is to make a multiline data panel, which consists of as many numbers as assemblies I have, and the values would determine the orientation.
The problem is that the number of assemblies also varies (but it is a finite number, mostly 2-3-4), and I can’t figure out the management of the branches. I tried it with explode, but this way you have to adjust the outputs based on the number of assemblies.

I also attach the code which is now suitable for orientation changes for the whole structure but not for individual assemblies.

Thank you! (15.9 KB)


You seem to have it working well enough, except for a slight off-by-one span error reaching the end of ‘Total length’? The white group below using Merge is a better way to handle lists of inputs explicitly. In this case, the slider ‘No._assemblies’ can be replaced by the length the of Merge list. (22.1 KB)

P.S. Getting your data trees correct is largely a matter of avoiding ‘Flatten’ completely.
Maybe a little more than that, depending on how you want it? (33.9 KB)

P.P.S. I just noticed that now all the assemblies have lost their last brace when division length isn’t an integral multiple. How to fix that? Maybe avoid it? And ‘Zig-Zag’ mode is broken too.

LATER: Restored flattened lists to get bracing back, then used a cluster cProx four times to break up the lists of “Columns” and “Braces” into their respective assembly branches. Notice that columns where two assemblies join will be included in both assemblies.

Bracing_2D_2019_Oct15c (37.4 KB)


Thank you for your work, the assembly selection works nicely now!

I sort of worked out for this point too (but a lot less sophisticatedly :slight_smile: ).
My real problem is I can’t ‘use’ the branches.

To make it clearer:

  • I would like to somehow collect the separate assemblies’ columns into separate ‘line/geometry’ parameters
  • Create a multiline data panel like this:


This determines the orientation for every assembly (the first assembly’s braces orient left, the second’s right, …etc.)

  • use the already written “orientating” code to generate the braces in every assembly with different orientation based on the mulliline data.

The desired result would be this:

If you have a determined number of assemblies, it is not that hard, but I can’t cope with the changing number of branches without manually rewriting the code.

Actually the zigzag orientation is not that important, so if it worked for only left/right (0/1) that would be great as well.

Note the content of the ‘Orientation’ panel to designate bracing by assembly. It replaces the global “Choose orientation” value list.
In this panel, the list “0,1,0,1,2” corresponds to “Left,Right,Left,Right,Zag”. (35.5 KB)

1 Like

That’s exactly I was looking for, thank you!