/** @packageDocumentation * @module Curve */ import { BSplineCurve3d } from "../bspline/BSplineCurve"; import { BSplineCurve3dH } from "../bspline/BSplineCurve3dH"; import { NullGeometryHandler } from "../geometry3d/GeometryHandler"; import { Arc3d } from "./Arc3d"; import { CurveLocationDetail, CurveLocationDetailPair } from "./CurveLocationDetail"; import { CurvePrimitive } from "./CurvePrimitive"; import { GeometryQuery } from "./GeometryQuery"; import { LineSegment3d } from "./LineSegment3d"; import { LineString3d } from "./LineString3d"; /** * * Instances are initialized and called from CurveCurve. * * Constructor is told two geometry items A and B * * geometryB is saved for later reference * * type-specific handler methods will "see" geometry A repeatedly. * * Hence geometryA is NOT saved by the constructor. * @internal */ export declare class CurveCurveCloseApproachXY extends NullGeometryHandler { private _geometryB; private _circularArcB; private _circularRadiusB; private setGeometryB; /** approach larger than this is not interesting. * This is caller defined and can be undefined. */ private _maxDistanceToAccept; /** Squared max distance. This is private, and is forced to at least small metric distance squared */ private _maxDistanceSquared; private _results; private reinitialize; /** * @param _geometryA first curve for intersection. This is NOT saved. * @param geometryB second curve for intersection. Saved for reference by specific handler methods. */ constructor(_geometryA: GeometryQuery | undefined, geometryB: GeometryQuery | undefined); /** Access the (possibly undefined) max distance to accept. */ set maxDistanceToAccept(value: number | undefined); /** Set the (possibly undefined) max distance to accept. */ get maxDistanceToAccept(): number | undefined; /** Ask if the maxDistanceToAccept value is defined and positive */ get isMaxDistanceSet(): boolean; /** Reset the geometry and flags, leaving all other parts unchanged (and preserving accumulated intersections) */ resetGeometry(_geometryA: GeometryQuery, geometryB: GeometryQuery): void; private acceptFraction; /** * * Return the results structure for the intersection calculation, structured as an array of CurveLocationDetailPair * @param reinitialize if true, a new results structure is created for use by later calls. * */ grabPairedResults(reinitialize?: boolean): CurveLocationDetailPair[]; private sameCurveAndFraction; private testAndRecordPointPairApproach; /** compute intersection of two line segments. * filter by extension rules. * record with fraction mapping. */ private recordPointWithLocalFractions; /** * capture a close approach pair that has point and local fraction but not curve. * record with fraction mapping. */ private capturePairWithLocalFractions; /** * emit recordPoint for multiple pairs (on full curve!) * @param cpA first curve primitive. (possibly different from curve in detailA, but fraction compatible) * @param cpB second curve primitive. (possibly different from curve in detailA, but fraction compatible) * @param pairs array of pairs * @param reversed true to have order reversed in final structures. */ recordPairs(cpA: CurvePrimitive, cpB: CurvePrimitive, pairs: CurveLocationDetailPair[] | undefined, reversed: boolean): void; /** * record fully assembled (but possibly reversed) detail pair. * @param detailA first detail * @param detailB second detail * @param reversed true to have order reversed in final structures. */ captureDetailPair(detailA: CurveLocationDetail | undefined, detailB: CurveLocationDetail | undefined, reversed: boolean): void; /** * * @param fractionA * @param pointA * @param pointB0 * @param pointB1 * @param fractionB * @param minDistanceSquared * @param closestApproach */ private static updatePointToSegmentDistance; /** * Return fractions of close approach within minDistance between two line segments( a0,a1) and (b0, b1) * * minDistance is assumed positive * Return the fractional (not xy) coordinates in result.x, result.y * @param a0 start point of line a * @param a1 end point of line a * @param b0 start point of line b * @param b1 end point of line b * @param result point to receive fractional coordinates of intersection. result.x is fraction on line a. result.y is fraction on line b. */ private static segmentSegmentBoundedApproach; /** * Return fractions of close approach within minDistance between two line segments( a0,a1) and (b0, b1) * * minDistance is assumed positive * Return the fractional (not xy) coordinates in result.x, result.y * @param a0 start point of line a * @param a1 end point of line a * @param b0 start point of line b * @param b1 end point of line b * @param result point to receive fractional coordinates of intersection. result.x is fraction on line a. result.y is fraction on line b. */ private testAndRecordFractionalPairApproach; private testAndRecordProjection; /** compute intersection of two line segments. * filter by extension rules. * record with fraction mapping. * * The fraction mappings allow portions of a linestring to be passed here. */ private computeSegmentSegment3D; private dispatchSegmentSegment; private dispatchSegmentArc; private dispatchCircularCircularOrdered; /** Find the fractional point (if any) on an arc, known to be circular and displayed from the center in the direction of a scaled vector. * */ private resolveDirectionToArcXYFraction; private dispatchArcArc; private dispatchArcBsplineCurve3d; private dispatchBSplineCurve3dBSplineCurve3d; private static _workPointAA0; private static _workPointAA1; private static _workPointBB0; private static _workPointBB1; private static _workPointBB2; private static _workVectorA; /** low level dispatch of linestring with (beziers of) a bspline curve */ dispatchLineStringBSplineCurve(lsA: LineString3d, curveB: BSplineCurve3d, reversed: boolean): any; /** low level dispatch of linestring with (beziers of) a bspline curve */ dispatchSegmentBsplineCurve(lsA: LineSegment3d, curveB: BSplineCurve3d, reversed: boolean): any; /** Detail computation for segment approaching linestring. */ computeSegmentLineString(lsA: LineSegment3d, lsB: LineString3d, reversed: boolean): any; /** Detail computation for arcA intersecting lsB. */ computeArcLineString(arcA: Arc3d, lsB: LineString3d, reversed: boolean): any; private static _workPointB0; /** double dispatch handler for strongly typed segment.. */ handleLineSegment3d(segmentA: LineSegment3d): any; private computeLineStringLineString; /** double dispatch handler for strongly typed linestring.. */ handleLineString3d(lsA: LineString3d): any; /** double dispatch handler for strongly typed arc .. */ handleArc3d(arc0: Arc3d): any; /** double dispatch handler for strongly typed bspline curve .. */ handleBSplineCurve3d(curve: BSplineCurve3d): any; /** double dispatch handler for strongly typed homogeneous bspline curve .. */ handleBSplineCurve3dH(_curve: BSplineCurve3dH): any; } //# sourceMappingURL=CurveCurveCloseApproachXY.d.ts.map