AreaMassProperties for multiple curves

@dale @stevebaer

It would be nice if RhinoCommon supported the calculation of AreaMassProperties for multiple curves, similar to the way that the AreaMoments command works on multiple curves.

I have - for now - created a native implementation using ON_MassProperties with a few dirty hacks to get it into RhinoCommon. I think it would be better if is supported out-of-the-box.

A few things I noticed: the AreaMoments command does not detect/support counter-clockwise curves, and it would be nice - at least in code - to be able to have nested curves with opposite planar orientations to add/subtract area and mass. Furthermore, the command does not notice that the curves are not in the same plane, and I think that calculation of the moments only makes sense if the curves are all in the same plane.

If you want I can share my native-to-.NET implementation.

Hi @menno,

There is this:

https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_AreaMassProperties_Compute_9.htm

and this:

https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_AreaMassProperties_Compute_10.htm

Does this help?

I’m guessing most of our customers don’t pay attention to curve direction. So imposing this could potentially lead to some confusion. If you have a tool that works for you, I’d say continue to use it.

– Dale

2 Likes

@menno - I’ve updated my reply above…

1 Like

Thanks @dale - I feel a bit stupid for having missed the methods you point out above :joy:

We’ve all been there lol…

1 Like