Description:

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

Syntax:
public static NurbsCurve CreateSpiral(
Curve railCurve,
double t0,
double t1,
Point3d radiusPoint,
double pitch,
double turnCount,
double radius0,
double radius1,
int pointsPerTurn
)
Parameters:
  • railCurve
  • Type: Curve
  • The rail curve.
  • t0
  • Type: double
  • Starting portion of rail curve's domain to sweep along.
  • t1
  • Type: double
  • Ending portion of rail curve's domain to sweep along.
  • radiusPoint
  • Type: Point3d
  • 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: double
  • The pitch. Positive values produce counter-clockwise orientation, negative values produce clockwise orientation.
  • turnCount
  • Type: double
  • 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.
  • radius0
  • Type: double
  • The starting radius. At least one radii must be nonzero. Negative values are allowed.
  • radius1
  • Type: double
  • The ending radius. At least one radii must be nonzero. Negative values are allowed.
  • pointsPerTurn
  • Type: int
  • Number of points to interpolate per turn. Must be greater than 4. When in doubt, use 12.
Returns:
NurbsCurve on success, None on failure.
Available since:
5.2

Description:

Creates a C1 cubic NURBS approximation of a helix or spiral. For a helix, you may have radius0 == radius1. For a spiral radius0 == radius1 produces a circle. Zero and negative radii are permissible.

Syntax:
public static NurbsCurve CreateSpiral(
Point3d axisStart,
Vector3d axisDir,
Point3d radiusPoint,
double pitch,
double turnCount,
double radius0,
double radius1
)
Parameters:
  • axisStart
  • Type: Point3d
  • Helix's axis starting point or center of spiral.
  • axisDir
  • Type: Vector3d
  • Helix's axis vector or normal to spiral's plane.
  • radiusPoint
  • Type: Point3d
  • 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: double
  • The pitch, where a spiral has a pitch = 0, and pitch > 0 is the distance between the helix's "threads".
  • turnCount
  • Type: double
  • The number of turns in spiral or helix. Positive values produce counter-clockwise orientation, negative values produce clockwise orientation. Note, for a helix, turnCount * pitch = length of the helix's axis.
  • radius0
  • Type: double
  • The starting radius.
  • radius1
  • Type: double
  • The ending radius.
Returns:
NurbsCurve on success, None on failure.
Available since:
5.2

CreateSpiral method

Class:  Rhino.Geometry.NurbsCurve

Nothing found