﻿NurbsCurve.CreateSpiral Method (Curve, Double, Double, Point3d, Double, Double, Double, Double, Int32)

# NurbsCurveAddLanguageSpecificTextSet("LSTD2599AFA_0?cpp=::|nu=.");CreateSpiral Method (Curve, Double, Double, Point3d, Double, Double, Double, Double, Int32)

Create a C2 non-rational uniform cubic NURBS approximation of a swept helix or spiral.

Namespace:  Rhino.Geometry
Assembly:  RhinoCommon (in RhinoCommon.dll)
Since: 5.2
Syntax
```public static NurbsCurve CreateSpiral(
Curve railCurve,
double t0,
double t1,
double pitch,
double turnCount,
int pointsPerTurn
)```

#### Parameters

railCurve
Type: Rhino.GeometryCurve
The rail curve.
t0
Type: SystemDouble
Starting portion of rail curve's domain to sweep along.
t1
Type: SystemDouble
Ending portion of rail curve's domain to sweep along.
Type: Rhino.GeometryPoint3d
Point used only to get a vector that is perpendicular to the axis. In particular, this vector must not be (anti)parallel to the axis vector.
pitch
Type: SystemDouble
The pitch. Positive values produce counter-clockwise orientation, negative values produce clockwise orientation.
turnCount
Type: SystemDouble
The turn count. If != 0, then the resulting helix will have this many turns. If = 0, then pitch must be != 0 and the approximate distance between turns will be set to pitch. Positive values produce counter-clockwise orientation, negative values produce clockwise orientation.
Type: SystemDouble
The starting radius. At least one radii must be nonzero. Negative values are allowed.
Type: SystemDouble
The ending radius. At least one radii must be nonzero. Negative values are allowed.
pointsPerTurn
Type: SystemInt32
Number of points to interpolate per turn. Must be greater than 4. When in doubt, use 12.

#### Return Value

Type: NurbsCurve
NurbsCurve on success, null on failure.