Curve¶

class
rhino3dm.
Curve
¶ 
Domain
¶ rhino3dm.Interval: Gets or sets the domain of the curve.

Dimension
¶ int: Gets the dimension of the object. The dimension is typically three. For parameter space trimming curves the dimension is two. In rare cases the dimension can be one or greater than three.

SpanCount
¶ int: Gets the number of nonempty smooth (cinfinity) spans in the curve.

Degree
¶ int: Gets the maximum algebraic degree of any span or a good estimate if curve spans are not algebraic.

IsClosed
¶ bool: Gets a value indicating whether or not this curve is a closed curve.

IsPeriodic
¶ bool: Gets a value indicating whether or not this curve is considered to be Periodic.

PointAtStart
¶ rhino3dm.Point3d: Evaluates point at the start of the curve.

PointAtEnd
¶ rhino3dm.Point3d: Evaluates point at the end of the curve.

TangentAtStart
¶ rhino3dm.Vector3d: Evaluates the unit tangent vector at the start of the curve.

TangentAtEnd
¶ rhino3dm.Vector3d: Evaluate unit tangent vector at the end of the curve.

static
CreateControlPointCurve
(points, degree)¶ Constructs a curve from a set of controlpoint locations.
Parameters:  points (list[rhino3dm.Point3d]) – Control points.
 degree (int) – Degree of curve. The number of control points must be at least degree+1.
Return type:

ChangeDimension
(desiredDimension)¶ Changes the dimension of a curve.
Parameters: desiredDimension (int) – The desired dimension. Returns: True if the curve’s dimension was already desiredDimension or if the curve’s dimension was successfully changed to desiredDimension; otherwise false. Return type: bool

IsLinear
(tolerance)¶ Test a curve to see if it is linear to within RhinoMath.ZeroTolerance units (1e12).
Returns: True if the curve is linear. Return type: bool

IsPolyline
()¶ Several types of Curve can have the form of a polyline including a degree 1 NurbsCurve, a PolylineCurve, and a PolyCurve all of whose segments are some form of polyline. IsPolyline tests a curve to see if it can be represented as a polyline.
Returns: True if this curve can be represented as a polyline; otherwise, false. Return type: bool

TryGetPolyline
()¶ Several types of Curve can have the form of a polyline including a degree 1 NurbsCurve, a PolylineCurve, and a PolyCurve all of whose segments are some form of polyline. IsPolyline tests a curve to see if it can be represented as a polyline.
Returns: tuple (bool, rhino3dm.Polyline)  True if this curve can be represented as a polyline; otherwise, false.
 If True is returned, then the polyline form is returned here.
Return type: (bool, rhino3dm.Polyline)

IsArc
(tolerance)¶ Test a curve to see if it can be represented by an arc or circle within RhinoMath.ZeroTolerance.
Returns: True if the curve can be represented by an arc or a circle within tolerance. Return type: bool

TryGetArc
(tolerance)¶ Try to convert this curve into an Arc using RhinoMath.ZeroTolerance.
Returns: tuple (bool, Arc)  True if the curve could be converted into an arc.
 On success, the Arc will be filled in.
Return type: (bool, Arc)

IsCircle
(tolerance)¶ Test a curve to see if it can be represented by a circle within RhinoMath.ZeroTolerance.
Returns: True if the Curve can be represented by a circle within tolerance. Return type: bool

TryGetCircle
(tolerance)¶ Try to convert this curve into a circle using RhinoMath.ZeroTolerance.
Returns: tuple (bool, Circle)  True if the curve could be converted into a Circle.
 On success, the Circle will be filled in.
Return type: (bool, Circle)

IsEllipse
(tolerance)¶ Test a curve to see if it can be represented by an ellipse within RhinoMath.ZeroTolerance.
Returns: True if the Curve can be represented by an ellipse within tolerance. Return type: bool

TryGetEllipse
(tolerance)¶ Try to convert this curve into an Ellipse within RhinoMath.ZeroTolerance.
Returns: tuple (bool, Ellipse)  True if the curve could be converted into an Ellipse.
 On success, the Ellipse will be filled in.
Return type: (bool, Ellipse)

IsPlanar
(tolerance)¶ Test a curve for planarity.
Returns: True if the curve is planar (flat) to within RhinoMath.ZeroTolerance units (1e12). Return type: bool

ChangeClosedCurveSeam
(t)¶ If this curve is closed, then modify it so that the start/end point is at curve parameter t.
Parameters: t (float) – Curve parameter of new start/end point. The returned curves domain will start at t. Returns: True on success, False on failure. Return type: bool

IsClosable
(tolerance, minimumAbsoluteSize, minimumRelativeSize)¶ Decide if it makes sense to close off this curve by moving the endpoint to the start based on startend gap size and length of curve as approximated by chord defined by 6 points.
Returns: True if start and end points are close enough based on above conditions. Return type: bool

Reverse
()¶ Reverses the direction of the curve.
Returns: True on success, False on failure. Return type: bool

ClosedCurveOrientation
()¶ Determines the orientation (counterclockwise or clockwise) of a closed, planar curve in the world XY plane. Only works with simple (no self intersections) closed, planar curves.
Returns: The orientation of this curve with respect to world XY plane. Return type: CurveOrientation

PointAt
(t)¶ Evaluates point at a curve parameter.
Parameters: t (float) – Evaluation parameter. Returns: Point (location of curve at the parameter t). Return type: rhino3dm.Point3d

SetStartPoint
(point)¶ Forces the curve to start at a specified point. Not all curve types support this operation.
Parameters: point (rhino3dm.Point3d) – New start point of curve. Returns: True on success, False on failure. Return type: bool

SetEndPoint
(point)¶ Forces the curve to end at a specified point. Not all curve types support this operation.
Parameters: point (rhino3dm.Point3d) – New end point of curve. Returns: True on success, False on failure. Return type: bool

TangentAt
(t)¶ Evaluates the unit tangent vector at a curve parameter.
Parameters: t (float) – Evaluation parameter. Returns: Unit tangent vector of the curve at the parameter t. Return type: rhino3dm.Vector3d

CurvatureAt
(t)¶ Evaluate the curvature vector at a curve parameter.
Parameters: t (float) – Evaluation parameter. Returns: Curvature vector of the curve at the parameter t. Return type: rhino3dm.Vector3d

FrameAt
(t)¶ Returns a 3d frame at a parameter.
Parameters: t (float) – Evaluation parameter. Returns: tuple (bool, rhino3dm.Plane)  True on success, False on failure.
 The frame is returned here.
Return type: (bool, rhino3dm.Plane)

GetCurveParameterFromNurbsFormParameter
(nurbsParameter)¶ Convert a NURBS curve parameter to a curve parameter.
Parameters: nurbsParameter (float) – NURBS form parameter. Returns: tuple (bool, float)  True on success, False on failure.
 Curve parameter.
Return type: (bool, float)

GetNurbsFormParameterFromCurveParameter
(curveParameter)¶ Convert a curve parameter to a NURBS curve parameter.
Parameters: curveParameter (float) – Curve parameter. Returns: tuple (bool, float)  True on success, False on failure.
 NURBS form parameter.
Return type: (bool, float)

Trim
(t0, t1)¶ Removes portions of the curve outside the specified interval.
Parameters:  t0 (float) – Start of the trimming interval. Portions of the curve before curve(t0) are removed.
 t1 (float) – End of the trimming interval. Portions of the curve after curve(t1) are removed.
Returns: Trimmed portion of this curve is successful, None on failure.
Return type:

Split
(t)¶ Splits (divides) the curve at the specified parameter. The parameter must be in the interior of the curve’s domain.
Parameters: t (float) – Parameter to split the curve at in the interval returned by Domain(). Returns: Two curves on success, None on failure. Return type: rhino3dm.Curve[]

ToNurbsCurve
()¶ Constructs a NURBS curve representation of this curve.
Returns: NURBS representation of the curve on success, None on failure. Return type: rhino3dm.NurbsCurve

ToNurbsCurve
(subdomain) Constructs a NURBS curve representation of this curve.
Returns: NURBS representation of the curve on success, None on failure. Return type: rhino3dm.NurbsCurve
