Table of Contents

Method SignedDistanceTo

Namespace
GeometryHelper.Core
Assembly
GeometryHelper.dll

SignedDistanceTo(GeoCircle2, GeoPoint2)

Calculates the distance from a circle to a point, negative for a point inside it.

public static double SignedDistanceTo(GeoCircle2 circle, GeoPoint2 point)

Parameters

circle GeoCircle2
point GeoPoint2

Returns

double

SignedDistanceTo(GeoCircle2, GeoPoint2, Tolerance)

Calculates the distance from a circle to a point, negative for a point inside it, within a tolerance.

public static double SignedDistanceTo(GeoCircle2 circle, GeoPoint2 point, Tolerance tolerance)

Parameters

circle GeoCircle2

The circle.

point GeoPoint2

The point.

tolerance Tolerance

The tolerance.

Returns

double

The distance out to the circumference, negative when the point lies within it.

SignedDistanceTo(GeoRectangle2, GeoPoint2)

Calculates the distance from a rectangle to a point, negative for a point inside it.

public static double SignedDistanceTo(GeoRectangle2 rect, GeoPoint2 point)

Parameters

rect GeoRectangle2
point GeoPoint2

Returns

double

SignedDistanceTo(GeoRectangle2, GeoPoint2, Tolerance)

Calculates the distance from a rectangle to a point, negative for a point inside it, within a tolerance.

public static double SignedDistanceTo(GeoRectangle2 rect, GeoPoint2 point, Tolerance tolerance)

Parameters

rect GeoRectangle2
point GeoPoint2
tolerance Tolerance

Returns

double

The distance out to the nearest side, negative when the point lies within the rectangle.

SignedDistanceTo(GeoPolygon2, GeoPoint2)

Calculates the distance from a polygon to a point, negative for a point inside it.

public static double SignedDistanceTo(GeoPolygon2 poly, GeoPoint2 point)

Parameters

poly GeoPolygon2
point GeoPoint2

Returns

double

SignedDistanceTo(GeoPolygon2, GeoPoint2, Tolerance)

Calculates the distance from a polygon to a point, negative for a point inside it, within a tolerance.

public static double SignedDistanceTo(GeoPolygon2 poly, GeoPoint2 point, Tolerance tolerance)

Parameters

poly GeoPolygon2
point GeoPoint2
tolerance Tolerance

Returns

double

The distance out to the nearest edge, negative when the point lies within the polygon.

Remarks

A polygon that is not simple is read under the even-odd rule, the same as everywhere else, so a lobe doubled back over the rest of the shape counts as outside and takes a positive sign.

SignedDistanceTo(GeoPolygonArc2, GeoPoint2)

Calculates the distance from a loop that may curve to a point, negative for a point inside it.

public static double SignedDistanceTo(GeoPolygonArc2 loop, GeoPoint2 point)

Parameters

loop GeoPolygonArc2
point GeoPoint2

Returns

double

SignedDistanceTo(GeoPolygonArc2, GeoPoint2, Tolerance)

Calculates the distance from a loop that may curve to a point, negative for a point inside it, within a tolerance.

public static double SignedDistanceTo(GeoPolygonArc2 loop, GeoPoint2 point, Tolerance tolerance)

Parameters

loop GeoPolygonArc2
point GeoPoint2
tolerance Tolerance

Returns

double

The distance out to the nearest edge, measured on the arcs, negative when the point lies within the loop.

SignedDistanceTo(GeoFace2, GeoPoint2)

Calculates the distance from a face to a point, negative for a point on the material.

public static double SignedDistanceTo(GeoFace2 face, GeoPoint2 point)

Parameters

face GeoFace2
point GeoPoint2

Returns

double

SignedDistanceTo(GeoFace2, GeoPoint2, Tolerance)

Calculates the distance from a face to a point, negative for a point on the material, within a tolerance.

public static double SignedDistanceTo(GeoFace2 face, GeoPoint2 point, Tolerance tolerance)

Parameters

face GeoFace2
point GeoPoint2
tolerance Tolerance

Returns

double

The distance out to the nearest edge, negative when the point lies on the material.

Remarks

The boundary of a face is its outline and the rim of every hole in it, so a point sitting in a hole is outside the face and is measured to the rim it sits in rather than out to the outline.