NurbsCurve2D Object

Derived from: Curve2D Object
Defined in namespace "adsk::core" and the header file is <Core/Geometry/NurbsCurve2D.h>

Description

Transient 2D NURBS curve. A transient NURBS curve is not displayed or saved in a document. Transient 2D NURBS curves are used as a wrapper to work with raw 2D NURBS curve information. They are created statically using one of the create methods of the NurbsCurve2D class.

Methods

Name Description
classType Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copy Creates and returns an independent copy of this NurbsCurve2D object.
createNonRational Creates a transient 2D NURBS non-rational b-spline object.
createRational Creates a transient 2D NURBS rational b-spline object.
extract Defines a new NURBS curve that is the subset of this NURBS curve in the parameter range of [startParam, endParam]
getData Gets the data that defines a transient 2D NURBS rational b-spline object.
merge Define a new NURBS curve that is the result of combining this NURBS curve with another NURBS curve. The curves are merged with the end point of the current curve merging with the start point of the other curve. The curves are forced to join even if they are not physically touching so you will typically want to make sure the end and start points of the curves are where you expect them to be.
reverse Reverses the orientation of the curve so the start and end points are swapped. The shape of the curve remains unchanged. This is especially useful to prepare the curves to use with the merge method.
set Sets the data that defines a transient 2D NURBS rational b-spline object.
transformBy Transforms this curve in 2D space.

Properties

Name Description
controlPointCount Gets the number of control points that define the curve
controlPoints Returns an array of Point2D objects that define the control points of the curve.
curveType Returns the type of geometry this curve represents.
degree Returns the degree of the curve
evaluator Returns an evaluator object that lets you perform additional evaluations on the curve.
isClosed Returns if the curve is closed
isPeriodic Returns if the curve is periodic.
isRational Returns if the curve is rational or non-rational type
isValid Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
knotCount Returns the knot count of the curve
knots Returns an array of numbers that define the Knots of the curve.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():

Accessed From

Arc2D.asNurbsCurve, Circle2D.asNurbsCurve, Ellipse2D.asNurbsCurve, EllipticalArc2D.asNurbsCurve, Line2D.asNurbsCurve, NurbsCurve2D.copy, NurbsCurve2D.createNonRational, NurbsCurve2D.createRational, NurbsCurve2D.extract, NurbsCurve2D.merge, Polyline2D.asNurbsCurve

Version

Introduced in version August 2014