Creating Tapered Beam Script in Karamba


(Nprabhukhanolkar) #1

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.

(Cp) #2

Dear Nprabhukhanolkar,
please find attached a definition for a tapered I-beam.
Clemens (21.0 KB)

(Nprabhukhanolkar) #3

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: (28.4 KB)


(Nprabhukhanolkar) #5

Thanks very much. This worked.