Getting AreaMoments values in VB

Hey all,

I am trying to calculate some structural properties of a cross section using only gh (ideally native components), but I am missing some results in its “Area Moments” component that the one in Rhino has (more specifically the principal moments of inertia about the centroid and principal axes). What I am trying to do is optimizing a cross section according to these properties so it wouldn’t make sense to bake the geometry after each iteration, check whether or not the properties satisfy the criteria and then run the optimization again.

I know it’s possible to access this information within the AreaMassProperties class but my knowledge about scripting is really limited, so basically no clue about to get these results. It’s probably a two-line VB or C# script component but it’s been really frustrating so, any ideas?

Thank you!

This C# script I think harvests all the AreaMassProperties which Rhino provides: (21.0 KB)

It works perfectly, thanks a lot! :slight_smile: