VolumeMassPropertiesWeightedSum Method |
Sum a list of mass properties together to get
an aggregate mass, weighting each by a density factor.Ignores existing
mass properties in this object.
Namespace:
Rhino.Geometry
Assembly:
RhinoCommon (in RhinoCommon.dll)
Since: 9.0
Syntaxpublic static VolumeMassProperties WeightedSum(
IEnumerable<VolumeMassProperties> summands,
IEnumerable<double> weights
)
Public Shared Function WeightedSum (
summands As IEnumerable(Of VolumeMassProperties),
weights As IEnumerable(Of Double)
) As VolumeMassProperties
Parameters
- summands
- Type: System.Collections.GenericIEnumerableVolumeMassProperties
An array of mass properties to add. - weights
- Type: System.Collections.GenericIEnumerableDouble
An array of non-negative densities, of the same length as summands.
Return Value
Type:
VolumeMassPropertiesAn VolumeMassProperties containing the result if successful, null if a failure occurs.
Exceptions| Exception | Condition |
|---|
| ArgumentNullException | When summands or weights is null. |
See Also