AddSweep2

Adds a surface created through profile curves that define the surface shape and two curves that define the surface edges. For more details on this method, see the Rhino help file for the Sweep2 command.

Note, this method does not perform any curve sorting or direction matching on the input shape curves. This is the responsibility of the script writer.

For best results:

Syntax

Rhino.AddSweep2 (arrRails, arrShapes [, arrStartPt [, arrEndPt [, blnClosed [, blnSimpleSweep [, blnMaintainHeight [, intSimplify [, vaSimplifyArg]]]]]]])

Parameters

arrRails

Required.  String.  An array of strings identifying two rail curves.

arrShapes

Required.  Array.  An array of strings identifying one or more shape, or cross section, curves.

arrStartPt

Optional.  Array.  The 3-D starting point of the surface.

arrEndPt

Optional.  Array.  The 3-D ending point of the surface.

blnClosed

Optional.  Boolean.  If True, then create a closed surface, continuing the surface past the last curve around to the first curve. This option is only available after you select two cross-section curves.  The default value is False.

blnSimpleSweep

Optional.  Boolean.  If True, then create surfaces using exact input. This option generates simpler surfaces in cases when the curves are perfectly set up.  The default value is False.

blnMaintainHeight

Optional.  Boolean.  By default, shape curves normally scale in both the height and width dimensions. To remove the association between the height scaling from the width scaling, set this value to True.  The default value is False.

intSimplify

Optional.  Integer.  Cross section curve options, where 0 = Do Not Simplify, 1 = Refit, and 2 = Rebuild. The default value is 0 = Do Not Simplify.

vaSimplifyArg

Optional.  Variant.  If intSimplify = 1 (Refit), then this argument is a number specifying the refit tolerance.  If intSimplify = 2 (Rebuild), then this argument is a number specifying the number of control points to rebuild the shape curves.

Returns

Array

The identifiers of the new surface objects if successful.

Null

If not successful, or on error.

Example

Dim arrRails, arrShapes

arrRails = Rhino.GetObjects("Select two rail curve", 4)

If IsArray(arrRails) Then

  arrShapes = Rhino.GetObjects("Select cross-section curves", 4)

  If IsArray(arrShapes) Then

    Rhino.AddSweep2 arrRails, arrShapes

  End If

End If

Also See

AddSweep1

CurveDirectionsMatch

ReverseCurve