import { Vector2, Vector3 } from "three";
import { EBoardKeyList } from "../Common/BoardKeyList";
import { GangDrillType } from "../DatabaseServices/3DSolid/CylinderHole";
import { Arc } from "../DatabaseServices/Entity/Arc";
import { Board, I2DModeingItem, IKnifeInfo } from "../DatabaseServices/Entity/Board";
import { Circle } from "../DatabaseServices/Entity/Circle";
import { ExtureContourCurve } from "../DatabaseServices/Entity/Extrude";
import { Polyline } from "../DatabaseServices/Entity/Polyline";
import { HardwareCompositeEntity } from "../DatabaseServices/Hardware/HardwareCompositeEntity";
import { HardwareTopline } from "../DatabaseServices/Hardware/HardwareTopline";
import { Vec2 } from "../Geometry/CheckIntersect";
import { IHardwareOption } from "../UI/Components/RightPanel/RightPanelInterface";
import { BoardOpenDir, FaceDirection, IHighSealedItem } from "../UI/Store/BoardInterface";
import { Entity } from './../DatabaseServices/Entity/Entity';
/**轮廓数据 */
export interface IContourData {
    pts: Vec2[];
    buls: number[];
}
export interface I3DContourData {
    pts: Vector3[];
    buls: number[];
}
export declare type IHardwareType = HardwareTopline | HardwareCompositeEntity;
export interface ISealingData extends IHighSealedItem {
    length: number;
    type?: string;
    shop?: string;
}
export interface IModelingData {
    feeding: IContourData[];
    thickness: number;
    dir: FaceDirection | number;
    knifeRadius: number;
    origin: IOriginModelingData;
}
export declare enum DrillingFace {
    Front = 0,
    Back = 1
}
export interface IDrillingOption {
    position: Vector3;
    radius: number;
    type: GangDrillType;
    depth: number;
    face: DrillingFace;
    endPt?: Vector3;
    angle?: number;
}
export interface IBoardHoleInfo {
    frontBackHoles: IDrillingOption[];
    sideHoles: IDrillingOption[];
}
interface IBoardProdInfo {
    id: number;
    name: string;
    [EBoardKeyList.RoomName]: string;
    [EBoardKeyList.CabinetName]: string;
    [EBoardKeyList.Mat]: string;
    [EBoardKeyList.BrMat]: string;
    [EBoardKeyList.Color]: string;
    [EBoardKeyList.Lines]: number;
    [EBoardKeyList.DrillType]: string;
    spliteHeight: string;
    spliteThickness: string;
    spliteWidth: string;
    isRect: boolean;
    remarks: [string, string][];
    kaiLiaoWidth: number;
    kaiLiaoHeight: number;
    openDir: BoardOpenDir;
}
export interface I2DModeling {
    path: IContourData;
    dir: FaceDirection;
    items: I2DModeingItem[];
}
export interface I3DModeling {
    path: I3DContourData;
    dir: FaceDirection;
    knife: IKnifeInfo;
}
/**拆单数据 */
export interface ISpliteOrderData {
    info: IBoardProdInfo;
    outline: IContourData;
    sealing: ISealingData[];
    modeling: IModelingData[];
    holes: IBoardHoleInfo;
    sideModeling: IModelingData[];
    offsetTanslation: Vector3;
    originOutlin: IContourData;
    metalsData?: {
        metals: number;
        comp: number;
    };
    boardContour: IContourData;
    modeling2D: I2DModeling[];
    modeling3D: I3DModeling[];
}
export interface IBoardMetalsData {
    metals: ISpliteHardwareData[];
    comp: ISpliteHardwareData[];
}
export interface ISpliteHardwareData {
    metalsOption: IHardwareOption;
    dataList: [string, string][];
    children: ISpliteHardwareData[];
    length?: number;
    size: Vector3;
}
export interface IOriginModelingData {
    outline: IContourData;
    holes: IContourData[];
    thickness?: number;
    dir?: FaceDirection | number;
    knifeRadius?: number;
    addLen?: number;
    addWidth?: number;
    addDepth?: number;
}
interface IChaiDanFeedingData extends IOriginModelingData {
    boardContour: IContourData;
    brThickness: number;
}
export declare namespace Production {
    /**获取板件拆单数据 */
    function GetBoardSplitOrderData(br: Board): ISpliteOrderData | undefined;
    function GetBoardInfo(br: Board, size: Vector3): IBoardProdInfo;
    /**
     * 转换成多段线并且将圆弧打断(大于1/4的话)
     */
    function ConverToPolylineAndSplitArc(cu: Polyline | Circle, isOutline?: boolean, isSplite?: boolean): IContourData;
    function ConverCircleToPolyline(cir: Circle): Polyline;
    /** 打断多段线超过1/4圆的圆弧*/
    function SplitePolylineAtArc(cu: Polyline, isSplite?: boolean): {
        pts: Vector2[];
        buls: number[];
    };
    function SplitetArc(arc: Arc, hasEnd?: boolean): {
        pts: Vector3[];
        buls: number[];
    };
    /**
     * 获取封边数据
     * 封边数据未统一逆时针顺序，用于拆单
     * */
    function GetBoardSealingData(br: Board): ISealingData[];
    function GetMetalTotalEntitys(md: HardwareCompositeEntity, isHole?: boolean, filter?: (e: Entity) => boolean): Entity[];
    function GetOriginBoardModelingData(br: Board): {
        modeling: IOriginModelingData[];
        sideModeling: IOriginModelingData[];
    };
    function GetBoardModelingData(br: Board, offsetTanslation: Vector3): {
        modeling: IModelingData[];
        sideModeling: IModelingData[];
    };
    /**获取板件的轮廓
    *有拆单尺寸返回矩形
    *用于拆单的轮廓统一逆时针 */
    function GetSpliteOutline(br: Board, isSplite: boolean): ExtureContourCurve | undefined;
    function GetSpiteSize(br: Board): {
        spliteHeight: number;
        spliteWidth: number;
        spliteThickness: number;
    };
    function GetSpliteOutlineBySpliteSize(br: Board): Polyline;
    /**孔信息,侧孔的z 均为 从上到下距离 */
    function GetBoardHolesData(br: Board, offsetTanslation: Vector3, sealedContour: ExtureContourCurve): IBoardHoleInfo;
    function GetHardwareCompositeData(en: HardwareCompositeEntity): ISpliteHardwareData;
    function GetHardwareToplineData(en: HardwareTopline): ISpliteHardwareData[];
    /**获取排钻数量 */
    function GetTotalDrillCount(brs: (Board | IHardwareType)[]): {
        drillCount: import("../Add-on/LookOverBoardInfos/LookOverBoardInfosTool").ICountType<IHardwareType>[];
        hardwareCount: import("../Add-on/LookOverBoardInfos/LookOverBoardInfosTool").ICountType<IHardwareType>[];
        sealCount: import("../Add-on/LookOverBoardInfos/LookOverBoardInfosTool").ICountType<IHardwareType>[];
        areaCount: import("../Add-on/LookOverBoardInfos/LookOverBoardInfosTool").ICountType<Board>[];
    };
    function GetCabSize(brList: Board[]): Map<Board, Vector3>;
    function Data2Polyline(data: IContourData, isClose?: boolean): Polyline;
    function Report(ens: Entity[], msg: string): void;
    function Get2DModeing(br: Board, offset: Vector3): I2DModeling[];
    function Get3DModeing(br: Board, offset: Vector3): I3DModeling[];
    function GetChaiDanFeedingPath(data: IChaiDanFeedingData): IContourData[];
}
export {};
//# sourceMappingURL=Product.d.ts.map