NurbsCurve

compute_rhino3d.NurbsCurve.MakeCompatible(curves, startPt, endPt, simplifyMethod, numPoints, refitTolerance, angleTolerance, multiple=False)

For expert use only. From the input curves, make an array of compatible NURBS curves.

Parameters:
  • curves (list[rhino3dm.Curve]) – The input curves.
  • startPt (rhino3dm.Point3d) – The start point. To omit, specify Point3d.Unset.
  • endPt (rhino3dm.Point3d) – The end point. To omit, specify Point3d.Unset.
  • simplifyMethod (int) – The simplify method.
  • numPoints (int) – The number of rebuild points.
  • refitTolerance (float) – The refit tolerance.
  • angleTolerance (float) – The angle tolerance in radians.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

The output NURBS surfaces if successful.

Return type:

rhino3dm.NurbsCurve[]

compute_rhino3d.NurbsCurve.CreateParabolaFromVertex(vertex, startPoint, endPoint, multiple=False)

Createsa a parabola from vertex and end points.

Parameters:
  • vertex (rhino3dm.Point3d) – The vertex point.
  • startPoint (rhino3dm.Point3d) – The start point.
  • endPoint (rhino3dm.Point3d) – The end point
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

A 2 degree NURBS curve if successful, False otherwise.

Return type:

rhino3dm.NurbsCurve

compute_rhino3d.NurbsCurve.CreateParabolaFromFocus(focus, startPoint, endPoint, multiple=False)

Creates a parabola from focus and end points.

Parameters:
  • focus (rhino3dm.Point3d) – The focal point.
  • startPoint (rhino3dm.Point3d) – The start point.
  • endPoint (rhino3dm.Point3d) – The end point
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

A 2 degree NURBS curve if successful, False otherwise.

Return type:

rhino3dm.NurbsCurve

compute_rhino3d.NurbsCurve.CreateFromArc(arc, degree, cvCount, multiple=False)

Create a uniform non-ratonal cubic NURBS approximation of an arc.

Parameters:
  • degree (int) – >=1
  • cvCount (int) – cv count >=5
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

NURBS curve approximation of an arc on success

Return type:

rhino3dm.NurbsCurve

compute_rhino3d.NurbsCurve.CreateHSpline(points, multiple=False)

Construct an H-spline from a sequence of interpolation points

Parameters:
  • points (list[rhino3dm.Point3d]) – Points to interpolate
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Return type:

rhino3dm.NurbsCurve

compute_rhino3d.NurbsCurve.CreateHSpline1(points, startTangent, endTangent, multiple=False)

Construct an H-spline from a sequence of interpolation points and optional start and end derivative information

Parameters:
  • points (list[rhino3dm.Point3d]) – Points to interpolate
  • startTangent (rhino3dm.Vector3d) – Unit tangent vector or Unset
  • endTangent (rhino3dm.Vector3d) – Unit tangent vector or Unset
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Return type:

rhino3dm.NurbsCurve

compute_rhino3d.NurbsCurve.CreateFromCircle(circle, degree, cvCount, multiple=False)

Create a uniform non-ratonal cubic NURBS approximation of a circle.

Parameters:
  • degree (int) – >=1
  • cvCount (int) – cv count >=5
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

NURBS curve approximation of a circle on success

Return type:

rhino3dm.NurbsCurve

compute_rhino3d.NurbsCurve.SetEndCondition(thisNurbsCurve, bSetEnd, continuity, point, tangent, multiple=False)

Set end condition of a nurbs curve to point, tangent and curvature.

Parameters:
  • bSetEnd (bool) – true: set end of curve, false: set start of curve
  • continuity (NurbsCurveEndConditionType) – Position: set strart or end point, Tangency: set point and tangent, Curvature: set point, tangent and curvature
  • point (rhino3dm.Point3d) – point to set
  • tangent (rhino3dm.Vector3d) – tangent to set
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

True on success, False on failure.

Return type:

bool

compute_rhino3d.NurbsCurve.SetEndCondition1(thisNurbsCurve, bSetEnd, continuity, point, tangent, curvature, multiple=False)

Set end condition of a nurbs curve to point, tangent and curvature.

Parameters:
  • bSetEnd (bool) – true: set end of curve, false: set start of curve
  • continuity (NurbsCurveEndConditionType) – Position: set strart or end point, Tangency: set point and tangent, Curvature: set point, tangent and curvature
  • point (rhino3dm.Point3d) – point to set
  • tangent (rhino3dm.Vector3d) – tangent to set
  • curvature (rhino3dm.Vector3d) – curvature to set
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

True on success, False on failure.

Return type:

bool

compute_rhino3d.NurbsCurve.GrevillePoints(thisNurbsCurve, all, multiple=False)

Gets Greville points for this curve.

Parameters:
  • all (bool) – If true, then all Greville points are returnd. If false, only edit points are returned.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

A list of points if successful, None otherwise.

Return type:

Point3dList

compute_rhino3d.NurbsCurve.SetGrevillePoints(thisNurbsCurve, points, multiple=False)

Sets all Greville edit points for this curve.

Parameters:
  • points (list[rhino3dm.Point3d]) – The new point locations. The number of points should match the number of point returned by NurbsCurve.GrevillePoints(false).
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

True if successful, False otherwise.

Return type:

bool

compute_rhino3d.NurbsCurve.CreateSpiral(axisStart, axisDir, radiusPoint, pitch, turnCount, radius0, radius1, multiple=False)

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

Parameters:
  • axisStart (rhino3dm.Point3d) – Helix’s axis starting point or center of spiral.
  • axisDir (rhino3dm.Vector3d) – Helix’s axis vector or normal to spiral’s plane.
  • radiusPoint (rhino3dm.Point3d) – Point used only to get a vector that is perpedicular to the axis. In particular, this vector must not be (anti)parallel to the axis vector.
  • pitch (float) – The pitch, where a spiral has a pitch = 0, and pitch > 0 is the distance between the helix’s “threads”.
  • turnCount (float) – The number of turns in spiral or helix. Positive values produce counter-clockwise orientation, negitive values produce clockwise orientation. Note, for a helix, turnCount * pitch = length of the helix’s axis.
  • radius0 (float) – The starting radius.
  • radius1 (float) – The ending radius.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

NurbsCurve on success, None on failure.

Return type:

rhino3dm.NurbsCurve

compute_rhino3d.NurbsCurve.CreateSpiral1(railCurve, t0, t1, radiusPoint, pitch, turnCount, radius0, radius1, pointsPerTurn, multiple=False)

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

Parameters:
  • railCurve (rhino3dm.Curve) – The rail curve.
  • t0 (float) – Starting portion of rail curve’s domain to sweep along.
  • t1 (float) – Ending portion of rail curve’s domain to sweep along.
  • radiusPoint (rhino3dm.Point3d) – Point used only to get a vector that is perpedicular to the axis. In particular, this vector must not be (anti)parallel to the axis vector.
  • pitch (float) – The pitch. Positive values produce counter-clockwise orientation, negative values produce clockwise orientation.
  • turnCount (float) – 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, negitive values produce clockwise orientation.
  • radius0 (float) – The starting radius. At least one radii must benonzero. Negative values are allowed.
  • radius1 (float) – The ending radius. At least ont radii must be nonzero. Negative values are allowed.
  • pointsPerTurn (int) – Number of points to intepolate per turn. Must be greater than 4. When in doubt, use 12.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

NurbsCurve on success, None on failure.

Return type:

rhino3dm.NurbsCurve