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
circleGeoCircle2pointGeoPoint2
Returns
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
circleGeoCircle2The circle.
pointGeoPoint2The point.
toleranceToleranceThe 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
rectGeoRectangle2pointGeoPoint2
Returns
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
rectGeoRectangle2pointGeoPoint2toleranceTolerance
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
polyGeoPolygon2pointGeoPoint2
Returns
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
polyGeoPolygon2pointGeoPoint2toleranceTolerance
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
loopGeoPolygonArc2pointGeoPoint2
Returns
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
loopGeoPolygonArc2pointGeoPoint2toleranceTolerance
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
Returns
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
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.