RhinoCompute.NurbsCurve

RhinoCompute.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.

Arguments:
  • 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[]

RhinoCompute.NurbsCurve.createParabolaFromVertex(vertex, startPoint, endPoint, multiple=false)

Creates a parabola from vertex and end points.

Arguments:
  • 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

RhinoCompute.NurbsCurve.createParabolaFromFocus(focus, startPoint, endPoint, multiple=false)

Creates a parabola from focus and end points.

Arguments:
  • 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

RhinoCompute.NurbsCurve.createFromArc(arc, degree, cvCount, multiple=false)

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

Arguments:
  • 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

RhinoCompute.NurbsCurve.createHSpline(points, multiple=false)

Construct an H-spline from a sequence of interpolation points

Arguments:
  • 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

RhinoCompute.NurbsCurve.createHSpline1(points, startTangent, endTangent, multiple=false)

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

Arguments:
  • 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
Returns:

NURBS curve approximation of an arc on success

Return type:

rhino3dm.NurbsCurve

RhinoCompute.NurbsCurve.createSubDFriendly(points, interpolatePoints, periodicClosedCurve, multiple=false)

Create a NURBS curve, that is suitable for calculations like lofting SubD objects, through a sequence of curves.

Arguments:
  • points (list[rhino3dm.Point3d]) – An enumeration of points. Adjacent points must not be equal. If periodicClosedCurve is false, there must be at least two points. If periodicClosedCurve is true, there must be at least three points and it is not necessary to duplicate the first and last points. When periodicClosedCurve is True and the first and last points are equal, the duplicate last point is automatically ignored.
  • interpolatePoints (bool) – True if the curve should interpolate the points. False if points specify control point locations. In either case, the curve will begin at the first point and end at the last point.
  • periodicClosedCurve (bool) – True to create a periodic closed curve. Do not duplicate the start/end point in the point input.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

A SubD friendly NURBS curve is successful, None otherwise.

Return type:

rhino3dm.NurbsCurve

RhinoCompute.NurbsCurve.createSubDFriendly1(curve, multiple=false)

Create a NURBS curve, that is suitable for calculations like lofting SubD objects, from an existing curve.

Arguments:
  • curve (rhino3dm.Curve) – Curve to rebuild as a SubD friendly curve.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

A SubD friendly NURBS curve is successful, None otherwise.

Return type:

rhino3dm.NurbsCurve

RhinoCompute.NurbsCurve.createSubDFriendly2(curve, pointCount, periodicClosedCurve, multiple=false)

Create a NURBS curve, that is suitable for calculations like lofting SubD objects, from an existing curve.

Arguments:
  • curve (rhino3dm.Curve) – Curve to rebuild as a SubD friendly curve.
  • pointCount (int) – Desired number of control points. If periodicClosedCurve is true, the number must be >= 6, otherwise the number must be >= 4.
  • periodicClosedCurve (bool) – True if the SubD friendly curve should be closed and periodic. False in all other cases.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

A SubD friendly NURBS curve is successful, None otherwise.

Return type:

rhino3dm.NurbsCurve

RhinoCompute.NurbsCurve.createPlanarRailFrames(thisNurbsCurve, parameters, normal, multiple=false)

Computes planar rail sweep frames at specified parameters.

Arguments:
  • parameters (list[float]) – A collection of curve parameters.
  • normal (rhino3dm.Vector3d) – Unit normal to the plane.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

An array of planes if successful, or an empty array on failure.

Return type:

rhino3dm.Plane[]

RhinoCompute.NurbsCurve.createRailFrames(thisNurbsCurve, parameters, multiple=false)

Computes relatively parallel rail sweep frames at specified parameters.

Arguments:
  • parameters (list[float]) – A collection of curve parameters.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

An array of planes if successful, or an empty array on failure.

Return type:

rhino3dm.Plane[]

RhinoCompute.NurbsCurve.createFromCircle(circle, degree, cvCount, multiple=false)

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

Arguments:
  • 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

RhinoCompute.NurbsCurve.setEndCondition(thisNurbsCurve, bSetEnd, continuity, point, tangent, multiple=false)

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

Arguments:
  • bSetEnd (bool) – true: set end of curve, false: set start of curve
  • continuity (NurbsCurveEndConditionType) – Position: set start 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

RhinoCompute.NurbsCurve.setEndCondition1(thisNurbsCurve, bSetEnd, continuity, point, tangent, curvature, multiple=false)

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

Arguments:
  • bSetEnd (bool) – true: set end of curve, false: set start of curve
  • continuity (NurbsCurveEndConditionType) – Position: set start 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

RhinoCompute.NurbsCurve.grevillePoints(thisNurbsCurve, all, multiple=false)

Gets Greville points for this curve.

Arguments:
  • all (bool) – If true, then all Greville points are returns. 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

RhinoCompute.NurbsCurve.setGrevillePoints(thisNurbsCurve, points, multiple=false)

Sets all Greville edit points for this curve.

Arguments:
  • 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

RhinoCompute.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 == radius1 produces a circle. Zero and negative radii are permissible.

Arguments:
  • 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 perpendicular 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, negative 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

RhinoCompute.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.

Arguments:
  • 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 perpendicular 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, negative values produce clockwise orientation.
  • radius0 (float) – The starting radius. At least one radii must be nonzero. Negative values are allowed.
  • radius1 (float) – The ending radius. At least one radii must be nonzero. Negative values are allowed.
  • pointsPerTurn (int) – Number of points to interpolate 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