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:
The shape curves should all be oriented in the same direction.
The starting point of each shape curve should either intersect with or be close to the first rail curve.
The ending point of each shape curve should either intersect with or be close to the second rail curve.
The shape curves should be passed in order, starting with the curve closest to the starting point of the rail.
Rhino.AddSweep2 (arrRails, arrShapes [, arrStartPt [, arrEndPt [, blnClosed [, blnSimpleSweep [, blnMaintainHeight [, intSimplify [, vaSimplifyArg]]]]]]])
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. |
Array |
The identifiers of the new surface objects if successful. |
Null |
If not successful, or on error. |
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