VolumeMassProperties for open BREP

I would like to get the Volume Mass properties of an open BREP. The implied closed geometry would be between the BREP and it’s projection one of the world coordinate system planes (i.e. y=0 plane).

This is essentially the AreaMassProperties.WorldCoordinatesFirstMoments.Y, but multiplied by the j component of the normal vector, so the Integral of y * dm * j, x * dm * i, or z * dm * k.

I would also like to get a volume centroid, so integral of x * y * dm * j / volume for the X centroid, etc.

How would I go about this?

Hi @bradlcampbell,

Have you tried using VolumeMassProperties.Compute on your open Brep? I’d expect it to work…

– Dale

Hi, Dale. It does give me a number, but I’m not sure what it means. If I have a unit square offset from the y=0 plane by 1 meter, I would like to get a volume of 1. I get 0. For shapes that have curvature I get a number, but it’s usually not what I want.

A half sphere (trimmed by the y=0 plane) gets the correct volume, but a quarter sphere does not. Volume of half sphere does not equal 2 times the volume of a quarter sphere.

I’m not sure what the VolumeMassPropeties is doing in these cases. I’m trying to see if I can compute the volume of a ship half hull more efficiently than I have been by using a mesh and doing these projections myself. For some hulls I may be able to form a solid, but some times you get hulls that are messy or difficult to deal with. But I know the integral of y * dArea * j gives me what I want (this is what I have been doing with a mesh).


@GregArden, is this something you can help with?

The feature of computing the volume from a collection of open surfaces is in there for cases where the surfaces bound a volume but don’t or aren’t joined together. So you might try to model the portion of the center plane and the extrusion in the j direction that make the model complete. You don’t need to join everything. togetherHalfHull.3dm (47.6 KB)

Of course garbage in garbage out applies. Large model errors could produce large errors in the numbers, where as small errors will not have a measurable effect on the results.

The functions that do numerical integration on breps are not exposed so you can’t just supply your own integrand and get a result.

Thanks, Greg. I’ll give that a try when I get a chance.

Having access to the functions that integrate over breps would be intriguing.