/** @packageDocumentation
 * @module CartesianGeometry
 */
import { VariantCurveExtendParameter } from "../curve/CurveExtendMode";
import { CurveLocationDetailPair } from "../curve/CurveLocationDetail";
import { IndexedXYZCollection } from "./IndexedXYZCollection";
import { Plane3dByOriginAndUnitNormal } from "./Plane3dByOriginAndUnitNormal";
import { Point3d } from "./Point3dVector3d";
import { Range1d } from "./Range";
/**
 * PolylineOps is a collection of static methods operating on polylines.
 * @public
 */
export declare class PolylineOps {
    /**
     * Return a Range1d with the shortest and longest edge lengths of the polyline.
     * @param points points to examine.
     */
    static edgeLengthRange(points: Point3d[]): Range1d;
    /**
     * Return a simplified subset of given points.
     * * Points are removed by the Douglas-Puecker algorithm, viz https://en.wikipedia.org/wiki/Ramer–Douglas–Peucker_algorithm
     * * This is a global search, with multiple passes over the data.
     * @param source input points.
     * @param chordTolerance Points less than this distance from a retained edge may be ignored.
     * Default is [[Geometry.smallMetricDistance]].
     * @param keepSeam whether to preserve the endpoints of physically closed input.
     * Default is false, meaning physically closed input points are treated cyclically, allowing removal of the seam.
     */
    static compressByChordError(source: Point3d[], chordTolerance?: number, keepSeam?: boolean): Point3d[];
    /**
     * Return a simplified subset of given points, omitting a point if very close to its predecessor.
     * * This is a local search, with a single pass over the data.
     * * First and last points are always retained.
     * @param source input points
     * @param maxEdgeLength length of largest edge to be compressed out
     * @see [[GrowableXYZArray.cloneCompressed]]
     */
    static compressShortEdges(source: Point3d[] | IndexedXYZCollection, maxEdgeLength: number): Point3d[];
    /**
     * Return a simplified subset of given points, omitting the middle of three successive points if the triangle they form is small.
     * * This is a local search, with a single pass over the data.
     * @param source input points
     * @param maxTriangleArea area of largest triangle to compress
     */
    static compressSmallTriangles(source: Point3d[], maxTriangleArea: number): Point3d[];
    /**
     * Return a simplified subset of given points, omitting points if close to the edge between neighboring points before and after
     * * This is a local search, with a single pass over the data for each pass.
     * @param source input points
     * @param maxDistance omit points if this close to edge between points before and after
     * @param numPass max number of times to run the filter.  numPass=2 is observed to behave well.
     *
     */
    static compressByPerpendicularDistance(source: Point3d[], maxDistance: number, numPass?: number): Point3d[];
    private static squaredDistanceToInterpolatedPoint;
    /**
     * test if either
     *   * points[indexA] matches pointQ
     *   * line from points[indexA] to points[indexB] overlaps points[indexA] to pointQ
     * @param points
     * @param pointQ
     * @param tolerance
     */
    private static isDanglerConfiguration;
    /**
       * Return a simplified subset of given points, omitting points on "danglers" that depart and return on a single path.
       * @param source input points
       * @param closed if true, an edge returning to point 0 is implied even if final point does not match.
       * @param tolerance tolerance for near-zero distance.
       */
    static compressDanglers(source: Point3d[], closed?: boolean, tolerance?: number): Point3d[];
    /**
     * Add closure points to a polyline or array of polylines
     * @param data points.
     */
    static addClosurePoint(data: Point3d[] | Point3d[][]): void;
    /**
     * Remove closure points of a polyline or array of polylines
     * @param data points.
     */
    static removeClosurePoint(data: Point3d[] | Point3d[][]): void;
    /**
     * Create an array of planes.
     * * First plane has origin at first centerline point, with unit normal directed at the next point.
     * * Intermediate planes have origin at intermediate points, with unit normals computed from the average of unit vectors
     *   along the incoming and outgoing segments.
     * * Last plane has origin at last centerline point, with unit normal directed from previous point.
     * * All sets of adjacent coincident points are reduced to a single point.
     *    * Hence the output array may have fewer points than the centerline.
     * * If there are one or fewer distinct input points, the return is undefined.
     * @param centerline points to reside in output planes.
     * @param wrapIfPhysicallyClosed if true and the first and last centerline points are the same, then the first and last
     * output planes are averaged and equated (cloned). Default false.
     */
    static createBisectorPlanesForDistinctPoints(centerline: IndexedXYZCollection | Point3d[], wrapIfPhysicallyClosed?: boolean): Plane3dByOriginAndUnitNormal[] | undefined;
    private static _workSegmentA?;
    private static _workSegmentB?;
    private static _workLocalDetailPair?;
    /**
     * Find smallest distance between polylines.
     * * For polylines with many points, it is more efficient to use [[LineString3dRangeTreeContext.searchForClosestApproach]].
     * @param pointsA first polyline
     * @param extendA how to extend polylineA forward/backward
     * @param pointsB second polyline
     * @param extendB how to extend polylineB forward/backward
     * @param dMax largest approach distance to consider
     * @param result optional pre-allocated object to populate and return
     * @returns pair of details, one for each polyline, with field values:
     * * `a` is the closest approach distance
     * * `point` is the point of closest approach
     * * `fraction` is the global polyline fraction
     * * `childDetail.a` is the segment index
     * * `childDetail.fraction` is the local segment fraction
     */
    static closestApproach(pointsA: Point3d[] | IndexedXYZCollection, extendA: VariantCurveExtendParameter, pointsB: Point3d[] | IndexedXYZCollection, extendB: VariantCurveExtendParameter, dMax?: number, result?: CurveLocationDetailPair): CurveLocationDetailPair | undefined;
    /**
     * Checks if all points are colinear.
     * * This test does not take point order into account.
     * @param points array of points to check.
     * @param distanceTol maximum allowable distance that geometry can deviate from colinearity.Default is [[Geometry.smallMetricDistance]].
     * @param xyOnly whether to ignore z-coordinates in the colinearity test.
     */
    static isColinear(points: Point3d[], distanceTol?: number, xyOnly?: boolean): boolean;
}
//# sourceMappingURL=PolylineOps.d.ts.map