Cross section optimization by iD's element in c#

Hi everyone

I try to create a workflow to optimize wood cross section by the id of element. For that, I’m using the Karamba library in c#. I made a test but it looks like cross sections of the model are not updated during the optimization. Can someone help me with that ? I attached my grasshopper file and my csv cross section files to run the workflow.

Thanks (66.6 KB)

DataBaseForBeam.csv (24.5 KB)
DataBaseForColumn.csv (3.0 KB)


Hi @Augustin_L,

I cannot run your definition - the script throws an exception. What version and build of K3D do you use?

Try to debug the script using a cantilever with only one beam.

Does the scripting example work for you (see here)?

– Clemens

Hi Clemens,

I’m using the version of karamba3D for rhino 7. For my side, the script doesn’t throw an exception. The script runs but there is a warning :“you may need to provide a runtime policy”. Here, I attached my cantilever beam example.

DataBaseForBeam.csv (24.5 KB) (47.9 KB)

Hi @Augustin_L,

I think you forgot to add the updated beam to the model: (45.6 KB).

The warning is due to the fact that your version of RhinoCommon.dll is newer than that used for compiling Karamba3D. I haven’t found a good way yet to get rid of that message.

– Clemens

1 Like