UNPKG

@mlightcad/geometry-engine

Version:

The geometry-engine package provides comprehensive geometric entities, mathematical operations, and transformations for 2D and 3D space. This package mimics AutoCAD ObjectARX's AcGe (Geometry) classes and provides the mathematical foundation for CAD opera

99 lines 3.67 kB
import { AcGeBox3d, AcGeMatrix3d, AcGePoint3d, AcGePoint3dLike, AcGePointLike } from '../math'; import { AcGeCurve3d } from './AcGeCurve3d'; import { AcGeKnotParameterizationType, AcGeNurbsCurve } from './AcGeNurbsCurve'; export declare class AcGeSpline3d extends AcGeCurve3d { private _nurbsCurve; private _fitPoints?; private _knotParameterization?; private _controlPoints; private _closed; private _degree; constructor(controlPoints: AcGePoint3dLike[], knots: number[], weights?: number[], degree?: number, closed?: boolean); constructor(fitPoints: AcGePointLike[], knotParam: AcGeKnotParameterizationType, degree?: number, closed?: boolean); /** * Build the NURBS curve using stored data */ private buildCurve; /** * Set the closed property and rebuild the curve if necessary */ private setClosed; /** * Degree of the spline to be created. */ get degree(): number; get knotParameterization(): AcGeKnotParameterizationType | undefined; /** * The start point of this spline */ get startPoint(): AcGePoint3d; /** * The end point of this spline */ get endPoint(): AcGePoint3d; /** * @inheritdoc */ get length(): 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. * @param index Input index (0 based) of point to get * @returns */ getFitPointAt(index: number): AcGePoint3dLike; /** * 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. * @param index Input index (0 based) of point to get * @returns */ getControlPointAt(index: number): import("../math").AcGeVector3dLike; /** * Divide this spline into the specified nubmer of points * those points as an array of points. * @param numPoints Input the nubmer of points returned * @returns Return an array of point */ getPoints(numPoints?: number): AcGePoint3d[]; getCurvePoints(curve: AcGeNurbsCurve, count: number): number[][]; /** * @inheritdoc */ calculateBoundingBox(): AcGeBox3d; get closed(): boolean; set closed(value: boolean); /** * @inheritdoc */ transform(_matrix: AcGeMatrix3d): this; /** * Convert input points to points in NURBS format * @param points Input points to convert * @returns Return converted points */ private toNurbsPoints; /** * Convert input points to points in verb-nurbs-web format * @param points Input points to convert * @returns Return converted points */ private toVerbPoints; /** * Convert input points to points in geometry engine format * @param points Input points to convert * @returns Return converted points */ private toGePoints; /** * Create a closed spline from fit points using AcGeNurbsCurve.createClosedCurve * @param fitPoints - Array of fit points defining the curve * @param parameterization - Knot parameterization type for NURBS * @param degree - Optional degree of the spline (default: 3) * @returns A closed spline */ static createClosedSpline(fitPoints: AcGePoint3dLike[], parameterization?: AcGeKnotParameterizationType, degree?: number): AcGeSpline3d; } //# sourceMappingURL=AcGeSpline3d.d.ts.map