Method Centroid
- Namespace
- GeometryHelper.Core
- Assembly
- GeometryHelper.dll
Centroid(GeoSolid3, VolumeMethod)
Gets the centre of a body's material by a method, using the default tolerance.
public static GeoPoint3 Centroid(GeoSolid3 solid, VolumeMethod method)
Parameters
solidGeoSolid3methodVolumeMethod
Returns
Centroid(GeoSolid3, VolumeMethod, Tolerance)
Gets the centre of a body's material by a method, which is its centre of mass.
public static GeoPoint3 Centroid(GeoSolid3 solid, VolumeMethod method, Tolerance tolerance)
Parameters
solidGeoSolid3The body.
methodVolumeMethodHow the faces are read.
toleranceToleranceThe tolerance the openings are cut in and the faces broken into triangles within.
Returns
- GeoPoint3
The centroid; the middle of the body's box where it holds no volume.
Exceptions
- ArgumentNullException
Thrown when the body is null.
- ArgumentOutOfRangeException
Thrown when the method is not one of VolumeMethod.