ExtendCurveLength

Extends a non-closed curve object by a line, arc, or smooth extension for a specified distance.  Negative length values will shorten the curve.

Syntax

Rhino.ExtendCurveLength (strObject, intType, intSide, dblLength)

Parameters

strObject

Required.  String.  The object's identifier.

intType

Required.  Number.  Type of extension.

Value

Description

0

Line - Creates an line extension tangent to the original curve.

1

Arc - Creates an arc extension tangent to the original curve.

2

Smooth - Creates a smooth curve extension curvature continuous with the original curve.

intSide

Required.  Number.  The size to  extent.

Value

Description

0

Extend from the start of the curve.

1

Extend from the end of the curve.

2

Extend from both the start and the end of the curve.

dblLength

Required.  Number.  The distance to extend the curve.

Returns

String

The identifier of the extended object if successful.

Null

If not successful, or on error.

Example

Const rhObjectCurve = 4

Dim strCurve, dblLength

strCurve = Rhino.GetObject("Select curve to extend", rhObjectCurve)

If Not IsNull(strCurve) Then

dblLength = 3.0

dblLength = Rhino.GetReal("Length to extend", dblLength)

If IsNumeric(dblLength) Then

Rhino.ExtendCurveLength strCurve, 2, 2, dblLength

End If

End If

Also See

ExtendCurve

ExtendCurvePoint