TweenCurve

Creates curves between two open or closed input curves.

Syntax

Rhino.TweenCurve (strCurve0, strCurve1 [, intNumCurves [, intMethod [, intNumSamples]]]])

Parameters

strCurve0

Required.  String.  The first curve object's identifier.

strCurve1

Required.  String.  The second curve object's identifier.

intNumCurves

Optional.  Number.  The number of curves to create. The default is 1.

intMethod

Optional.  Number.  The method for refining the output curves, where:

Value

Description

0 (Default)

Uses the control points of the curves for matching. So the first control point of first curve is matched to first control point of the second curve.

1

Refits the output curves like using the FitCurve method.  Both the input curve and the output curve will have the same structure. The resulting curves are usually more complex than input unless input curves are compatible.

2

Input curves are divided to the specified number of points on the curve, corresponding points define new points that output curves go through. If you are making one tween curve, the method essentially does the following: divides the two curves into an equal number of points, finds the midpoint between the corresponding points on the curves. and interpolates the tween curve through those points.

intNumSamples

Optional.  Number.  The number of samples points to is intMethod = 2. The default is 10.

Returns

Array

The identifier of the new curve objects if successful.

Null

If not successful, or on error.

Example

Const rhObjectCurve = 4

Dim strCurve0, strCurve1

strCurve0 = Rhino.GetObject("Select the first curve", rhObjectCurve)

strCurve1 = Rhino.GetObject("Select the second curve", rhObjectCurve)

Rhino.TweenCurve strCurve0, strCurve1

Also See

MeanCurve