Creating Tapered Beam Script in Karamba

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.

Dear Nprabhukhanolkar,
please find attached a definition for a tapered I-beam.
Best,
Clemens

180801_TaperedIBeam_cp.gh (21.0 KB)

Thanks,
I cannot load the file due to version issues, am on Rhino5.
Can you either give a screenshot of the file, or create a version compatible with Rhino5?

Here the files: 180802_TaperedIBeam_cp.gh (28.4 KB)

.
Best,
Clemens

Thanks very much. This worked.

Hi there,

What if I wanted the beam to be tapered as in the attached file?

Would it be possible to use the consecutive domain command to control the cross sectional height at the edges and midspan?

Hi @Lolo,
you can divide the original beam into two separate lines in the middle and apply the range of cross sections in the same manner but reversing the list direction of the cross sections for other half of the beam.