RhinoCommon API
VolumeMassPropertiesCompute Method (Surface, Boolean, Boolean, Boolean, Boolean) |
Compute the VolumeMassProperties for a single Surface.
Namespace: Rhino.Geometry
Assembly: RhinoCommon (in RhinoCommon.dll)

public static VolumeMassProperties Compute( Surface surface, bool volume, bool firstMoments, bool secondMoments, bool productMoments )
Public Shared Function Compute ( surface As Surface, volume As Boolean, firstMoments As Boolean, secondMoments As Boolean, productMoments As Boolean ) As VolumeMassProperties
Parameters
- surface
- Type: Rhino.GeometrySurface
Surface to measure. - 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 given Surface or null on failure.

Exception | Condition |
---|---|
ArgumentNullException | When surface is null. |

Rhino for Windows
Supported in: 6.14