ExtendCurveLength

Extends a non-closed curve object by a line, arc, or smooth extension for a specified distance.

Syntax

rhinoscriptsyntax.ExtendCurveLength (curve_id, extension_type, side, length)

rhinoscript.curve.ExtendCurveLength (curve_id, extension_type, side, length)

Parameters

curve_id

Required.  String or Guid.  The object's identifier.

extension_type

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.

side

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.

length

Required.  Number.  The distance to extend the curve.

Returns

Guid

The identifier of the extended object if successful.

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

curve = rs.GetObject("Select curve to extend", rs.filter.curve)

if curve:

    length = rs.GetReal("Length to extend", 3.0)

    if length: rs.ExtendCurveLength( curve, 2, 2, length )

Also See

ExtendCurve

ExtendCurvePoint