import { BufferGeometry, Line as TLine, Matrix3, Matrix4, Object3D, Vector2, Vector3 } from 'three';
import { Line2 } from 'three/examples/jsm/lines/Line2';
import { Status } from '../../Common/Status';
import { ObjectSnapMode } from '../../Editor/ObjectSnapMode';
import { Box3Ext } from '../../Geometry/Box';
import { IntersectOption } from '../../GraphicsSystem/IntersectWith';
import { RenderType } from '../../GraphicsSystem/RenderType';
import { CADFiler } from '../CADFiler';
import { Curve, ExtendType } from './Curve';
import { DragPointType } from './DragPointType';
export interface PolylineProps {
    pt: Vector2;
    bul: number;
}
export declare class Polyline extends Curve {
    private _LineData;
    private _ClosedMark;
    constructor(_LineData?: PolylineProps[]);
    UpdateMatrixTo(m: Matrix4): void;
    /**
     * 原地翻转,仅改变法向量
     */
    Flip(): this;
    Reverse(): this;
    set LineData(data: PolylineProps[]);
    get LineData(): PolylineProps[];
    get NumberOfVertices(): number;
    /**
     * 在指定位置插入点.
     * 例如:
     * pl.AddVertexAt(pl.NumberOfVerticesk,p);//在末尾插入一个点
     *
     * @param {number} index 索引位置
     * @param {Vector2} pt 点
     * @returns {this}
     * @memberof Polyline
     */
    AddVertexAt(index: number, pt: Vector2 | Vector2[]): this;
    RemoveVertexAt(index: number): this;
    RemoveVertexIn(from: number, to: number): this;
    /**
     * 重设闭合多段线的起点
     * @param index 起始index,如果index非整数,将用最接近的整数作为起始索引
     */
    ResetStartPoint(index: number): boolean;
    GetPoint2dAt(index: number): Vector2 | undefined;
    /**
     * 设置指定点的位置
     *
     * @param {number} index
     * @param {Vector2} pt
     * @memberof Polyline
     */
    SetPointAt(index: number, pt: Vector2): this;
    protected ApplyScaleMatrix(m: Matrix4): this;
    protected ApplyMirrorMatrix(m: Matrix4): this;
    SetBulgeAt(index: number, bul: number): this;
    GetBuilgeAt(index: number): number;
    Rectangle(length: number, height: number): this;
    RectangleFrom2Pt(p1: Vector3, p2: Vector3): this;
    get StartPoint(): Vector3;
    set StartPoint(p: Vector3);
    get EndPoint(): Vector3;
    set EndPoint(p: Vector3);
    get CurveCount(): number;
    get StartParam(): number;
    /**
     * 表示最后一条曲线的终止参数,使用该参数可以直接遍历到多段线的所有子线段. for(i<EndParam)...
     */
    get EndParam(): number;
    get Area2(): number;
    get Area(): number;
    get CloseMark(): boolean;
    get IsClose(): boolean;
    set CloseMark(v: boolean);
    DigestionCloseMark(): void;
    get Length(): number;
    /**
     * 获得指定参数所在的点.
     * 当曲线存在闭合标志时,参数必须在曲线内部.
     * 当曲线不存在闭合标志时,参数允许延伸出曲线.
     *
     * @param {number} param 参数
     * @returns {Vector3} 三维点,可为空
     * @memberof Polyline
     */
    GetPointAtParam(param: number): Vector3;
    GetDistAtParam(param: number): number;
    GetPointAtDistance(dist: number): Vector3;
    /**
     * 返回参数所在的点. 如果曲线不闭合,会试图返回延伸点参数
     *
     * @param {Vector3} pt
     * @returns {number}
     * @memberof Polyline
     */
    GetParamAtPoint(pt: Vector3): number;
    GetParamAtDist(dist: number): number;
    GetDistAtPoint(pt: Vector3): number;
    /**
     * 返回曲线的一阶导数.
     * 当曲线闭合(标志)且点不在曲线上.
     * 或者曲线不闭合(标志) 且点不在曲线上也不在延伸上
     *
     * @param {(number | Vector3)} param
     * @returns {Vector3}
     * @memberof Polyline
     */
    GetFistDeriv(param: number | Vector3): Vector3;
    GetSplitCurves(param: number[] | number): Array<Polyline>;
    GetCurveAtParamRange(startParam: number, endParam: number): Array<Curve>;
    Extend(newParam: number): void;
    MatrixAlignTo2(toMatrix: Matrix4): {
        pts: Vector2[];
        buls: number[];
    };
    Join(cu: Curve, allowGap?: boolean, tolerance?: number): Status.False | Status.True;
    /**
     * 将曲线数组组合成多段线
     * @param curves 已经使用CurveLinked的数组,总是首尾相连
     * @returns
     */
    static Combine(curves: Curve[], tolerance?: number): Polyline | undefined;
    /**首尾相连的曲线直接连接 */
    static FastCombine(curves: Curve[], tolerance?: number): Polyline | undefined;
    PtOnCurve(pt: Vector3): boolean;
    PtOnCurve3(p: Vector3, fuzz?: number): boolean;
    PtInCurve(pt: Vector3): boolean;
    GetClosestPointTo(pt: Vector3, extend: boolean): Vector3;
    GetClosestPointTo2(pt: Vector3, extType: ExtendType): Vector3;
    GetOffsetCurves(offsetDist: number): Polyline[];
    GetFeedingToolPath(offsetDist: number, offsetDistSq?: number): Polyline[];
    /**
     * 分解
     */
    Explode(): Curve[];
    /**
     * 根据参数得到参数所在的子曲线.
     *
     * 当曲线存在闭合标志时,参数必须在曲线内部,否则返回空.
     *
     * @param {number} param 参数值
     * @returns {Curve} 曲线(直线或者圆弧) 或空
     * @memberof Polyline
     */
    GetCurveAtParam(param: number): Curve;
    /**
     * 得到参数在子曲线中的表示
     *
     * @param {number} param 参数在多段线中表示
     * @returns {number} 参数在子曲线中表示
     * @memberof Polyline
     */
    GetCurveParamAtParam(param: number): number;
    /**
     * 获得曲线,来自索引位置.
     * @param {number} i 索引位置 整数
     */
    GetCurveAtIndex(i: number): Curve;
    IntersectWith2(curve: Curve, intType: IntersectOption, tolerance?: number): import("../../GraphicsSystem/IntersectWith").IntersectResult[];
    IntersectSelf(): number[];
    IsIntersectSelf(): boolean;
    get BoundingBox(): Box3Ext;
    /**
     * 得到曲线有用的点表和凸度(闭合曲线首尾重复)
     */
    get PtsBuls(): {
        pts: Vector2[];
        buls: number[];
    };
    get IsBulge(): boolean;
    get Shape(): import("three").Shape;
    get SVG(): string;
    InitDrawObject(renderType?: RenderType): Line2 | TLine<BufferGeometry, import("three").LineBasicMaterial>;
    UpdateDrawObject(type: RenderType, en: Object3D): void;
    GetDragPointCount(drag: DragPointType): number;
    GetObjectSnapPoints(snapMode: ObjectSnapMode, pickPoint: Vector3, lastPoint: Vector3, viewXform?: Matrix3): Vector3[];
    GetGripPoints(): Array<Vector3>;
    MoveGripPoints(indexList: number[], moveVec: Vector3): void;
    GetStretchPoints(): Vector3[];
    /**
     * 范围拉伸(stretch),对夹点进行拉伸.
     * 如果对圆弧的一侧进行拉伸,那么修改bul
     *
     * @param {Array<number>} indexList
     * @param {Vector3} vec
     */
    MoveStretchPoints(indexList: Array<number>, vec: Vector3): void;
    protected _ReadFile(file: CADFiler): void;
    WriteFile(file: CADFiler): void;
}
export declare const TempPolyline: Polyline;
//# sourceMappingURL=Polyline.d.ts.map