Table of Contents

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

solid GeoSolid3
method VolumeMethod

Returns

GeoPoint3

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

solid GeoSolid3

The body.

method VolumeMethod

How the faces are read.

tolerance Tolerance

The 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.