VolumeMassProperties

References
Contains static initialization methods and allows access to the computed metrics of volume, volume centroid and volume moments in in solid meshes, in solid surfaces and in solid (closed) boundary representations.

Finalizer

~VolumeMassProperties

#
Passively reclaims unmanaged resources when the class user did not explicitly call Dispose().
~VolumeMassProperties()

Properties

Centroid

#Since v5.0
Gets the volume centroid in the world coordinate system.
public Point3d Centroid { get; }

CentroidCoordinatesMomentsOfInertia

#Since v5.0
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.
public Vector3d CentroidCoordinatesMomentsOfInertia { get; }
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.

CentroidCoordinatesMomentsOfInertiaError

#Since v5.0
Uncertainty in centroid coordinates moments of inertia calculation.
public Vector3d CentroidCoordinatesMomentsOfInertiaError { get; }

CentroidCoordinatesProductMoments

#Since v6.26
Product moments with respect to centroid coordinate system.
public Vector3d CentroidCoordinatesProductMoments { get; }

CentroidCoordinatesProductMomentsError

#Since v6.26
Uncertainty in product moments with respect to centroid coordinate system.
public Vector3d CentroidCoordinatesProductMomentsError { get; }

CentroidCoordinatesRadiiOfGyration

#Since v5.0
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.
public Vector3d CentroidCoordinatesRadiiOfGyration { get; }
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.

CentroidCoordinatesSecondMoments

#Since v5.0
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.
public Vector3d CentroidCoordinatesSecondMoments { get; }

CentroidCoordinatesSecondMomentsError

#Since v5.0
Uncertainty in centroid coordinates second moments calculation.
public Vector3d CentroidCoordinatesSecondMomentsError { get; }

CentroidError

#Since v5.0
Gets the uncertainty in the Centroid calculation.
public Vector3d CentroidError { get; }

Volume

#ExampleSince v5.0
Gets the volume solution.
public double Volume { get; }

VolumeError

#ExampleSince v5.0
Gets the uncertainty in the volume calculation.
public double VolumeError { get; }

WorldCoordinatesFirstMoments

#Since v5.0
Returns the world coordinate first moments if they were able to be calculated. X is integral of "x dm" over the volume Y is integral of "y dm" over the volume Z is integral of "z dm" over the volume.
public Vector3d WorldCoordinatesFirstMoments { get; }

WorldCoordinatesFirstMomentsError

#Since v5.0
Uncertainty in world coordinates first moments calculation.
public Vector3d WorldCoordinatesFirstMomentsError { get; }

WorldCoordinatesMomentsOfInertia

#Since v5.0
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.
public Vector3d WorldCoordinatesMomentsOfInertia { get; }
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.

WorldCoordinatesMomentsOfInertiaError

#Since v5.0
Uncertainty in world coordinates moments of inertia calculation.
public Vector3d WorldCoordinatesMomentsOfInertiaError { get; }

WorldCoordinatesProductMoments

#Since v5.0
Returns the world coordinate product moments if they were able to be calculated. X is integral of "xy dm" over the volume Y is integral of "yz dm" over the volume Z is integral of "zx dm" over the volume.
public Vector3d WorldCoordinatesProductMoments { get; }

WorldCoordinatesProductMomentsError

#Since v5.0
Uncertainty in world coordinates second moments calculation.
public Vector3d WorldCoordinatesProductMomentsError { get; }

WorldCoordinatesRadiiOfGyration

#Since v5.0
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)
public Vector3d WorldCoordinatesRadiiOfGyration { get; }
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.

WorldCoordinatesSecondMoments

#Since v5.0
Returns the world coordinate second moments if they were able to be calculated. X is integral of "xx dm" over the volume Y is integral of "yy dm" over the volume Z is integral of "zz dm" over the volume.
public Vector3d WorldCoordinatesSecondMoments { get; }

WorldCoordinatesSecondMomentsError

#Since v5.0
Uncertainty in world coordinates second moments calculation.
public Vector3d WorldCoordinatesSecondMomentsError { get; }

Methods

CentroidCoordinatesPrincipalMoments

#Since v6.9
Calculates the eigenvalues and eigenvectors of the moments matrix with respect to centroid coordinates.
public bool CentroidCoordinatesPrincipalMoments(
out double
x,
Principal moment.
xaxis,
Principal axis for x.
out double
y,
Principal moment.
yaxis,
Principal axis for y.
out double
z,
Principal moment.
zaxis
Principal axis for z.
)
true if successful.

CentroidCoordinatesPrincipalMomentsOfInertia

#Since v7.3
Calculates the principal moments of inertia and principal axes with respect to centroid coordinates.
public bool CentroidCoordinatesPrincipalMomentsOfInertia(
out double
x,
Principal moment.
xaxis,
Principal axis for x.
out double
y,
Principal moment.
yaxis,
Principal axis for y.
out double
z,
Principal moment.
zaxis
Principal axis for z.
)
true if successful.

Compute

#Since v7.10
Compute the VolumeMassProperties for a single Brep.
public static VolumeMassProperties Compute(
brep,
Brep to measure.
volume,
true to calculate volume.
firstMoments,
true to calculate volume first moments, volume, and volume centroid.
secondMoments,
true to calculate volume second moments.
productMoments,
true to calculate volume product moments.
relativeTolerance,
The relative tolerance used for the calculation. In overloads of this function where tolerances are not specified, 1.0e-6 is used.
absoluteTolerance
The absolute tolerancwe used for the calculation. In overloads of this function where tolerances are not specified, 1.0e-6 is used.
)
The VolumeMassProperties for the given Brep or null on failure.
ArgumentNullExceptionWhen brep is null.

Compute

#Since v6.3
Compute the VolumeMassProperties for a single Brep.
public static VolumeMassProperties Compute(
brep,
Brep to measure.
volume,
true to calculate volume.
firstMoments,
true to calculate volume first moments, volume, and volume centroid.
secondMoments,
true to calculate volume second moments.
productMoments
true to calculate volume product moments.
)
The VolumeMassProperties for the given Brep or null on failure.
ArgumentNullExceptionWhen brep is null.

Compute

#Since v5.0
Compute the VolumeMassProperties for a single Brep.
public static VolumeMassProperties Compute(
brep
Brep to measure.
)
The VolumeMassProperties for the given Brep or null on failure.
ArgumentNullExceptionWhen brep is null.

Compute

#Since v6.3
Computes the VolumeMassProperties for a collection of geometric objects. At present only Breps, Surfaces, Meshes and Planar Closed Curves are supported.
public static VolumeMassProperties Compute(
geometry,
Objects to include in the volume computation.
volume,
true to calculate volume.
firstMoments,
true to calculate volume first moments, volume, and volume centroid.
secondMoments,
true to calculate volume second moments.
productMoments
true to calculate volume product moments.
)
The VolumeMassProperties for the entire collection or null on failure.

Compute

#Since v6.3
Computes the VolumeMassProperties for a collection of geometric objects. At present only Breps, Surfaces, and Meshes are supported.
public static VolumeMassProperties Compute(
geometry
Objects to include in the volume computation.
)
The VolumeMassProperties for the entire collection or null on failure.

Compute

#Since v6.3
Compute the VolumeMassProperties for a single Mesh.
public static VolumeMassProperties Compute(
Mesh
mesh,
Mesh to measure.
volume,
true to calculate volume.
firstMoments,
true to calculate volume first moments, volume, and volume centroid.
secondMoments,
true to calculate volume second moments.
productMoments
true to calculate volume product moments.
)
The VolumeMassProperties for the given Mesh or null on failure.
ArgumentNullExceptionWhen Mesh is null.

Compute

#Since v5.0
Compute the VolumeMassProperties for a single Mesh.
public static VolumeMassProperties Compute(
Mesh
mesh
Mesh to measure.
)
The VolumeMassProperties for the given Mesh or null on failure.
ArgumentNullExceptionWhen mesh is null.

Compute

#Since v6.3
Compute the VolumeMassProperties for a single Surface.
public static VolumeMassProperties Compute(
surface,
Surface to measure.
volume,
true to calculate volume.
firstMoments,
true to calculate volume first moments, volume, and volume centroid.
secondMoments,
true to calculate volume second moments.
productMoments
true to calculate volume product moments.
)
The VolumeMassProperties for the given Surface or null on failure.
ArgumentNullExceptionWhen surface is null.

Compute

#Since v5.0
Compute the VolumeMassProperties for a single Surface.
public static VolumeMassProperties Compute(
surface
Surface to measure.
)
The VolumeMassProperties for the given Surface or null on failure.
ArgumentNullExceptionWhen surface is null.

Dispose

#Since v5.0
Actively reclaims unmanaged resources that this instance uses.
public void Dispose()

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.

protected virtual void Dispose(
disposing
true if the call comes from the Dispose() method; false if it comes from the Garbage Collector finalizer.
)

Sum

#Since v9.0
Sum mass properties together to get an aggregate mass.
public bool Sum(
summands,
An array of mass properties to add.
bAddTo
If true, then the summands are added to the existing mass.
)
True if successful.

Sum

#
Sum mass properties together to get an aggregate mass.
public bool Sum(
summand
mass properties to add.
)
true if successful.

Transform

#Since v8.12
On input, this contains the mass properties for some geometry G. On exit, this contains the mass properties for the transformed geometry xform(G).
public bool Transform(
Transform
xform
The transformation. When computing volumne mass properties, transform must be an affine transformation, or Transform.IsAffine. When computing area mass properties, transform must be a similarity transformation, or Transform.IsSimilarity(double). Perspective transformations are not allowed.
)
Remarks: The Area of a transformed object can not be calculated from the area of the original object if the transform is not a similarity, like a non-uniform scaling.
True if successful, false otherwise.

WeightedSum

#Since v9.0
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.
public static VolumeMassProperties WeightedSum(
summands,
An array of mass properties to add.
weights
An array of non-negative densities, of the same length as summands.
)
An VolumeMassProperties containing the result if successful, null if a failure occurs.
ArgumentNullExceptionWhen summands or weights is null.

WorldCoordinatesPrincipalMoments

#Since v6.9
Calculates the eigenvalues and eigenvectors of moments matrix in world coordinates.
public bool WorldCoordinatesPrincipalMoments(
out double
x,
Principal moment.
xaxis,
Principal axis for x.
out double
y,
Principal moment.
yaxis,
Principal axis for y.
out double
z,
Principal moment.
zaxis
Principal axis for z.
)
true if successful.

WorldCoordinatesPrincipalMomentsOfInertia

#Since v7.3
Calculates the principal moments of inertia and principal axes with respect to world coordinates.
public bool WorldCoordinatesPrincipalMomentsOfInertia(
out double
x,
Principal moment.
xaxis,
Principal axis for x.
out double
y,
Principal moment.
yaxis,
Principal axis for y.
out double
z,
Principal moment.
zaxis
Principal axis for z.
)
true if successful.