I am quite new to grasshopper so I would be gratefull for any help
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?

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.

That works realy nice! Thanks a lot for help!
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)