Get Area Principal Moments of Inertia about Centroid and Principal Axes of a surface

Hi, I want to get Area Principal Moments of Inertia about Centroid and Principal Axes of a surface and the direction of the principal axes in Grasshopper, but I can’t find the component or the method in RhinoScriptSyntax or RhinoCommon API. The properties can be obtained with the AreaMoments command in Rhino.

Hi @russell,

Use the AreaMassProperties class. Let me know if you need a sample.

– Dale

Thanks, I also found this. But my problem is:

  • It doesn’t have a property for principal moment, I can only find moment about centroid and centroid coordinate system.

  • I also can’t find the centroid coordinate system, the vector that determines the axes is not provided.

I will be very grateful if you can offer an example about how to get the principal moment of a flat surface and the centroid coordinate system.@dale

Hi @russell,

Somehow these results were left off the class. I’ll add something for the next service release.

https://mcneel.myjetbrains.com/youtrack/issue/RH-47674

– Dale

Hello Dale,

Thank you very much for your answers. It seems there is a way to get these principal axes. For those who are not familiar with python scripts, would it be possible to give a grasshopper file with the script that gives the principal axes, with input the brep? That’d be so helpful.

Thanks in advance,

Marin