Grasshopper advanced truss

Hi all!

I am quite new to grasshopper so I would be gratefull for any help :slight_smile:
I need to create an advanced truss with iterations.
I have a truss with horizontal bottom chord and sloped top chord. Data that I will adjust by sliders are height of the truss (H), Length (L), and slope (gamma angle). I am able to create that basic geometry without problem. Problems appears when I need to adjust number of diagonals and angles.
Number of diagonals should be adjusted in a way so, all angles (alfa) would be the same in a range 30-60deg. Beta angle also should be between 30 and 60 deg. I have been looking for some solutions on the forums, but I didn’t manage to find any similar examples. I know that I need to use octopus plugin to run iterations to find best angle with min number of diagonals. I was tryin to copy digonals N-times with vector, but then I do not know how to “block” digonals to go beyound truss (maybe this approach is wrong)
Can anyone give me a hint how to handle that problem?

Hello,

Using some trigonometry, I was able to derive the exact formula of the x abscissa of each bottom point of the truss.

x_0 = 0,
x_n = H/tan(alpha) * (tan(alpha)-tan(gamma))/(tan(alpha)+tan(gamma))^(n-1) for n>=1 until it exceeds L.

Beta is calculated at the end and checked for inclusion in the correct domain, if the result is outside the last segment of the truss is displayed in red, else in green.

TrussAlphaGamma.gh (18.6 KB)

1 Like

You can also check out this thread, where scripting trusses is discussed at large.

That works realy nice! Thanks a lot for help! :slight_smile:
I analized script and I undestand the process beside 2 things. Could you explain me how did you figure out a forumal of the x abscissa of each bottom point and why did you duplicate Data before mass addition?

See calculations attached.
The formula for the x above is the local increment from a bottom point to the next top point. Duplicate Data is required to reach the next bottom point (each triangle being isosceles)

Thank you very much for explanation! I am really grateful!

1 Like