Hierarchy

  • AcGeCurve3d
    • AcGeSpline3d

Constructors

Properties

_boundingBoxNeedsUpdate: boolean = false

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

  • get closed(): boolean
  • Return true if its start point is identical to its end point. Otherwise, return false.

    Returns boolean

  • set closed(value: boolean): void
  • Return true if its start point is identical to its end point. Otherwise, return false.

    Parameters

    • value: boolean

    Returns void

  • get controlPoints(): { x: number; y: number; z: number }[]
  • Returns { x: number; y: number; z: number }[]

  • get fitPoints(): undefined | { x: number; y: number; z: number }[]
  • Returns undefined | { x: number; y: number; z: number }[]

Methods

  • Return the value of the control point at position index in the list of control points. If index is negative or more than the number of control points in the spline, then point is set to the last control point.

    Parameters

    • index: number

      Input index (0 based) of point to get

    Returns AcGeVector3dLike

  • Return the value of the control point at position index in the list of control points. If index is negative or more than the number of control points in the spline, then point is set to the last control point.

    Parameters

    • index: number

      Input index (0 based) of point to get

    Returns AcGeVector3dLike

  • Divide this spline into the specified nubmer of points those points as an array of points.

    Parameters

    • numPoints: number = 100

      Input the nubmer of points returned

    Returns AcGePoint3d[]

    Return an array of point

  • Creates a 3D spline geometry from control points, knots, and optional weights.

    This factory is intended for robust deserialization: it normalizes degree and weights from imperfect source data and returns null instead of throwing when the NURBS definition is invalid.

    Parameters

    • controlPoints: AcGeVector3dLike[]

      Control vertices defining the curve shape

    • knots: number[]

      Full knot vector for the spline

    • weights: undefined | number[]

      Optional per-control-point weights; ignored when the array length does not match controlPoints.length

    • declaredDegree: undefined | number

      Degree from the source file; when less than 1, derived from knots.length - controlPoints.length - 1, then clamped to [1, controlPoints.length - 1]

    • closed: boolean

      Whether the spline forms a closed loop

    Returns null | AcGeSpline3d

    A spline geometry, or null if construction fails

  • Creates a 3D spline geometry from parsed DWG/DXF spline-edge data.

    Used for hatch boundary paths, proxy-graphics edges, and similar structures where spline data is embedded as a lightweight edge record rather than a full SPLINE entity. Control-point data is preferred; fit data is used when control points are absent. Fit-point edges always use 'Uniform' knot parameterization and are treated as open curves.

    Parameters

    • spline: {
          controlPoints: {
              weight?: null | number;
              x: number;
              y: number;
              z?: number;
          }[];
          degree?: number;
          endTangent?: null
          | { x: number; y: number; z?: number };
          fitDatum: { x: number; y: number; z?: number }[];
          knots: number[];
          numberOfControlPoints: number;
          numberOfFitData: number;
          numberOfKnots: number;
          startTangent?: null | { x: number; y: number; z?: number };
      }

      Parsed spline-edge payload from a DWG/DXF reader

      • controlPoints: { weight?: null | number; x: number; y: number; z?: number }[]

        Control vertices, optionally with per-point weight

      • Optionaldegree?: number

        Optional declared degree

      • OptionalendTangent?: null | { x: number; y: number; z?: number }

        Optional end tangent for fit-data edges

      • fitDatum: { x: number; y: number; z?: number }[]

        Fit points when the edge is defined by fit data

      • knots: number[]

        Knot values for the control-point representation

      • numberOfControlPoints: number

        Count of control points in the edge record

      • numberOfFitData: number

        Count of fit points in the edge record

      • numberOfKnots: number

        Count of knots in the edge record

      • OptionalstartTangent?: null | { x: number; y: number; z?: number }

        Optional start tangent for fit-data edges

    Returns null | AcGeSpline3d

    A spline geometry, or null when neither representation can be built

  • Creates a 3D spline geometry that interpolates fit points.

    Knots and control points are generated from the fit data. Non-zero start/end tangents constrain the curve ends; zero-length tangents are ignored. Degree is clamped so that fitPoints.length + tangentCount >= degree + 1.

    Parameters

    • fitPoints: AcGeVector3dLike[]

      Points the spline should pass through

    • knotParam: AcGeKnotParameterizationType

      Knot parameterization ('Uniform', 'Chord', or 'SqrtChord')

    • declaredDegree: undefined | number

      Requested degree from the source file; defaults to 3 when missing or less than 1, then clamped to fit the available fit/tangent data

    • closed: boolean

      Whether the spline forms a closed loop

    • OptionalstartTangent: null | AcGeVector3dLike

      Optional start tangent direction; ignored when zero-length

    • OptionalendTangent: null | AcGeVector3dLike

      Optional end tangent direction; ignored when zero-length

    Returns null | AcGeSpline3d

    A spline geometry, or null if construction fails