/** @packageDocumentation * @module Bspline */ import { Clipper } from "../clipping/ClipUtils"; import { AnnounceNumberNumberCurvePrimitive } from "../curve/CurvePrimitive"; import { GeometryQuery } from "../curve/GeometryQuery"; import { ProxyCurve } from "../curve/ProxyCurve"; import { GeometryHandler } from "../geometry3d/GeometryHandler"; import { Point3d, Vector3d } from "../geometry3d/Point3dVector3d"; import { Transform } from "../geometry3d/Transform"; import { XYZProps } from "../geometry3d/XYZProps"; import { BSplineCurve3d } from "./BSplineCurve"; /** * fitPoints and end condition data for [[InterpolationCurve3d]] * * This is a "json compatible" version of [[InterpolationCurve3dOptions]] * @public */ export interface InterpolationCurve3dProps { /** The order of the computed B-spline curve (one more than its degree). */ order?: number; /** Whether the B-spline construction should be periodic. Default is `false`. */ closed?: boolean; /** If closed and no knots, compute chord length knots (1) or uniform knots (0, default). Chord length knots give best fit. */ isChordLenKnots?: number; /** If !closed but first and last fitPoints are equal, pivot computed start/end tangent(s) so that they are colinear (1) or leave them be (0, default). */ isColinearTangents?: number; /** If !closed and start/endTangent is defined, set its magnitude to the first/last fit point chord length (1) or to the magnitude of the Bessel tangent (0, default). Bessel gives best fit. */ isChordLenTangents?: number; /** If !closed and start/endTangent is `undefined`, compute it using the natural end condition (1) or Bessel (0, default). Bessel gives best fit. */ isNaturalTangents?: number; /** Optional start tangent, pointing into curve. Magnitude is ignored. */ startTangent?: XYZProps; /** Optional end tangent, pointing into curve. Magnitude is ignored. */ endTangent?: XYZProps; /** Points that the curve must pass through. */ fitPoints: XYZProps[]; /** Optional parameters for curve fitting, one per fit point. If `undefined`, knots are computed. */ knots?: number[]; } /** * fitPoints and end condition data for [[InterpolationCurve3d]] * * This is a "typed object" version of the serializer-friendly [[InterpolationCurve3dProps]] * * Typical use cases rarely require all parameters, so the constructor does not itemize them as parameters. * @public */ export declare class InterpolationCurve3dOptions { /** * Constructor. * @param fitPoints points to CAPTURE * @param knots array to CAPTURE */ constructor(fitPoints?: Point3d[], knots?: number[]); private _order?; private _closed?; private _isChordLenKnots?; private _isColinearTangents?; private _isChordLenTangents?; private _isNaturalTangents?; private _startTangent?; private _endTangent?; private _fitPoints; private _knots?; /** `order` as property */ get order(): number; set order(val: number); /** `closed` as property */ get closed(): boolean; set closed(val: boolean); /** `isChordLenKnots` as property */ get isChordLenKnots(): number; set isChordLenKnots(val: number); /** `isColinearTangents` as property */ get isColinearTangents(): number; set isColinearTangents(val: number); /** `isChordLenTangents` as property */ get isChordLenTangents(): number; set isChordLenTangents(val: number); /** `isNaturalTangents` as property */ get isNaturalTangents(): number; set isNaturalTangents(val: number); /** access POSSIBLY UNDEFINED start tangent. Setter CAPTURES. */ get startTangent(): Vector3d | undefined; set startTangent(val: Vector3d | undefined); /** access POSSIBLY UNDEFINED end tangent. Setter CAPTURES. */ get endTangent(): Vector3d | undefined; set endTangent(val: Vector3d | undefined); /** access POINTER TO fit points. Setter CAPTURES. */ get fitPoints(): Point3d[]; set fitPoints(val: Point3d[]); /** access POSSIBLY UNDEFINED knots array. Setter CAPTURES. */ get knots(): number[] | undefined; set knots(val: number[] | undefined); /** One step setup of properties not named in constructor. * * CAPTURE pointers to tangents. * * OPTIONALLY downgrade "0" values to undefined. */ captureOptionalProps(order: number | undefined, closed: boolean | undefined, isChordLenKnots: number | undefined, isColinearTangents: number | undefined, isChordLenTangent: number | undefined, isNaturalTangents: number | undefined, startTangent: Vector3d | undefined, endTangent: Vector3d | undefined): void; /** Clone with strongly typed members reduced to simple json, with "undefined" members omitted */ cloneAsInterpolationCurve3dProps(): InterpolationCurve3dProps; /** Clone with strongly typed members reduced to simple json. */ clone(): InterpolationCurve3dOptions; /** Clone with strongly typed members reduced to simple json. */ static create(source: InterpolationCurve3dProps): InterpolationCurve3dOptions; /** Vector equality test, with the additional rule that the zero vector matches undefined. */ private static areAlmostEqualAllow000AsUndefined; /** Whether the two options are equivalent or both undefined. */ static areAlmostEqual(dataA: InterpolationCurve3dOptions | undefined, dataB: InterpolationCurve3dOptions | undefined): boolean; /** reverse the order or sense of all start-to-end related properties. */ reverseInPlace(): void; } /** * Interpolating curve. * * Derive from [[ProxyCurve]] * * Use a [[BSplineCurve3d]] as the proxy * * * @public */ export declare class InterpolationCurve3d extends ProxyCurve { /** String name for schema properties. */ readonly curvePrimitiveType = "interpolationCurve"; private _options; /** CAPTURE properties and proxy curve. */ private constructor(); /** Second step of double dispatch: call `handler.handleInterpolationCurve3d(this)` */ dispatchToGeometryHandler(handler: GeometryHandler): any; /** * Create an [[InterpolationCurve3d]] based on points, knots, and other properties in the [[InterpolationCurve3dProps]] or [[InterpolationCurve3dOptions]]. * * This saves a COPY OF the options or props. * * Use createCapture () if the options or props can be used without copy */ static create(options: InterpolationCurve3dOptions | InterpolationCurve3dProps): InterpolationCurve3d | undefined; /** * Create an [[InterpolationCurve3d]] * * The options object is captured into the new curve object (not copied) */ static createCapture(options: InterpolationCurve3dOptions): InterpolationCurve3d | undefined; /** Return the (pointer to) the proxy B-spline curve. */ get proxyCurve(): BSplineCurve3d; /** Return a (copy of) the defining points, packed as a Float64Array */ copyFitPointsFloat64Array(): Float64Array; /** * Return json key-value pairs for for this [[InterpolationCurve3d]]. * @returns */ toJSON(): any; /** Clone the [[InterpolationCurve3dProps]] object in this [[InterpolationCurve3d]] */ cloneProps(): InterpolationCurve3dProps; /** return the options pointer */ get options(): InterpolationCurve3dOptions; /** * Reverse the curve direction. * * This updates both the defining properties and the proxy bspline. */ reverseInPlace(): void; /** * Transform this [[InterpolationCurve3d]] and its defining data in place */ tryTransformInPlace(transform: Transform): boolean; /** * Find intervals of this CurvePrimitive that are interior to a clipper. * * This implementation simply passes the call to the proxy curve. * @param clipper clip structure (e.g. clip planes). * @param announce (optional) function to be called announcing fractional intervals of the input curve. * @returns true if any "in" segments are announced. */ announceClipIntervals(clipper: Clipper, announce?: AnnounceNumberNumberCurvePrimitive): boolean; /** Return a deep clone */ clone(): InterpolationCurve3d; /** Return a transformed clone. */ cloneTransformed(transform: Transform): InterpolationCurve3d; /** Test if this [[InterpolationCurve3d]] is almost equal to another GeometryQuery object. */ isAlmostEqual(other: GeometryQuery): boolean; /** Test if `other` is also an [[InterpolationCurve3d]] */ isSameGeometryClass(other: GeometryQuery): boolean; } //# sourceMappingURL=InterpolationCurve3d.d.ts.map