ExtendCurve

Extends a non-closed curve object by a line, arc, or smooth extension until it intersects a collection of objects.

Syntax

rhinoscriptsyntax.ExtendCurve (curve_id, extension_type, side, boundary_object_ids)

rhinoscript.curve.ExtendCurve (curve_id, extension_type, side, boundary_object_ids)

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.

boundary_object_ids

Required.  List or Tuple.  The identifiers of curve, surface, and polysurface objects that will be used as boundary objects.

Returns

Guid

The identifier of the extended object if successful.

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

filter = rs.filter.curve | rs.filter.surface | rs.filter.polysurface

objects = rs.GetObjects("Select boundary objects", filter)

if objects:

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

    if curve: rs.ExtendCurve( curve, 2, 1, objects )

Also See

ExtendCurveLength

ExtendCurvePoint