AddSweep1

Adds a surface created through profile curves that define the surface shape and one curve that defines a surface edge. For more details on this method, see the Rhino help file for the Sweep1 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.AddSweep1 (strRail, arrShapes [, arrStartPt [, arrEndPt [, blnClosed [, intStyle [, vaStyleArg [, intSimplify [, vaSimplifyArg]]]]]]])

Parameters

strRail

Required.  String.  The identifier of the rail curve.

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.

intStyle

Optional.  Integer.  The sweep style, where 0 = Freeform and 1 = Roadlike. The default value is 0 = Freeform.

vaStyleArg

Optional.  Variant.  If intStyle = 1 (Roadlike), then this argument is a 3-D vector identifying the planar up direction for the sweep.

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 strRail, arrShapes

strRail = Rhino.GetObject("Select rail curve", 4)

If Not IsNull(strRail) Then

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

  If IsArray(arrShapes) Then

    Rhino.AddSweep1 strRail, arrShapes

  End If

End If

Also See

AddSweep2

CurveDirectionsMatch

ReverseCurve