Table of Contents

Method ProjectToInfiniteLine

Namespace
GeometryHelper.Core
Assembly
GeometryHelper.dll

ProjectToInfiniteLine(GeoLine2, GeoPoint2)

Gets the foot of the perpendicular from a point to the infinite line carrying a segment, using the default tolerance.

public static GeoPoint2 ProjectToInfiniteLine(GeoLine2 line, GeoPoint2 point)

Parameters

line GeoLine2

The segment, read as the infinite line carrying it.

point GeoPoint2

The point.

Returns

GeoPoint2

The point of the line closest to the given point, which may lie beyond either end.

ProjectToInfiniteLine(GeoLine2, GeoPoint2, Tolerance)

Gets the foot of the perpendicular from a point to the infinite line carrying a segment, within a tolerance.

public static GeoPoint2 ProjectToInfiniteLine(GeoLine2 line, GeoPoint2 point, Tolerance tolerance)

Parameters

line GeoLine2

The segment, read as the infinite line carrying it.

point GeoPoint2

The point.

tolerance Tolerance

The tolerance.

Returns

GeoPoint2

The point of the line closest to the given point, which may lie beyond either end.

Remarks

ProjectToLine(GeoLine2, GeoPoint2) keeps the answer within the segment; this one does not, which is what to use when the segment stands for the line it lies on.

Exceptions

InvalidOperationException

Thrown when the segment is too short to have a direction.