Table of Contents

Method TryTrimExtendToCorner

Namespace
GeometryHelper.Core
Assembly
GeometryHelper.dll

TryTrimExtendToCorner(GeoLine3, GeoLine3, out GeoLine3, out GeoLine3)

Trims or extends two segments so that they meet in a corner, using the default tolerance.

public static bool TryTrimExtendToCorner(GeoLine3 line1, GeoLine3 line2, out GeoLine3 result1, out GeoLine3 result2)

Parameters

line1 GeoLine3

The first segment.

line2 GeoLine3

The second segment.

result1 GeoLine3

The first segment ending at the corner, or unchanged when the method returns false.

result2 GeoLine3

The second segment ending at the corner, or unchanged when the method returns false.

Returns

bool

true if the two lines meet; false if they are parallel, pass each other, or one is too short.

TryTrimExtendToCorner(GeoLine3, GeoLine3, out GeoLine3, out GeoLine3, Tolerance)

Trims or extends two segments so that they meet in a corner, within a tolerance.

public static bool TryTrimExtendToCorner(GeoLine3 line1, GeoLine3 line2, out GeoLine3 result1, out GeoLine3 result2, Tolerance tolerance)

Parameters

line1 GeoLine3

The first segment.

line2 GeoLine3

The second segment.

result1 GeoLine3

The first segment ending at the corner, or unchanged when the method returns false.

result2 GeoLine3

The second segment ending at the corner, or unchanged when the method returns false.

tolerance Tolerance

The tolerance.

Returns

bool

true if the two lines meet; false if they are parallel, pass each other, or one is too short.

Remarks

The lines carrying the segments must meet: at their closest approach they may be at most the point tolerance apart, and the corner is placed half way across that gap so that both results end on the same point. Each segment keeps its end farther from the corner, as in Lengthen2.