Method Offset
- Namespace
- OpenCAD2D
- Assembly
- OpenCAD2D.Core.dll
Offset(DxfCurve, double, GeoPoint2)
Offsets a curve to the side of a point, as one pick of OFFSET with a distance typed: a line from (0, 0) to (100, 0) offset by 5 toward (50, 10) gives a line from (0, 5) to (100, 5). The copies go on the layer of the curve, which is kept (OFFSET's defaults; its Erase, Layer and Through options are not taken). A line goes to the side of the point across it, an arc or a circle outward where the point is outside it, a polyline to the side of the point with its corners run on until they meet. One undo step named OFFSET.
public IReadOnlyList<DxfCurve> Offset(DxfCurve curve, double distance, GeoPoint2 side)
Parameters
curveDxfCurveThe drawing's curve: a line, arc, circle, ellipse, polyline, spline, xline or ray.
distancedoubleThe distance, above the session's
EqualPoint.sideGeoPoint2The point on the side to offset to, in the world, not on the curve.
Returns
- IReadOnlyList<DxfCurve>
The curves the offset added, which is one for a line, an arc, a circle or a polyline and may be more for a polyline whose offset falls apart.
Exceptions
- ArgumentNullException
Thrown when the curve is null.
- ArgumentException
Thrown when the curve is not one OFFSET takes (
Cannot offset that object.), or the side point is not finite or lies on the curve.- ArgumentOutOfRangeException
Thrown when the distance is not a finite number above
EqualPoint.- InvalidOperationException
Thrown when the curve is refused, as the remarks say, or the offset makes no curve (a circle of radius 10 offset inward by 15:
Cannot offset that object.).