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
Returns
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
faceGeoFace2The face: its outline, less its holes.
lineGeoLine2The segment.
toleranceToleranceThe 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
Returns
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
faceGeoFace2The face: its outline, less its holes.
arcGeoArc2The arc.
toleranceToleranceThe 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
faceGeoFace2circleGeoCircle2
Returns
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
faceGeoFace2The face: its outline, less its holes.
circleGeoCircle2The circle, a region.
toleranceToleranceThe 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
faceGeoFace2rectGeoRectangle2
Returns
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
faceGeoFace2The face: its outline, less its holes.
rectGeoRectangle2The rectangle, a region.
toleranceToleranceThe 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
faceGeoFace2polylineGeoPolyline2
Returns
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
faceGeoFace2The face: its outline, less its holes.
polylineGeoPolyline2The polyline, a curve.
toleranceToleranceThe 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
faceGeoFace2polygonGeoPolygon2
Returns
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
faceGeoFace2The face: its outline, less its holes.
polygonGeoPolygon2The polygon, a region.
toleranceToleranceThe 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
faceGeoFace2loopGeoPolygonArc2
Returns
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
faceGeoFace2The face: its outline, less its holes.
loopGeoPolygonArc2The loop, a region.
toleranceToleranceThe 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
faceGeoFace2chainGeoPolylineArc2
Returns
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
faceGeoFace2The face: its outline, less its holes.
chainGeoPolylineArc2The chain, a curve.
toleranceToleranceThe 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
Returns
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
faceGeoFace2The face: its outline, less its holes.
edgeGeoEdge2The edge.
toleranceToleranceThe 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
faceGeoFace2triangleGeoTriangle2
Returns
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
faceGeoFace2The face: its outline, less its holes.
triangleGeoTriangle2The triangle, a region; one with corners on each other is read as its longest edge.
toleranceToleranceThe 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
Returns
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
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
Returns
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
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.