Hierarchy

  • AcGeCurve3d
    • AcGeSpline3d

Constructors

Properties

_boundingBoxNeedsUpdate: boolean

Accessors

  • get area(): number
  • The area enclosed by this spline. Open splines return 0.

    Returns number

  • 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 degree(): number
  • Degree of the spline to be created.

    Returns number

  • get endPoint(): AcGePoint3d
  • The end point of this spline

    Returns AcGePoint3d

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

  • get knots(): number[]
  • Returns number[]

  • get length(): number
  • Returns number

  • get startPoint(): AcGePoint3d
  • The start point of this spline

    Returns AcGePoint3d

  • get weights(): number[]
  • Returns number[]

Methods

  • Returns AcGeBox3d

  • Return a deep-cloned copy of this spline.

    Returns AcGeSpline3d

  • Evaluates this spline at the given parameter value.

    Parameters

    • t: number

      Parameter along the knot vector.

    Returns AcGePoint3d

  • 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

  • Parameters

    Returns number[][]

  • 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

  • Samples the spline for planar offset using analytic NURBS tangents and curvature-adaptive parameter refinement.

    Parameters

    • offsetDist: number

    Returns { points: AcGePoint2d[]; tangents: AcGePoint2d[] }

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

    Parameters

    • OptionalnumPoints: number

      Input the nubmer of points returned

    Returns AcGePoint3d[]

    Return an array of point

  • Returns the nearest point on this spline to the given point.

    Parameters

    • point: AcGeVector3dLike

      Query point in WCS.

    • Optionalsamples: number

      Number of interior samples used by the underlying NURBS curve.

    Returns AcGePoint3d

  • Parameters

    Returns this

  • Return new shape translated by given vector. Translation vector may be also defined by a pair of numbers.

    Parameters

    Returns AcGeShape3d

  • Create a closed spline from fit points using AcGeNurbsCurve.createClosedCurve

    Parameters

    • fitPoints: AcGeVector3dLike[]

      Array of fit points defining the curve

    • Optionalparameterization: AcGeKnotParameterizationType

      Knot parameterization type for NURBS

    • Optionaldegree: number

      Optional degree of the spline (default: 3)

    Returns AcGeSpline3d

    A closed spline

  • 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