Adds a spiral or helical curve object to the document.
Rhino.AddSpiral2 (strCurve, arrInterval, dblPitch, dblTurns, dblRadius0 [, dblRadius1 [, intTurnCount]])
strCurve |
Required. String. The curve object's identifier. |
arrInterval |
Required. Array. An array of two numbers identifying the starting and ending portions of the curve's domain to sweep along. |
dblPitch |
Required. Number. The pitch, or distance between turns. If dblPitch = 0, then dblTurns must be <> 0 and the approximate distance between turns will be set to dblPitch. Use positive values for right-handed helices and negative values for left-handed helices. |
dblTurns |
Required. Number. If dblTurns <> 0, then the resulting helix will have this many turns. Use positive values for right-handed helices and negative values for left-handed helices. |
dblRadius0 |
Required. Number. The starting radius. Note, for a helix, you may have dblRadius0 = dblRadius1. For a spiral, dblRadius0 = dblRadius1 produces a circle. Zero and negative radii are permissible. |
dblRadius1 |
Optional. Number. The ending radius. If omitted, dblRadius1 = dblRadius0. |
intTurnCount |
Optional. Number. The Number of points to interpolate per turn. Value must be greater than or equal to 4. The default value is 12. |
String |
The identifier of the new object if successful. |
Null |
If not successful, or on error. |
Dim strCurve, arrInterval, dblPitch, dblTurns, dblRadius0, dblRadius1
strCurve = Rhino.GetObject("Select curve", 4)
If Not IsNull(strCurve) Then
arrInterval = Rhino.CurveDomain(strCurve)
dblPitch = 6
dblTurns = 0
dblRadius0 = 5
dblRadius1 = 8
Call Rhino.AddSpiral2(strCurve, arrInterval, dblPitch, dblTurns, dblRadius0, dblRadius1 )
End If