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
lineGeoLine3The segment.
distancedoubleHow far to move it.
directionGeoVector3The 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
lineGeoLine3The segment.
distancedoubleHow far to move it.
directionGeoVector3The side to move it to; only its part square to the segment counts.
toleranceToleranceThe tolerance.
Returns
- GeoLine3
The parallel segment, of the same length and running the same way, exactly
distanceaway 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
lineGeoLine3The segment.
lateraldoubleHow far to move it to its left, seen from above; negative moves it to the right.
verticaldoubleHow far to move it up; negative moves it down.
upGeoVector3Which 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
lineGeoLine3The segment.
lateraldoubleHow far to move it to its left, seen from above; negative moves it to the right.
verticaldoubleHow far to move it up; negative moves it down.
upGeoVector3Which way is up; only its part square to the segment counts.
toleranceToleranceThe 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
polygonGeoPolygon3distancedouble
Returns
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
polygonGeoPolygon3distancedoubletoleranceTolerance
Returns
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
polygonGeoPolygon3distancedoublejoinOffsetJoin
Returns
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
polygonGeoPolygon3distancedoublejoinOffsetJointoleranceTolerance
Returns
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
polygonGeoPolygon3distancedoubleoptionsOffsetOptions
Returns
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
polygonGeoPolygon3The polygon.
distancedoubleHow far the boundary moves: outward when positive, inward when negative.
optionsOffsetOptionsThe corner shape.
toleranceToleranceThe tolerance.
Returns
- GeoPolygon3[]
The boundary loops of the offset region, in the polygon's plane, as
Offset2returns 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
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
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
faceGeoFace3distancedoublejoinOffsetJoin
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
faceGeoFace3distancedoublejoinOffsetJointoleranceTolerance
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
faceGeoFace3distancedoubleoptionsOffsetOptions
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
faceGeoFace3The face.
distancedoubleHow far the material grows: its boundary moves out and its holes shrink when positive.
optionsOffsetOptionsThe corner shape.
toleranceToleranceThe 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.