import Geom3 from '@jscad/modeling/src/geometries/geom3/type';
import { BufferGeometry, Frustum, Geometry, Matrix3, Matrix4, Object3D, ShapeBufferGeometry, UVGenerator, Vector3 } from 'three';
import { ArcBoardBuild } from '../../Add-on/ArcBoard/ArcBoardBuild';
import { ArcBoardOptions } from '../../Add-on/ArcBoard/ArcBoardFeeding';
import { SplitBoardSide2DPathUtil } from '../../Add-on/BoardCutting/SplitBoardSide2DPathUtil';
import { SplitBoardSideModelUtil } from '../../Add-on/BoardCutting/SplitBoardSideModel';
import { FaceDirection } from "../../Add-on/DrawDrilling/DrillType";
import { ObjectSnapMode } from '../../Editor/ObjectSnapMode';
import { Box3Ext } from '../../Geometry/Box';
import { RenderType } from '../../GraphicsSystem/RenderType';
import { BoardProcessOption } from "../../UI/Store/OptionInterface/BoardProcessOption";
import { CADFiler } from '../CADFiler';
import { CADObject } from '../CADObject';
import { ObjectId } from '../ObjectId';
import { Shape } from '../Shape';
import { ArcBoardFeedProcess } from './ArcBoardType';
import { BoardOpenDir, BoardType } from './BoardInterface';
import { Circle } from './Circle';
import { DragPointType } from './DragPointType';
import { ExtrudeContourCurve, ExtrudeSolid } from './Extrude';
import { Polyline } from './Polyline';
/** 是否为大孔 */
export declare function IsBigHole(ent: CADObject): boolean;
export interface IModeling {
    shape: Shape;
    thickness: number;
    dir: FaceDirection;
    knifeRadius: number;
    addLen: number;
    addWidth?: number;
    addDepth?: number;
}
export interface IKnifeInfo {
    angle: number;
    radius: number;
    id: string;
    name: string;
}
export interface I2DModeingItem {
    depth: number;
    depthExpr: string;
    offset: number;
    knife: IKnifeInfo;
}
export interface I2DModeling {
    path: Polyline;
    dir: FaceDirection;
    items: I2DModeingItem[];
}
export interface IPathItem {
    pt: Vector3;
    bul: number;
}
export interface I3DModeling {
    path: IPathItem[];
    dir: FaceDirection;
    knife: IKnifeInfo;
}
export interface ObjectIdArr extends Array<ObjectId> {
    Name?: string;
}
/**
 * 板件实体
 */
export declare class Board extends ExtrudeSolid {
    protected HasEdgeRenderType: boolean;
    protected HasPlaceFaceRenderType: boolean;
    protected HasBigHoleFaceRenderType: boolean;
    private _Rotation;
    private _BoardType;
    private _Name;
    private _BoardProcessOption;
    private _DrillList;
    private _LayerNails;
    private _HWDrillList;
    RelativeHardware: ObjectId[];
    private _OpenDir;
    RelativeHandle: ObjectId[];
    private _IsChaiDan;
    private _2DModelingList;
    private _Side2DModelingMap;
    private _3DModelingList;
    private _SideModelingMap;
    private _CustomNumber;
    private _DrillLock;
    private _DrillAssociationLock;
    AlignLineObject: ObjectId;
    private _SweepPath;
    private _SweepAngle;
    /** 见光面 */
    private _SweepVisibleFace;
    _SweepArcBoardBuild: ArcBoardBuild;
    private _ArcBoardOptions;
    private _isDrawArcGroove;
    arcBoardFeedProcess: ArcBoardFeedProcess;
    protected bevelEnabled: boolean;
    private _KnifePolylineMap;
    private _SideKnifePolylineMap;
    private _jigSweepPath;
    private _jigPath2WCSMtx;
    constructor();
    get BoundingBoxInOCS(): Box3Ext;
    get BoundingBox(): Box3Ext;
    get IsDrawArcGroove(): boolean;
    set IsDrawArcGroove(v: boolean);
    /**
     * path 发生改变，更新圆弧配置
     * @param {{ key: number, arc: Arc; }[]} oldArcs 旧圆弧和对应的board options key
     * @param {Polyline} nPath 新路径（未进行起点偏移）
     * @return {*}  {void}
     */
    private UpdateArcBoardOptionsByPath;
    get ArcBoardOptions(): Map<number, ArcBoardOptions>;
    set ArcBoardOptions(opt: Map<number, ArcBoardOptions>);
    UpdateArcBoardOptions(param?: number): void;
    get IsArcBoard(): boolean;
    get ArcBuild(): ArcBoardBuild;
    SetSweepPath(path: Polyline, sweepAngle: number): void;
    private _FixContourByArcSweepPath_Ing;
    FixContourByArcSweepPath(): void;
    FixArcSweepPathLength(): void;
    ParseBoardLengthInArcSweep(): number;
    ClearSweepPath(): void;
    GetSweepPath(): Polyline;
    GetSweepPathInWCS(): Polyline;
    GetSweepPath1InWCS(): Polyline;
    GetSweepPath2InWCS(): Polyline;
    /** 获取见光面 */
    get SweepVisibleFace(): FaceDirection;
    /** 设置见光面 */
    set SweepVisibleFace(dir: FaceDirection);
    get SweepAngle(): number;
    set SweepAngle(v: number);
    AdjustPath(br: Board, outline: Polyline | Circle): void;
    AdjustPosition(br: Board, basePoint: Vector3): void;
    AdjustBasePoint(oldBasePoint: Vector3, oldPathWCS: Polyline): void;
    /**
     * 创建一个代理数组,数组改变时被监听
     */
    private CreateArray;
    private InitBoardData;
    InitBoard(length: number, width: number, thickness: number, boardType?: BoardType): this;
    static CreateBoard(length: number, width: number, thickness: number, boardType?: BoardType): Board;
    get DrillList(): Map<ObjectId<CADObject>, ObjectIdArr[]>;
    get DrillLock(): boolean;
    set DrillLock(v: boolean);
    get isDrillAssociationLock(): boolean;
    get DrillAssociationLock(): Set<ObjectId>;
    AppendDrillAssociationLock(o: ObjectId): void;
    ClearDrillAssociationLock(o: ObjectId): void;
    ClearAllAssociDrillLock(): void;
    get LayerNails(): ObjectId<CADObject>[];
    AppendNails(ids: ObjectId[]): void;
    ClearLayerNails(): void;
    get HWDrillList(): ObjectIdArr[];
    AppendHWDrillList(ids: ObjectIdArr[]): void;
    ClearHWDrillList(): void;
    private _CustomNumberTextEntity;
    private _AsyncIngTextEntity;
    get CustomNumber(): number | null;
    set CustomNumber(n: number | null);
    /**
     * 你可以安心的修改它,这样会直接影响到板件,因为板件对这个对象添加了代理.
     */
    get BoardProcessOption(): BoardProcessOption;
    set BoardProcessOption(obj: BoardProcessOption);
    get NeedUpdateRelevanceGroove(): boolean;
    GetRelevanceKnifes(knifs: ExtrudeSolid[]): void;
    ClearRelevance(en?: ExtrudeSolid): void;
    get SplitBoards(): this[];
    get ArcBoardModeling(): IModeling[];
    get BoardModeling(): IModeling[];
    set BoardModeling(models: IModeling[]);
    get Modeling2D(): I2DModeling[];
    set Modeling2D(ms: I2DModeling[]);
    get Side2DModelingMap(): Map<number, I2DModeling[]>;
    set Side2DModelingMap(map: Map<number, I2DModeling[]>);
    get Modeling3D(): I3DModeling[];
    set Modeling3D(ms: I3DModeling[]);
    get SideModelingMap(): Map<number, ExtrudeSolid[]>;
    set SideModelingMap(sideModelingMap: Map<number, ExtrudeSolid[]>);
    get AllSideModelGrooveMap(): Map<number, ExtrudeSolid[]>;
    ClearSideModeling(): void;
    ClearModeling2DList(): void;
    ClearSideModeling2DList(): void;
    ClearModeling3DList(): void;
    get IsChaiDan(): boolean;
    set IsChaiDan(v: boolean);
    get OpenDir(): BoardOpenDir;
    set OpenDir(v: BoardOpenDir);
    ClearBoardModeling(): void;
    /**
     * 注意传入的排钻列表,避免指针被引用
     */
    AppendDrillList(k: ObjectId, drs: ObjectIdArr[]): void;
    ClearDrillList(k: ObjectId): void;
    ClearAllDrillList(): void;
    Erase(isErase?: boolean): void;
    get RotateMat(): Matrix4;
    get Height(): number;
    set Height(v: number);
    get Width(): number;
    set Width(v: number);
    get Thickness(): number;
    set Thickness(thickness: number);
    get BoardType(): BoardType;
    set BoardType(type: BoardType);
    SetBoardType(type: BoardType): void;
    get MinPoint(): Vector3;
    get MaxPoint(): Vector3;
    get IsRect(): boolean;
    get IsSpecialShape(): boolean;
    get HasGroove(): boolean;
    get Name(): string;
    set Name(n: string);
    private UpdateSplitBoardSideModelUtil;
    private _SplitBoardSideModelUtil;
    get SplitBoardSideModelUtil(): SplitBoardSideModelUtil;
    private UpdateSplitBoardSide2DModelUtil;
    private _SplitBoardSide2DModelUtil;
    get SplitBoardSide2DModelUtil(): SplitBoardSide2DPathUtil;
    GeneralRectContour(): void;
    /**
     * 板件的轮廓,在板件坐标系中的表现方式.
     */
    get ContourCurve(): ExtrudeContourCurve;
    set ContourCurve(newContour: ExtrudeContourCurve);
    Explode(): import("./Region").Region[];
    /**
     * 在不改变Normal和实体显示的情况下,修改X轴的指向
     * @param xAxis
     */
    SetXAxis(xAxis: Vector3, isKeepLines?: boolean): this;
    RotateBoard(rox: number, roy: number, roz: number): void;
    /**实际上这个值可能被改变,应该适当的去校验它(仅在重新设计模块时,这个值会被改变!) */
    get Rotation(): {
        x: number;
        y: number;
        z: number;
    };
    protected ApplyMirrorMatrix(m: Matrix4): this;
    get UCGenerator(): UVGenerator;
    UpdateUV(geo: Geometry, ocs: Matrix4, isRev?: boolean): void;
    UpdateUvFull(): void;
    CopyFrom(obj: Board): void;
    Clone(cloneDraw?: boolean): this;
    Join(target: this): import("../../Common/Status").Status;
    private GetLinesDir;
    private GetLinesOpenDir;
    get KnifePolylineMap(): Map<string, Polyline>;
    set KnifePolylineMap(map: Map<string, Polyline>);
    get SideKnifePolylineMap(): Map<string, Polyline>;
    set SideKnifePolylineMap(map: Map<string, Polyline>);
    private _3DPathObject;
    Clear3DPathCache(): void;
    private Get3DPathDrawObject;
    Clear2DPathCache(): void;
    ClearSide2DPathCache(): void;
    _2DPathCsgs: Geom3[];
    _2DPathDrawObject: Object3D;
    _Side2DPathCsgs: Geom3[];
    _Side2DPathDrawObject: Object3D;
    /**
     * 这个函数生成了二维刀路的csg数组,并且同时生成了_2DPathDrawObject(二维刀路提刀线框显示对象)
     */
    Get2DPathCsgs(): Geom3[];
    GetSide2DPathCsgs(): Geom3[];
    _SideModeingCsgs: Geom3[];
    _SpiltBoardSideModeingCsgs: Geom3[];
    GetSideModeingCsgs(): Geom3[];
    ClearSideModelingCache(): void;
    get HasSideModel(): boolean;
    private _asyncSideModelIng;
    get AsyncSideModeling(): boolean;
    get Has2DPath(): boolean;
    get HasSide2DPath(): boolean;
    private _workerCalcedGeom;
    private _async2DPathIng;
    get Async2DPathing(): boolean;
    GoodBye(): void;
    private _Promise2DPathRes;
    private _2DPathBuildPromise;
    Load2DPathPromise(): Promise<boolean>;
    private UpdateOriginEntGeom;
    UpdateMeshGeom(geo: Geometry): BufferGeometry;
    /**
     * 轮廓上的点 =》 板上的点(支持平板和圆弧板)
     * @param pt 轮廓上的点 ocs_pt 将被修改
     * @returns 板上的点 wcs
     */
    ContourPt2BoardPt(pt: Vector3): Vector3;
    HandleSplitEntities(splitEntities: this[], oriBr?: this): void;
    private BuildArcGeometry;
    private _HasBigHole;
    private _BigHoleFace;
    /** 该板件是否有大孔 */
    get HasBigHole(): boolean;
    /** 更新板件是否有大孔 */
    UpdateThisHasBigHole(): void;
    InitDrawObject(renderType?: RenderType): Object3D;
    UpdateDrawGeometry(): void;
    UpdateDrawObject(renderType: RenderType, obj: Object3D): Object3D;
    private DrawAsyncText;
    private get PlaceColor();
    private GetPlaceFace;
    /** 获取大孔面的几何体 */
    get BigHoleFaceGeo(): ShapeBufferGeometry;
    private GetBigHoleFace;
    OffsetPathCache: Map<Polyline, {
        [key: string]: Polyline;
    }>;
    /**
     * 根据板的信息修改绘制的实体
     *  1.非拆单板 灰色
     *  2.纹路 开门方向纹路
     *  3.二维 三维刀路
     */
    private UpdateDrawObjectByBoardInfo;
    UpdateDrawObjectMaterial(renderType: RenderType, obj: Object3D): void;
    CheckSealing(obj: Object3D): void;
    private AddSideModelGripPoints;
    private AddSide2DModelPathGripPoints;
    GetStrectchGroovePointCountList(dragType: DragPointType): number[];
    GetStrectch2DModelPathPointCountList(dragPointType: DragPointType): number[];
    GetGripPoints(): Vector3[];
    private MapToArcPoints;
    MoveGripPoints(indexList: number[], vec: Vector3): void;
    GetStretchPoints(): Vector3[];
    MoveStretchPoints(indexList: Array<number>, vec: Vector3): void;
    private MoveSide2DModelPath;
    GetObjectSnapPoints(snapMode: ObjectSnapMode, pickPoint: Vector3, lastPoint: Vector3, viewXform?: Matrix3, frustum?: Frustum): Vector3[];
    private MoveArcBoardPoints;
    private GetOffsetVecAlongPath;
    /**
     * @private 通过新旧轮廓的Bondingbox修正路径
     * @param {Box3Ext} newBox 路径坐标系下，新轮廓的Bondingbox
     * @param {Box3Ext} oldBox 路径坐标系下，旧轮廓的Bondingbox
     * @param {Polyline} path 见光面路径
     * @return {*}  {Polyline} 修正好的路径
     */
    private FixSweepPathByContourBondingbox;
    DeferUpdate(): void;
    protected _ReadFile(file: CADFiler): void;
    WriteFile(file: CADFiler): void;
}
//# sourceMappingURL=Board.d.ts.map