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
lineGeoLine3The segment.
lengthdoubleThe length the segment should have.
endLineEndThe 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
lineGeoLine3The segment.
lengthdoubleThe length the segment should have.
endLineEndThe end that moves.
toleranceToleranceThe 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
Returns
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
arcGeoArc3The arc.
lengthdoubleThe arc length it should end up with, measured along the curve.
endLineEndWhich end to move; the other stays where it is.
toleranceToleranceThe 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
chainGeoPolyline3lengthdoubleendLineEnd
Returns
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
chainGeoPolyline3The chain.
lengthdoubleThe length the whole chain should end up with, measured along it.
endLineEndWhich end to move.
toleranceToleranceThe 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
chainGeoPolylineArc3lengthdoubleendLineEnd
Returns
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
chainGeoPolylineArc3The chain.
lengthdoubleThe length the whole chain should end up with, measured along its arcs.
endLineEndWhich end to move.
toleranceToleranceThe 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.