LengthMassProperties
ReferencesContains static initialization methods and allows access to the computed metrics of length, length centroid, and length moments in curves.
Finalizer
~LengthMassProperties
#~LengthMassProperties()
Passively reclaims unmanaged resources when the class user did not explicitly call Dispose().
Properties
Gets the length centroid in the world coordinate system.
Moments of inertia with respect to centroid coordinate system. X = integral of ((y-y0)^2 + (z-z0)^2) dm Y = integral of ((z-z0)^2 + (x-x0)^2) dm Z = integral of ((z-z0)^2 + (y-y0)^2) dm where (x0,y0,z0) = centroid.
Remarks: What is meant by "moments of inertia" varies widely in textbooks and papers. The values returned here are the integrals listed in the Summary section. Some applications may want the values from WorldCoordinatesSecondMoments instead of the values returned here.
Uncertainty in centroid coordinates moments of inertia calculation.
Product moments with respect to centroid coordinate system.
Uncertainty in product moments with respect to centroid coordinate system.
Radii of gyration with respect to centroid coordinate system. X = sqrt(integral of ((y-y0)^2 + (z-z0)^2) dm/M) Y = sqrt(integral of ((z-z0)^2 + (x-x0)^2) dm/M) Z = sqrt(integral of ((z-z0)^2 + (y-y0)^2) dm/M) where (x0,y0,z0) = centroid.
Remarks: What is meant by "radii of gyration" varies widely in textbooks and papers. The values returned here are the integrals listed in the Returns section.
Second moments with respect to centroid coordinate system. X = integral of (x-x0)^2 dm Y = integral of (y-y0)^2 dm Z = integral of (z-z0)^2 dm where (x0,y0,z0) = centroid.
Uncertainty in centroid coordinates second moments calculation.
Gets the uncertainty in the centroid calculation.
Gets the uncertainty in the length calculation.
Returns the world coordinate first moments if they were able to be calculated. X is integral of "x dm" over the length Y is integral of "y dm" over the length Z is integral of "z dm" over the length.
Uncertainty in world coordinates first moments calculation.
The moments of inertia about the world coordinate axes. X = integral of (y^2 + z^2) dm Y = integral of (z^2 + x^2) dm Z = integral of (z^2 + y^2) dm.
Remarks: What is meant by "moments of inertia" varies widely in textbooks and papers. The values returned here are the integrals listed in the Summary section. Some applications may want the values from WorldCoordinatesSecondMoments instead of the values returned here.
Uncertainty in world coordinates moments of inertia calculation.
Returns the world coordinate product moments if they were able to be calculated. X is integral of "xy dm" over the length Y is integral of "yz dm" over the length Z is integral of "zx dm" over the length.
Uncertainty in world coordinates second moments calculation.
Radii of gyration with respect to world coordinate system. X = sqrt(integral of (y^2 + z^2) dm/M) Y = sqrt(integral of (z^2 + x^2) dm/M) Z = sqrt(integral of (z^2 + y^2) dm/M)
Remarks: What is meant by "radii of gyration" varies widely in textbooks and papers. The values returned here are the integrals listed in the Returns section.
Returns the world coordinate second moments if they were able to be calculated. X is integral of "xx dm" over the length Y is integral of "yy dm" over the length Z is integral of "zz dm" over the length.
Methods
public bool CentroidCoordinatesPrincipalMoments(out double x, out Vector3d xaxis, out double y, out Vector3d yaxis, out double z, out Vector3d zaxis)
Calculates the eigenvalues and eigenvectors of the moments matrix with respect to centroid coordinates.
public bool CentroidCoordinatesPrincipalMomentsOfInertia(out double x, out Vector3d xaxis, out double y, out Vector3d yaxis, out double z, out Vector3d zaxis)
Calculates the principal moments of inertia and principal axes with respect to centroid coordinates.
public static LengthMassProperties Compute(Curve curve, bool length, bool firstMoments, bool secondMoments, bool productMoments)
Calculates the length mass properties of a curve.
Parameters:
| curve (Curve) | The curve to measure. |
| length (bool) | true to calculate length. |
| firstMoments (bool) | true to calculate length first moments, length, and length centroid. |
| secondMoments (bool) | true to calculate length second moments. |
| productMoments (bool) | true to calculate length product moments. |
Returns: The LengthMassProperties for the given curve, or null on failure.
Calculates the length mass properties of a curve.
Parameters:
| curve (Curve) | The curve to measure. |
Returns: The LengthMassProperties for the given curve, or null on failure.
public static LengthMassProperties Compute(IEnumerable<Curve> curves, bool length, bool firstMoments, bool secondMoments, bool productMoments)
Calculates the length mass properties of an enumeration of curves.
Parameters:
| curves (IEnumerable<Curve>) | An enumeration of curves. |
| length (bool) | true to calculate length. |
| firstMoments (bool) | true to calculate length first moments, length, and length centroid. |
| secondMoments (bool) | true to calculate length second moments. |
| productMoments (bool) | true to calculate length product moments. |
Returns: The LengthMassProperties for the given enumeration of curves, or null on failure.
Calculates the length mass properties of an enumeration of curves.
Parameters:
| curves (IEnumerable<Curve>) |
Returns: The LengthMassProperties for the given enumeration of curves, or null on failure.
public void Dispose()
Actively reclaims unmanaged resources that this instance uses.
Dispose
#For derived class implementers.
This method is called with argument true when class user calls Dispose(), while with argument false when the Garbage Collector invokes the finalizer, or Finalize() method.
You must reclaim all used unmanaged resources in both cases, and can use this chance to call Dispose on disposable fields if the argument is true.
Also, you must call the base virtual method within your overriding method.
Parameters:
| disposing (bool) | true if the call comes from the Dispose() method; false if it comes from the Garbage Collector finalizer. |
Sum mass properties together to get an aggregate mass.
Parameters:
| summands (IEnumerable<LengthMassProperties>) | An array of mass properties to add. |
| bAddTo (bool) | If true, then the summands are added to the existing mass. |
Returns: True if successful.
Exceptions:
| ArgumentNullException |
Sum mass properties together to get an aggregate mass.
Parameters:
| summand (LengthMassProperties) | mass properties to add. |
Returns: true if successful.
public static LengthMassProperties WeightedSum(IEnumerable<LengthMassProperties> summands, IEnumerable<double> weights)
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.
Parameters:
| summands (IEnumerable<LengthMassProperties>) | An array of mass properties to add. |
| weights (IEnumerable<double>) | An array of non-negative densities, of the same length as summands. |
Returns: An LengthMassProperties containing the result if successful, null if a failure occurs.
Exceptions:
| ArgumentNullException | When summands or weights is null. |
public bool WorldCoordinatesPrincipalMoments(out double x, out Vector3d xaxis, out double y, out Vector3d yaxis, out double z, out Vector3d zaxis)
Calculates the eigenvalues and eigenvectors of moments matrix in world coordinates.