Method Extend
- Namespace
- GeometryHelper.Core
- Assembly
- GeometryHelper.dll
Extend(GeoLine2, double, LineEnd)
Lengthens one end of a segment by a distance, using the default tolerance. A negative distance shortens it.
public static GeoLine2 Extend(GeoLine2 line, double distance, LineEnd end)
Parameters
lineGeoLine2The segment.
distancedoubleHow far the end moves outward; negative moves it back.
endLineEndThe end that moves.
Returns
- GeoLine2
The segment with the end moved along its own direction.
Exceptions
- InvalidOperationException
Thrown when the segment is too short to have a direction.
- ArgumentOutOfRangeException
Thrown when the distance is not a finite number, the end is not a defined value, or the segment would be shortened to nothing or past its other end.
Extend(GeoLine2, double, LineEnd, Tolerance)
Lengthens one end of a segment by a distance, within tolerance. A negative distance shortens it.
public static GeoLine2 Extend(GeoLine2 line, double distance, LineEnd end, Tolerance tolerance)
Parameters
lineGeoLine2The segment.
distancedoubleHow far the end moves outward; negative moves it back.
endLineEndThe end that moves.
toleranceToleranceThe tolerance deciding when the segment is too short.
Returns
- GeoLine2
The segment with the end moved along its own direction.
Exceptions
- InvalidOperationException
Thrown when the segment is too short to have a direction.
- ArgumentOutOfRangeException
Thrown when the distance is not a finite number, the end is not a defined value, or the segment would be shortened to nothing or past its other end.
Extend(GeoLine2, double, double)
Lengthens both ends of a segment, each by its own distance, using the default tolerance. A negative distance shortens that end. This is the end offset Tekla Structures applies along a beam's axis.
public static GeoLine2 Extend(GeoLine2 line, double startDistance, double endDistance)
Parameters
lineGeoLine2The segment.
startDistancedoubleHow far the start point moves outward, away from the end point.
endDistancedoubleHow far the end point moves outward, away from the start point.
Returns
- GeoLine2
The segment with both ends moved along its own direction.
Exceptions
- InvalidOperationException
Thrown when the segment is too short to have a direction.
- ArgumentOutOfRangeException
Thrown when a distance is not a finite number, or the segment would be shortened to nothing or past itself.
Extend(GeoLine2, double, double, Tolerance)
Lengthens both ends of a segment, each by its own distance, within tolerance. A negative distance shortens that end.
public static GeoLine2 Extend(GeoLine2 line, double startDistance, double endDistance, Tolerance tolerance)
Parameters
lineGeoLine2The segment.
startDistancedoubleHow far the start point moves outward, away from the end point.
endDistancedoubleHow far the end point moves outward, away from the start point.
toleranceToleranceThe tolerance deciding when a segment is too short.
Returns
- GeoLine2
The segment with both ends moved along its own direction.
Exceptions
- InvalidOperationException
Thrown when the segment is too short to have a direction.
- ArgumentOutOfRangeException
Thrown when a distance is not a finite number, or the segment would be shortened to nothing or past itself.
Extend(GeoArc2, double, LineEnd)
Lengthens an arc along itself at one end.
public static GeoArc2 Extend(GeoArc2 arc, double distance, LineEnd end)
Parameters
Returns
Extend(GeoArc2, double, LineEnd, Tolerance)
Lengthens an arc along itself at one end, within a tolerance.
public static GeoArc2 Extend(GeoArc2 arc, double distance, LineEnd end, Tolerance tolerance)
Parameters
arcGeoArc2The arc.
distancedoubleHow much arc length to add; a negative distance takes it away.
endLineEndWhich end to move.
toleranceToleranceThe tolerance.
Returns
- GeoArc2
The arc with that end moved, keeping its centre and radius.
Exceptions
- ArgumentOutOfRangeException
Thrown when the distance is not a finite number, when it would leave no arc at all, or when it would carry the arc past a whole turn.
Extend(GeoArc2, double, double)
Lengthens an arc along itself at both ends at once.
public static GeoArc2 Extend(GeoArc2 arc, double startDistance, double endDistance)
Parameters
Returns
Extend(GeoArc2, double, double, Tolerance)
Lengthens an arc along itself at both ends at once, within a tolerance.
public static GeoArc2 Extend(GeoArc2 arc, double startDistance, double endDistance, Tolerance tolerance)
Parameters
arcGeoArc2The arc.
startDistancedoubleHow much arc length to add before its start.
endDistancedoubleHow much to add after its end.
toleranceToleranceThe tolerance.
Returns
- GeoArc2
The arc with both ends moved, keeping its centre and radius.
Exceptions
- ArgumentOutOfRangeException
Thrown when either distance is not a finite number, when together they would leave no arc, or when they would carry it past a whole turn.
Extend(GeoPolyline2, double, LineEnd)
Lengthens a chain along its end leg.
public static GeoPolyline2 Extend(GeoPolyline2 chain, double distance, LineEnd end)
Parameters
chainGeoPolyline2distancedoubleendLineEnd
Returns
Extend(GeoPolyline2, double, LineEnd, Tolerance)
Lengthens a chain along its end leg, within a tolerance.
public static GeoPolyline2 Extend(GeoPolyline2 chain, double distance, LineEnd end, Tolerance tolerance)
Parameters
chainGeoPolyline2The chain.
distancedoubleHow far to carry the end leg on; it has to be positive.
endLineEndWhich end to move.
toleranceToleranceThe tolerance.
Returns
- GeoPolyline2
The chain with that end carried on, every other leg untouched.
Exceptions
- ArgumentNullException
Thrown when the chain is null.
- ArgumentOutOfRangeException
Thrown when the distance is not a positive finite number.
- ArgumentException
Thrown when the end leg has no length to carry on along.
Extend(GeoPolylineArc2, double, LineEnd)
Lengthens a curved chain along its end leg, round if that leg curves.
public static GeoPolylineArc2 Extend(GeoPolylineArc2 chain, double distance, LineEnd end)
Parameters
chainGeoPolylineArc2distancedoubleendLineEnd
Returns
Extend(GeoPolylineArc2, double, LineEnd, Tolerance)
Lengthens a curved chain along its end leg, round if that leg curves, within a tolerance.
public static GeoPolylineArc2 Extend(GeoPolylineArc2 chain, double distance, LineEnd end, Tolerance tolerance)
Parameters
chainGeoPolylineArc2The chain.
distancedoubleHow far to carry the end leg on, measured along it; it has to be positive.
endLineEndWhich end to move.
toleranceToleranceThe tolerance.
Returns
- GeoPolylineArc2
The chain with that end carried on; a curved end leg keeps its radius and gains sweep.
Exceptions
- ArgumentNullException
Thrown when the chain is null.
- ArgumentOutOfRangeException
Thrown when the distance is not a positive finite number.