Table of Contents

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

line GeoLine2

The segment.

distance double

How far the end moves outward; negative moves it back.

end LineEnd

The 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

line GeoLine2

The segment.

distance double

How far the end moves outward; negative moves it back.

end LineEnd

The end that moves.

tolerance Tolerance

The 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

line GeoLine2

The segment.

startDistance double

How far the start point moves outward, away from the end point.

endDistance double

How 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

line GeoLine2

The segment.

startDistance double

How far the start point moves outward, away from the end point.

endDistance double

How far the end point moves outward, away from the start point.

tolerance Tolerance

The 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

arc GeoArc2
distance double
end LineEnd

Returns

GeoArc2

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

arc GeoArc2

The arc.

distance double

How much arc length to add; a negative distance takes it away.

end LineEnd

Which end to move.

tolerance Tolerance

The 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

arc GeoArc2
startDistance double
endDistance double

Returns

GeoArc2

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

arc GeoArc2

The arc.

startDistance double

How much arc length to add before its start.

endDistance double

How much to add after its end.

tolerance Tolerance

The 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

chain GeoPolyline2
distance double
end LineEnd

Returns

GeoPolyline2

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

chain GeoPolyline2

The chain.

distance double

How far to carry the end leg on; it has to be positive.

end LineEnd

Which end to move.

tolerance Tolerance

The 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

chain GeoPolylineArc2
distance double
end LineEnd

Returns

GeoPolylineArc2

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

chain GeoPolylineArc2

The chain.

distance double

How far to carry the end leg on, measured along it; it has to be positive.

end LineEnd

Which end to move.

tolerance Tolerance

The 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.