A curve representing a Catmull-Rom spline.

//Create a closed wavey loop
const curve = new AcGeCatmullRomCurve3d( [
new AcGePoint3d( -10, 0, 10 ),
new AcGePoint3d( -5, 5, 5 ),
new AcGePoint3d( 0, 0, 0 ),
new AcGePoint3d( 5, -5, 5 ),
new AcGePoint3d( 10, 0, 10 )
], true ); // true for closed curve

const points = curve.getPoints( 50 );

// Convert to NURBS curve
const nurbsCurve = curve.toNurbsCurve();

Hierarchy

  • AcGeCurve3d
    • AcGeCatmullRomCurve3d

Constructors

Properties

_boundingBoxNeedsUpdate: boolean = false
isCatmullRomCurve3d: true

This flag can be used for type testing.

type: "CatmullRomCurve3d" = 'CatmullRomCurve3d'

The curve type identifier

Accessors

  • get boundingBoxNeedUpdate(): boolean
  • When this is set, it calculates the bounding box of this shape and resets this property to false. Default is false.

    Returns boolean

  • get box(): AcGeBox3d
  • The bounding box of this shape. Because it is a time-consuming operation to calculate the bounding box of one shape, the bounding box value is cached. It will be calculated again lazily once there are any changes to properties of this shape.

    Returns AcGeBox3d

Methods