RhinoCommon API
VolumeMassPropertiesCompute Method (IEnumerableGeometryBase, Boolean, Boolean, Boolean, Boolean) |
Computes the VolumeMassProperties for a collection of geometric objects.
At present only Breps, Surfaces, Meshes and Planar Closed Curves are supported.
Namespace: Rhino.Geometry
Assembly: RhinoCommon (in RhinoCommon.dll)

public static VolumeMassProperties Compute( IEnumerable<GeometryBase> geometry, bool volume, bool firstMoments, bool secondMoments, bool productMoments )
Public Shared Function Compute ( geometry As IEnumerable(Of GeometryBase), volume As Boolean, firstMoments As Boolean, secondMoments As Boolean, productMoments As Boolean ) As VolumeMassProperties
Parameters
- geometry
- Type: System.Collections.GenericIEnumerableGeometryBase
Objects to include in the area computation. - volume
- Type: SystemBoolean
true to calculate volume. - firstMoments
- Type: SystemBoolean
true to calculate volume first moments, volume, and volume centroid. - secondMoments
- Type: SystemBoolean
true to calculate volume second moments. - productMoments
- Type: SystemBoolean
true to calculate volume product moments.
Return Value
Type: VolumeMassPropertiesThe VolumeMassProperties for the entire collection or null on failure.

Rhino for Windows
Supported in: 6.14