Table of Contents

Method ExtendToLength

Namespace
GeometryHelper.Core
Assembly
GeometryHelper.dll

ExtendToLength(GeoLine3, double, LineEnd)

Moves one end of a segment so that the segment measures a given length, using the default tolerance. The other end stays, so a length shorter than the segment trims it.

public static GeoLine3 ExtendToLength(GeoLine3 line, double length, LineEnd end)

Parameters

line GeoLine3

The segment.

length double

The length the segment should have.

end LineEnd

The end that moves.

Returns

GeoLine3

The segment of the requested length, running the same way from the end that stayed.

Exceptions

InvalidOperationException

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

ArgumentOutOfRangeException

Thrown when the length is not a finite number greater than the tolerance, or the end is not a defined value.

ExtendToLength(GeoLine3, double, LineEnd, Tolerance)

Moves one end of a segment so that the segment measures a given length, within a tolerance. The other end stays, so a length shorter than the segment trims it.

public static GeoLine3 ExtendToLength(GeoLine3 line, double length, LineEnd end, Tolerance tolerance)

Parameters

line GeoLine3

The segment.

length double

The length the segment should have.

end LineEnd

The end that moves.

tolerance Tolerance

The tolerance deciding when a segment is too short.

Returns

GeoLine3

The segment of the requested length, running the same way from the end that stayed.

Exceptions

InvalidOperationException

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

ArgumentOutOfRangeException

Thrown when the length is not a finite number greater than the tolerance, or the end is not a defined value.

ExtendToLength(GeoArc3, double, LineEnd)

Lengthens or shortens an arc at one end until it is a given arc length.

public static GeoArc3 ExtendToLength(GeoArc3 arc, double length, LineEnd end)

Parameters

arc GeoArc3
length double
end LineEnd

Returns

GeoArc3

ExtendToLength(GeoArc3, double, LineEnd, Tolerance)

Lengthens or shortens an arc at one end until it is a given arc length, within a tolerance.

public static GeoArc3 ExtendToLength(GeoArc3 arc, double length, LineEnd end, Tolerance tolerance)

Parameters

arc GeoArc3

The arc.

length double

The arc length it should end up with, measured along the curve.

end LineEnd

Which end to move; the other stays where it is.

tolerance Tolerance

The tolerance.

Returns

GeoArc3

The arc of that length, keeping its centre and radius.

Exceptions

ArgumentOutOfRangeException

Thrown when the length is not a positive finite number, or is longer than the whole circle.

ExtendToLength(GeoPolyline3, double, LineEnd)

Lengthens a chain along its end leg until the whole chain is a given length.

public static GeoPolyline3 ExtendToLength(GeoPolyline3 chain, double length, LineEnd end)

Parameters

chain GeoPolyline3
length double
end LineEnd

Returns

GeoPolyline3

ExtendToLength(GeoPolyline3, double, LineEnd, Tolerance)

Lengthens a chain along its end leg until the whole chain is a given length, within a tolerance.

public static GeoPolyline3 ExtendToLength(GeoPolyline3 chain, double length, LineEnd end, Tolerance tolerance)

Parameters

chain GeoPolyline3

The chain.

length double

The length the whole chain should end up with, measured along it.

end LineEnd

Which end to move.

tolerance Tolerance

The tolerance.

Returns

GeoPolyline3

The chain of that length.

Exceptions

ArgumentNullException

Thrown when the chain is null.

ArgumentOutOfRangeException

Thrown when the length is not longer than the chain already is.

ExtendToLength(GeoPolylineArc3, double, LineEnd)

Lengthens a curved chain along its end leg until the whole chain is a given length.

public static GeoPolylineArc3 ExtendToLength(GeoPolylineArc3 chain, double length, LineEnd end)

Parameters

chain GeoPolylineArc3
length double
end LineEnd

Returns

GeoPolylineArc3

ExtendToLength(GeoPolylineArc3, double, LineEnd, Tolerance)

Lengthens a curved chain along its end leg until the whole chain is a given length, within a tolerance.

public static GeoPolylineArc3 ExtendToLength(GeoPolylineArc3 chain, double length, LineEnd end, Tolerance tolerance)

Parameters

chain GeoPolylineArc3

The chain.

length double

The length the whole chain should end up with, measured along its arcs.

end LineEnd

Which end to move.

tolerance Tolerance

The tolerance.

Returns

GeoPolylineArc3

The chain of that length.

Exceptions

ArgumentNullException

Thrown when the chain is null.

ArgumentOutOfRangeException

Thrown when the length is not longer than the chain already is.