AreaMassPropertiesWeightedSum 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 AreaMassProperties WeightedSum(
IEnumerable<AreaMassProperties> summands,
IEnumerable<double> weights
)
Public Shared Function WeightedSum (
summands As IEnumerable(Of AreaMassProperties),
weights As IEnumerable(Of Double)
) As AreaMassProperties
Parameters
- summands
- Type: System.Collections.GenericIEnumerableAreaMassProperties
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:
AreaMassPropertiesAn AreaMassProperties containing the result if successful, null if a failure occurs.
Exceptions| Exception | Condition |
|---|
| ArgumentNullException | When summands or weights is null. |
See Also