I want to analyze a tapered beam in Karamba- say an I-beam with variable depth. I believe there is no other way than to discretize it in N parts, where N is user-specified. And model each as a beam of constant depth.
However, the cross-sections component does not do this automatically - if i give it a list of N beam elements and N depths - it does not create N elements with corresponding depths of the array.
So i believe the way out is via a script-component with the following pseudocode:
INPUT1 - list of N elements Elem[] by reference
INPUT2 - list of N depths Depth[]
INPUT3 - rest of cross-section inputs tf tw and b
Script Algorithm -
for i from 1 to N
cross-section A = new cross-section(b, Depth[i],tf,tw)
Elem[i].assigncrossection ( A )
end for
Can anyone point me to the actual syntax of the key steps here inside the for loop? Am new to grasshopper scripting. C# would be my language of choice. Am not finding much help on scripting and coding in Karamba.