Table of Contents

Method TryTrimExtendToCorner

Namespace
GeometryHelper.Core
Assembly
GeometryHelper.dll

TryTrimExtendToCorner(GeoLine2, GeoLine2, out GeoLine2, out GeoLine2)

Trims or extends two segments so that they meet in a corner, using the default tolerance. This is FILLET with a radius of zero.

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

Parameters

line1 GeoLine2

The first segment.

line2 GeoLine2

The second segment.

result1 GeoLine2

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

result2 GeoLine2

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

Returns

bool

true if the two lines cross; false if they are parallel or one is too short to have a direction.

TryTrimExtendToCorner(GeoLine2, GeoLine2, out GeoLine2, out GeoLine2, Tolerance)

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

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

Parameters

line1 GeoLine2

The first segment.

line2 GeoLine2

The second segment.

result1 GeoLine2

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

result2 GeoLine2

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 cross; false if they are parallel or one is too short to have a direction.

Remarks

The corner is where the lines carrying the two segments cross. Each segment keeps its end farther from the corner and has its nearer end moved onto it: extended if the corner lies beyond, trimmed if the segments cross each other, so that the longer part of each is what remains. AutoCAD asks the user to pick the part to keep; keeping the longer one is what that pick would be in the usual case. When the corner lies exactly half way along a segment its end point moves.