Table of Contents

Method DistanceTo

Namespace
GeometryHelper.Core
Assembly
GeometryHelper.dll

DistanceTo(GeoFace2, GeoLine2)

Gets the distance from the material of a face to a segment.

public static double DistanceTo(GeoFace2 face, GeoLine2 line)

Parameters

face GeoFace2
line GeoLine2

Returns

double

Exceptions

ArgumentNullException

Thrown when the face is null.

DistanceTo(GeoFace2, GeoLine2, Tolerance)

Gets the distance from the material of a face to a segment, within a tolerance.

public static double DistanceTo(GeoFace2 face, GeoLine2 line, Tolerance tolerance)

Parameters

face GeoFace2

The face: its outline, less its holes.

line GeoLine2

The segment.

tolerance Tolerance

The tolerance.

Returns

double

Nought where the segment crosses a rim or lies on the material; otherwise the gap from its nearest rim, measured exactly. In the square 100 by 100 with a corner at the origin and a hole 40 by 40 in its middle, the segment from (40, 50) to (60, 50) lies in the hole and is 10 from its rim; the one from (10, 50) to (20, 50) lies on the material and is nought away. A segment no longer than the point tolerance is read as its start where it does not truly meet the material.

Exceptions

ArgumentNullException

Thrown when the face is null.

DistanceTo(GeoFace2, GeoArc2)

Gets the distance from the material of a face to an arc.

public static double DistanceTo(GeoFace2 face, GeoArc2 arc)

Parameters

face GeoFace2
arc GeoArc2

Returns

double

Exceptions

ArgumentNullException

Thrown when the face is null.

DistanceTo(GeoFace2, GeoArc2, Tolerance)

Gets the distance from the material of a face to an arc, within a tolerance.

public static double DistanceTo(GeoFace2 face, GeoArc2 arc, Tolerance tolerance)

Parameters

face GeoFace2

The face: its outline, less its holes.

arc GeoArc2

The arc.

tolerance Tolerance

The tolerance.

Returns

double

Nought where the arc crosses a rim or lies on the material; otherwise the gap from its nearest rim, measured exactly. In the square 100 by 100 with a corner at the origin and a hole 40 by 40 in its middle, the upper half of the circle of radius 10 about (50, 50) lies in the hole and is 10 from its rim.

Exceptions

ArgumentNullException

Thrown when the face is null.

DistanceTo(GeoFace2, GeoCircle2)

Gets the distance from the material of a face to a circle.

public static double DistanceTo(GeoFace2 face, GeoCircle2 circle)

Parameters

face GeoFace2
circle GeoCircle2

Returns

double

Exceptions

ArgumentNullException

Thrown when the face is null.

DistanceTo(GeoFace2, GeoCircle2, Tolerance)

Gets the distance from the material of a face to a circle, within a tolerance.

public static double DistanceTo(GeoFace2 face, GeoCircle2 circle, Tolerance tolerance)

Parameters

face GeoFace2

The face: its outline, less its holes.

circle GeoCircle2

The circle, a region.

tolerance Tolerance

The tolerance.

Returns

double

Nought where the circle crosses a rim or reaches the material, a circle holding the whole face among them; otherwise the gap from its nearest rim, measured exactly. In the square 100 by 100 with a corner at the origin and a hole 40 by 40 in its middle, the circle of radius 10 about (50, 50) lies in the hole and is 10 from its rim; about (150, 50) it is 40 from the outline; about (15, 50), and of radius 200 about (50, 50), it is nought away.

Exceptions

ArgumentNullException

Thrown when the face is null.

DistanceTo(GeoFace2, GeoRectangle2)

Gets the distance from the material of a face to a rectangle.

public static double DistanceTo(GeoFace2 face, GeoRectangle2 rect)

Parameters

face GeoFace2
rect GeoRectangle2

Returns

double

Exceptions

ArgumentNullException

Thrown when the face is null.

DistanceTo(GeoFace2, GeoRectangle2, Tolerance)

Gets the distance from the material of a face to a rectangle, within a tolerance.

public static double DistanceTo(GeoFace2 face, GeoRectangle2 rect, Tolerance tolerance)

Parameters

face GeoFace2

The face: its outline, less its holes.

rect GeoRectangle2

The rectangle, a region.

tolerance Tolerance

The tolerance.

Returns

double

Nought where the rectangle crosses a rim or overlaps the material; otherwise the gap from its nearest rim, measured exactly. In the square 100 by 100 with a corner at the origin and a hole 40 by 40 in its middle, the rectangle 20 by 20 about (50, 50) lies in the hole and is 10 from its rim.

Exceptions

ArgumentNullException

Thrown when the face is null.

DistanceTo(GeoFace2, GeoPolyline2)

Gets the distance from the material of a face to a polyline.

public static double DistanceTo(GeoFace2 face, GeoPolyline2 polyline)

Parameters

face GeoFace2
polyline GeoPolyline2

Returns

double

Exceptions

ArgumentNullException

Thrown when the face or the polyline is null.

DistanceTo(GeoFace2, GeoPolyline2, Tolerance)

Gets the distance from the material of a face to a polyline, within a tolerance.

public static double DistanceTo(GeoFace2 face, GeoPolyline2 polyline, Tolerance tolerance)

Parameters

face GeoFace2

The face: its outline, less its holes.

polyline GeoPolyline2

The polyline, a curve.

tolerance Tolerance

The tolerance.

Returns

double

Nought where the chain crosses a rim or lies on the material; otherwise the gap from its nearest rim, measured exactly. In the square 100 by 100 with a corner at the origin and a hole 40 by 40 in its middle, the chain (40, 40), (60, 40), (60, 60) lies in the hole and is 10 from its rim.

Exceptions

ArgumentNullException

Thrown when the face or the polyline is null.

DistanceTo(GeoFace2, GeoPolygon2)

Gets the distance from the material of a face to a polygon.

public static double DistanceTo(GeoFace2 face, GeoPolygon2 polygon)

Parameters

face GeoFace2
polygon GeoPolygon2

Returns

double

Exceptions

ArgumentNullException

Thrown when the face or the polygon is null.

DistanceTo(GeoFace2, GeoPolygon2, Tolerance)

Gets the distance from the material of a face to a polygon, within a tolerance.

public static double DistanceTo(GeoFace2 face, GeoPolygon2 polygon, Tolerance tolerance)

Parameters

face GeoFace2

The face: its outline, less its holes.

polygon GeoPolygon2

The polygon, a region.

tolerance Tolerance

The tolerance.

Returns

double

Nought where the polygon crosses a rim or overlaps the material, a polygon holding the whole face among them; otherwise the gap from its nearest rim, measured exactly. In the square 100 by 100 with a corner at the origin and a hole 40 by 40 in its middle, the square 20 by 20 about (50, 50) lies in the hole and is 10 from its rim; about (130, 50) it is 20 from the outline.

Exceptions

ArgumentNullException

Thrown when the face or the polygon is null.

DistanceTo(GeoFace2, GeoPolygonArc2)

Gets the distance from the material of a face to a curved loop.

public static double DistanceTo(GeoFace2 face, GeoPolygonArc2 loop)

Parameters

face GeoFace2
loop GeoPolygonArc2

Returns

double

Exceptions

ArgumentNullException

Thrown when the face or the loop is null.

DistanceTo(GeoFace2, GeoPolygonArc2, Tolerance)

Gets the distance from the material of a face to a curved loop, within a tolerance.

public static double DistanceTo(GeoFace2 face, GeoPolygonArc2 loop, Tolerance tolerance)

Parameters

face GeoFace2

The face: its outline, less its holes.

loop GeoPolygonArc2

The loop, a region.

tolerance Tolerance

The tolerance.

Returns

double

Nought where the loop crosses a rim or overlaps the material; otherwise the gap from its nearest rim, measured exactly, measured on the arcs. In the square 100 by 100 with a corner at the origin and a hole 40 by 40 in its middle, the loop with corners (40, 40), (60, 40), (60, 60), (40, 60) and straight edges lies in the hole and is 10 from its rim.

Exceptions

ArgumentNullException

Thrown when the face or the loop is null.

DistanceTo(GeoFace2, GeoPolylineArc2)

Gets the distance from the material of a face to a curved chain.

public static double DistanceTo(GeoFace2 face, GeoPolylineArc2 chain)

Parameters

face GeoFace2
chain GeoPolylineArc2

Returns

double

Exceptions

ArgumentNullException

Thrown when the face or the chain is null.

DistanceTo(GeoFace2, GeoPolylineArc2, Tolerance)

Gets the distance from the material of a face to a curved chain, within a tolerance.

public static double DistanceTo(GeoFace2 face, GeoPolylineArc2 chain, Tolerance tolerance)

Parameters

face GeoFace2

The face: its outline, less its holes.

chain GeoPolylineArc2

The chain, a curve.

tolerance Tolerance

The tolerance.

Returns

double

Nought where the chain crosses a rim or lies on the material; otherwise the gap from its nearest rim, measured exactly, measured on the arcs. In the square 100 by 100 with a corner at the origin and a hole 40 by 40 in its middle, the straight chain (40, 40), (60, 40), (60, 60) lies in the hole and is 10 from its rim.

Exceptions

ArgumentNullException

Thrown when the face or the chain is null.

DistanceTo(GeoFace2, GeoEdge2)

Gets the distance from the material of a face to an edge.

public static double DistanceTo(GeoFace2 face, GeoEdge2 edge)

Parameters

face GeoFace2
edge GeoEdge2

Returns

double

Exceptions

ArgumentNullException

Thrown when the face is null.

DistanceTo(GeoFace2, GeoEdge2, Tolerance)

Gets the distance from the material of a face to an edge, within a tolerance: as a segment or as an arc, whichever the edge is.

public static double DistanceTo(GeoFace2 face, GeoEdge2 edge, Tolerance tolerance)

Parameters

face GeoFace2

The face: its outline, less its holes.

edge GeoEdge2

The edge.

tolerance Tolerance

The tolerance.

Returns

double

DistanceTo(GeoFace2, GeoLine2, Tolerance) or DistanceTo(GeoFace2, GeoArc2, Tolerance) of the edge. In the square 100 by 100 with a corner at the origin and a hole 40 by 40 in its middle, the straight edge from (40, 50) to (60, 50) lies in the hole and is 10 from its rim.

Exceptions

ArgumentNullException

Thrown when the face is null.

DistanceTo(GeoFace2, GeoTriangle2)

Gets the distance from the material of a face to a triangle.

public static double DistanceTo(GeoFace2 face, GeoTriangle2 triangle)

Parameters

face GeoFace2
triangle GeoTriangle2

Returns

double

Exceptions

ArgumentNullException

Thrown when the face is null.

DistanceTo(GeoFace2, GeoTriangle2, Tolerance)

Gets the distance from the material of a face to a triangle, within a tolerance.

public static double DistanceTo(GeoFace2 face, GeoTriangle2 triangle, Tolerance tolerance)

Parameters

face GeoFace2

The face: its outline, less its holes.

triangle GeoTriangle2

The triangle, a region; one with corners on each other is read as its longest edge.

tolerance Tolerance

The tolerance.

Returns

double

Nought where the triangle crosses a rim or overlaps the material; otherwise the gap from its nearest rim, measured exactly. In the square 100 by 100 with a corner at the origin and a hole 40 by 40 in its middle, the triangle (40, 40), (60, 40), (50, 60) lies in the hole and is 10 from its rim.

Exceptions

ArgumentNullException

Thrown when the face is null.

DistanceTo(GeoFace2, GeoFace2)

Gets the distance between the materials of two faces.

public static double DistanceTo(GeoFace2 face, GeoFace2 other)

Parameters

face GeoFace2
other GeoFace2

Returns

double

Exceptions

ArgumentNullException

Thrown when either face is null.

DistanceTo(GeoFace2, GeoFace2, Tolerance)

Gets the distance between the materials of two faces, within a tolerance.

public static double DistanceTo(GeoFace2 face, GeoFace2 other, Tolerance tolerance)

Parameters

face GeoFace2

The first face.

other GeoFace2

The second face.

tolerance Tolerance

The tolerance.

Returns

double

Nought where the materials cross or overlap; otherwise the gap from its nearest rim, measured exactly. A square 20 by 20 about (50, 50) is 10 from the square 100 by 100 with a corner at the origin and a hole 40 by 40 in its middle, the width of the gap round it in the hole; about (130, 50) it is 20 away.

Exceptions

ArgumentNullException

Thrown when either face is null.

DistanceTo(GeoFace2, GeoRay2)

Gets the distance from the material of a face to a ray.

public static double DistanceTo(GeoFace2 face, GeoRay2 ray)

Parameters

face GeoFace2
ray GeoRay2

Returns

double

Exceptions

ArgumentNullException

Thrown when the face is null.

DistanceTo(GeoFace2, GeoRay2, Tolerance)

Gets the distance from the material of a face to a ray, within a tolerance.

public static double DistanceTo(GeoFace2 face, GeoRay2 ray, Tolerance tolerance)

Parameters

face GeoFace2

The face.

ray GeoRay2

The ray.

tolerance Tolerance

The tolerance.

Returns

double

Nought where the ray crosses a rim or lies on the material; otherwise the gap from its nearest rim, measured exactly. A ray starting in a hole always runs out of it into the material, so it is nought away; the ray from (-50, 150) along X passes 50 above the square 100 by 100 with a corner at the origin and a hole 40 by 40 in its middle.

Exceptions

ArgumentNullException

Thrown when the face is null.