Table of Contents

Method Offset

Namespace
GeometryHelper.Core
Assembly
GeometryHelper.dll

Offset(GeoLine3, double, GeoVector3)

Gets the segment parallel to a segment at a distance towards a direction, using the default tolerance. A negative distance moves it the opposite way.

public static GeoLine3 Offset(GeoLine3 line, double distance, GeoVector3 direction)

Parameters

line GeoLine3

The segment.

distance double

How far to move it.

direction GeoVector3

The side to move it to; only its part square to the segment counts.

Returns

GeoLine3

The parallel segment, of the same length and running the same way.

Exceptions

InvalidOperationException

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

ArgumentException

Thrown when the direction has no length or runs along the segment.

ArgumentOutOfRangeException

Thrown when the distance is not a finite number.

Offset(GeoLine3, double, GeoVector3, Tolerance)

Gets the segment parallel to a segment at a distance towards a direction, within a tolerance. A negative distance moves it the opposite way.

public static GeoLine3 Offset(GeoLine3 line, double distance, GeoVector3 direction, Tolerance tolerance)

Parameters

line GeoLine3

The segment.

distance double

How far to move it.

direction GeoVector3

The side to move it to; only its part square to the segment counts.

tolerance Tolerance

The tolerance.

Returns

GeoLine3

The parallel segment, of the same length and running the same way, exactly distance away from the original.

Exceptions

InvalidOperationException

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

ArgumentException

Thrown when the direction has no length or runs along the segment.

ArgumentOutOfRangeException

Thrown when the distance is not a finite number.

Offset(GeoLine3, double, double, GeoVector3)

Gets the segment parallel to a segment, moved sideways and upward in the frame an up direction fixes for it, using the default tolerance.

public static GeoLine3 Offset(GeoLine3 line, double lateral, double vertical, GeoVector3 up)

Parameters

line GeoLine3

The segment.

lateral double

How far to move it to its left, seen from above; negative moves it to the right.

vertical double

How far to move it up; negative moves it down.

up GeoVector3

Which way is up; only its part square to the segment counts.

Returns

GeoLine3

The parallel segment, of the same length and running the same way.

Exceptions

InvalidOperationException

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

ArgumentException

Thrown when the up direction has no length or runs along the segment.

ArgumentOutOfRangeException

Thrown when a distance is not a finite number.

Offset(GeoLine3, double, double, GeoVector3, Tolerance)

Gets the segment parallel to a segment, moved sideways and upward in the frame an up direction fixes for it, within a tolerance.

public static GeoLine3 Offset(GeoLine3 line, double lateral, double vertical, GeoVector3 up, Tolerance tolerance)

Parameters

line GeoLine3

The segment.

lateral double

How far to move it to its left, seen from above; negative moves it to the right.

vertical double

How far to move it up; negative moves it down.

up GeoVector3

Which way is up; only its part square to the segment counts.

tolerance Tolerance

The tolerance.

Returns

GeoLine3

The parallel segment, of the same length and running the same way.

Remarks

The frame is the one Tekla Structures positions a beam in: along the segment, up (the part of up square to it), and left, which is up crossed with the direction. A segment running straight up has no such frame, since every direction square to it is level, so a vertical segment needs an up chosen to lie across it, the way a column needs its rotation set; it is refused rather than given one at random.

Exceptions

InvalidOperationException

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

ArgumentException

Thrown when the up direction has no length or runs along the segment.

ArgumentOutOfRangeException

Thrown when a distance is not a finite number.

Offset(GeoPolygon3, double)

Grows a polygon within its own plane by a distance, or shrinks it when the distance is negative, with sharp corners, using the default tolerance.

public static GeoPolygon3[] Offset(GeoPolygon3 polygon, double distance)

Parameters

polygon GeoPolygon3
distance double

Returns

GeoPolygon3[]

Offset(GeoPolygon3, double, Tolerance)

Grows a polygon within its own plane by a distance, or shrinks it when the distance is negative, with sharp corners, within a tolerance.

public static GeoPolygon3[] Offset(GeoPolygon3 polygon, double distance, Tolerance tolerance)

Parameters

polygon GeoPolygon3
distance double
tolerance Tolerance

Returns

GeoPolygon3[]

Offset(GeoPolygon3, double, OffsetJoin)

Grows a polygon within its own plane by a distance, or shrinks it when the distance is negative, with the given corners, using the default tolerance.

public static GeoPolygon3[] Offset(GeoPolygon3 polygon, double distance, OffsetJoin join)

Parameters

polygon GeoPolygon3
distance double
join OffsetJoin

Returns

GeoPolygon3[]

Offset(GeoPolygon3, double, OffsetJoin, Tolerance)

Grows a polygon within its own plane by a distance, or shrinks it when the distance is negative, with the given corners, within a tolerance.

public static GeoPolygon3[] Offset(GeoPolygon3 polygon, double distance, OffsetJoin join, Tolerance tolerance)

Parameters

polygon GeoPolygon3
distance double
join OffsetJoin
tolerance Tolerance

Returns

GeoPolygon3[]

Offset(GeoPolygon3, double, OffsetOptions)

Grows a polygon within its own plane by a distance, or shrinks it when the distance is negative, as the options say, using the default tolerance.

public static GeoPolygon3[] Offset(GeoPolygon3 polygon, double distance, OffsetOptions options)

Parameters

polygon GeoPolygon3
distance double
options OffsetOptions

Returns

GeoPolygon3[]

Offset(GeoPolygon3, double, OffsetOptions, Tolerance)

Grows a polygon within its own plane by a distance, or shrinks it when the distance is negative, as the options say, within a tolerance.

public static GeoPolygon3[] Offset(GeoPolygon3 polygon, double distance, OffsetOptions options, Tolerance tolerance)

Parameters

polygon GeoPolygon3

The polygon.

distance double

How far the boundary moves: outward when positive, inward when negative.

options OffsetOptions

The corner shape.

tolerance Tolerance

The tolerance.

Returns

GeoPolygon3[]

The boundary loops of the offset region, in the polygon's plane, as Offset2 returns them for a polygon in the plane: usually one; none when it shrinks away; one per piece when it pinches off; and, where a growing polygon closes a gap around empty space, that space as a hole following its outer loop. Outer loops keep the polygon's normal and holes face the other way, so their signed areas add up. Use Offset(GeoFace3, double, OffsetOptions, Tolerance) on a face to get the holes attached to their boundary.

Remarks

The polygon is laid out in a frame of its own plane and offset there, so the result lies exactly in that plane. A piece too small for GeoPolygon3 to accept under the tolerance, one enclosing less area than EqualVector, is left out, as its constructor would refuse it.

Exceptions

ArgumentNullException

Thrown when the polygon or the options are null.

ArgumentOutOfRangeException

Thrown when the distance is not a finite number.

Offset(GeoFace3, double)

Grows a face within its own plane by a distance, or shrinks it when the distance is negative, with sharp corners, using the default tolerance.

public static GeoFace3[] Offset(GeoFace3 face, double distance)

Parameters

face GeoFace3
distance double

Returns

GeoFace3[]

Offset(GeoFace3, double, Tolerance)

Grows a face within its own plane by a distance, or shrinks it when the distance is negative, with sharp corners, within a tolerance.

public static GeoFace3[] Offset(GeoFace3 face, double distance, Tolerance tolerance)

Parameters

face GeoFace3
distance double
tolerance Tolerance

Returns

GeoFace3[]

Offset(GeoFace3, double, OffsetJoin)

Grows a face within its own plane by a distance, or shrinks it when the distance is negative, with the given corners, using the default tolerance.

public static GeoFace3[] Offset(GeoFace3 face, double distance, OffsetJoin join)

Parameters

face GeoFace3
distance double
join OffsetJoin

Returns

GeoFace3[]

Offset(GeoFace3, double, OffsetJoin, Tolerance)

Grows a face within its own plane by a distance, or shrinks it when the distance is negative, with the given corners, within a tolerance.

public static GeoFace3[] Offset(GeoFace3 face, double distance, OffsetJoin join, Tolerance tolerance)

Parameters

face GeoFace3
distance double
join OffsetJoin
tolerance Tolerance

Returns

GeoFace3[]

Offset(GeoFace3, double, OffsetOptions)

Grows a face within its own plane by a distance, or shrinks it when the distance is negative, as the options say, using the default tolerance.

public static GeoFace3[] Offset(GeoFace3 face, double distance, OffsetOptions options)

Parameters

face GeoFace3
distance double
options OffsetOptions

Returns

GeoFace3[]

Offset(GeoFace3, double, OffsetOptions, Tolerance)

Grows a face within its own plane by a distance, or shrinks it when the distance is negative, as the options say, within a tolerance: the plate of a Tekla contour grown for a clearance, or shrunk for the line a weld runs along.

public static GeoFace3[] Offset(GeoFace3 face, double distance, OffsetOptions options, Tolerance tolerance)

Parameters

face GeoFace3

The face.

distance double

How far the material grows: its boundary moves out and its holes shrink when positive.

options OffsetOptions

The corner shape.

tolerance Tolerance

The tolerance.

Returns

GeoFace3[]

The faces of the offset region, largest first, each with the holes inside it and with the face's normal; the holes face the other way. Shrinking can split a face; growing can close its holes.

Remarks

The material is what lies inside the boundary and outside every hole, so holes that overlap or reach past the boundary take away only what they cover.

Exceptions

ArgumentNullException

Thrown when the face or the options are null.

ArgumentOutOfRangeException

Thrown when the distance is not a finite number.