VolumeMassProperties Bug


I still see that when using VolumeMassProperties for closed Breps - it gives negative volume. The value however is correct.
I thought it has been fixed already before, but it seems - not…


Just to be sure, is this maybe related to the normals of the closed Brep pointing inward rather than outward? It seems quite difficult to make this a closed solid with normals pointing inward by hand, but can probably be programmed “incorrectly”.

Hi Dmitriy,

A model and some sample could would be helpful. Using Math.Abs gives you the result you expect, correct?

– Dale

Hello @dale
I also have an error in this Rhinocommon function and also in the grasshopper component.
The centers are all at the origin.

Here the file with some simple code to calculate.

bug Mesh Volume.gh (18.5 KB)

Hi @laurent_delrieu,

Let me know if this (below) helps.

TestLaurent.gh (17.0 KB)

– Dale

1 Like

Thanks it makes sense but it is a bit counter intuitive as the VolumeMassProperties isn’t null so there is no warning, it could be good if Grasshopper vanilla component also implements this modification!