Table of Contents

Method SignedDistanceTo

Namespace
GeometryHelper.Core
Assembly
GeometryHelper.dll

SignedDistanceTo(GeoSolid3, GeoPoint3)

Calculates the distance from a solid to a point, negative for a point inside the body.

public static double SignedDistanceTo(GeoSolid3 solid, GeoPoint3 point)

Parameters

solid GeoSolid3
point GeoPoint3

Returns

double

SignedDistanceTo(GeoSolid3, GeoPoint3, Tolerance)

Calculates the distance from a solid to a point, negative for a point inside the body, within a tolerance.

public static double SignedDistanceTo(GeoSolid3 solid, GeoPoint3 point, Tolerance tolerance)

Parameters

solid GeoSolid3

The solid.

point GeoPoint3

The point.

tolerance Tolerance

The tolerance.

Returns

double

The distance out to the surface, negative when the point lies in the material.

Remarks

The surface of a pierced body is its faces and the walls of every opening in it, openings of openings included, because that is what Locate(GeoSolid3, GeoPoint3) calls the boundary. So a point in the material beside a duct is measured to the wall of the duct rather than out to the far skin of the body.

SignedDistanceTo(GeoObb3, GeoPoint3)

Calculates the distance from an oriented box to a point, negative for a point inside it.

public static double SignedDistanceTo(GeoObb3 box, GeoPoint3 point)

Parameters

box GeoObb3
point GeoPoint3

Returns

double

SignedDistanceTo(GeoObb3, GeoPoint3, Tolerance)

Calculates the distance from an oriented box to a point, negative for a point inside it, within a tolerance.

public static double SignedDistanceTo(GeoObb3 box, GeoPoint3 point, Tolerance tolerance)

Parameters

box GeoObb3
point GeoPoint3
tolerance Tolerance

Returns

double

The distance out to the nearest face, negative when the point lies within the box.

Remarks

GetClosestPointOnBoundary(GeoPoint3) clamps a point into the box and so hands an interior point straight back; the magnitude here comes from ProjectToObbSurface(GeoObb3, GeoPoint3), which pushes it out to a face.

SignedDistanceTo(GeoAabb3, GeoPoint3)

Calculates the distance from an axis-aligned box to a point, negative for a point inside it.

public static double SignedDistanceTo(GeoAabb3 box, GeoPoint3 point)

Parameters

box GeoAabb3
point GeoPoint3

Returns

double

SignedDistanceTo(GeoAabb3, GeoPoint3, Tolerance)

Calculates the distance from an axis-aligned box to a point, negative for a point inside it, within a tolerance.

public static double SignedDistanceTo(GeoAabb3 box, GeoPoint3 point, Tolerance tolerance)

Parameters

box GeoAabb3
point GeoPoint3
tolerance Tolerance

Returns

double

The distance out to the nearest face, negative when the point lies within the box.

Exceptions

InvalidOperationException

Thrown when the box is empty, since it has no surface to measure to.