CurveLoopCreateViaOffset(CurveLoop, Double, XYZ) Method |
Creates a new curve loop that is an offset of the existing curve loop.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic static CurveLoop CreateViaOffset(
CurveLoop original,
double offsetDist,
XYZ normal
)
Public Shared Function CreateViaOffset (
original As CurveLoop,
offsetDist As Double,
normal As XYZ
) As CurveLoop
public:
static CurveLoop^ CreateViaOffset(
CurveLoop^ original,
double offsetDist,
XYZ^ normal
)
static member CreateViaOffset :
original : CurveLoop *
offsetDist : float *
normal : XYZ -> CurveLoop
Parameters
- original CurveLoop
-
The original curve loop.
- offsetDist Double
-
The signed offset distance.
- normal XYZ
-
The normal of the offset plane.
Return Value
CurveLoop
The offset curve loop.
Exceptions
Remarks
For each curve in the curve loop, the offset curve is theoretically defined by translating every point of the original curve by the
vector offsetDist * (curveTan x normal) where curveTan is the curve's unit tangent vector at the given point. The curves are then
trimmed to create a continuous curve loop. For a planar curve loop, this amounts to pushing each point "to the right" of the curve
loop by the signed offset distance offsetDist, within the plane of the curve loop. The "right" side of the curve loop at a given
point on the curve loop is defined with reference to normal being thought of as the upward direction and curveTan being thought of
as the forward direction, as if you are walking along the curve loop. It follows that if offsetDist is positive, points will be
offset to the right of the curve loop, whereas if offsetDist is negative, points will be offset to the left of the curve loop.
If the curve loop contains curves such as elliptical segments or splines, it is possible the offset creation will fail if
Revit will not be able to trim contiguous curves to meet one another. If the offset is successful, offsets of those curve types
will be created as HermiteSplines.
See Also