import { Box3, BufferGeometry, Vector3 } from "three";
import { Contour } from "../../DatabaseServices/Contour";
import { ExtrudeContourCurve, ExtrudeSolid } from "../../DatabaseServices/Entity/Extrude";
import { Line } from "../../DatabaseServices/Entity/Line";
import { Polyline } from "../../DatabaseServices/Entity/Polyline";
export declare enum DepthType {
    Front = 1,
    Back = 2,
    All = 3
}
export declare const ExtrudeBuildConfig: {
    bevel: boolean;
};
/**
 * 槽的几何数据,包括槽的墙面和槽的盖子
 */
export declare class Groove {
    depthType: DepthType;
    depth: number;
    allDepth: number;
    private box;
    contourWall: ExtudeWall;
    holeWalls: ExtudeWall[];
    private lid;
    constructor(contour: Contour, holes: Contour[], depthType: DepthType, depth: number, allDepth: number, box?: import("../Box").Box3Ext);
    /**
     * @param groove this - groove
     * @param [eachOther=true] 相互裁剪
     */
    ClipTo(groove: Groove, eachOther?: boolean): void;
    private ClipLid;
    Draw(verticesArray: number[], uvArray: number[], edgeBuild: EdgeGeometryBuild, rotateUv: boolean, displayAccuracy?: number): void;
}
declare enum DirectionType {
    Outer = 0,//外墙
    Inner = 1
}
export declare class ContourTreeNode {
    contour: Contour;
    children: ContourTreeNode[];
    parent: ContourTreeNode;
    box: Box3;
    area: number;
    constructor(contour: Contour, children?: ContourTreeNode[]);
    SetParent(node: ContourTreeNode): void;
    get Depth(): number;
    get IsHole(): boolean;
    Draw(verticesArray: number[], uvArray: number[], front: boolean, z: number, rotateUv: boolean, allDepth: number): void;
    static ParseContourTree(contourNodes: ContourTreeNode[], ignoreInCurve?: boolean, checkIntersect?: boolean): void;
}
declare class EdgeGeometryBuild {
    allDepth: number;
    lineVerticesArray: number[];
    frontLines: Line[];
    backLines: Line[];
    constructor(allDepth: number);
    AddLidLine(p1: Vector3, p2: Vector3, depth: number): void;
    BuildLid(verticesArray: number[], uvArray: number[], rotateUv: boolean): void;
}
/**
 * 胶带
 */
export declare class Tape {
    start: number;
    end: number;
    bottom: number;
    top: number;
    constructor(start: number, end: number, bottom: number, top: number);
    get Curve(): Polyline;
    Clip(t: this): Tape[];
    Split(xlst: number[]): Tape[];
}
/**
 * 二维形状,内部用曲线胶带表示(用来计算盖子差集算法)
 */
export declare class CurveTapeShape {
    children: CurveTapeShape[];
    contour: CurveTape;
    holes: CurveTape[];
    constructor(contour: Contour, holes: Contour[]);
    CloneNew(): CurveTapeShape;
    /**
     * 删除包含,同向
     */
    ClipTo(s: CurveTapeShape, append?: boolean): void;
    SplitTo(s: CurveTapeShape): void;
    /**
     * 只保留被包含部分
     */
    private ReverseClipTo;
    ChildrenClip(): void;
    Draw(verticesArray: number[], uvArray: number[], front: boolean, z: number, rotateUv: boolean, allDepth: number): void;
}
/**
 * 曲线胶带(一维)
 */
declare class CurveTape {
    contour: Contour;
    wallType: DirectionType;
    tapes: Range[];
    splitParams: number[];
    constructor(contour: Contour, wallType: DirectionType);
    get Curves(): Polyline[];
    /**
     * 分析与另一个形状的包含关系
     */
    Parse(s: CurveTapeShape): CurveParamRangeRelation;
    /**
     * 删除包含,同向面
     */
    ClipTo(s: CurveTapeShape): this;
    /**
     * 保留被包含的部分
     */
    ReverseClipTo(s: CurveTapeShape): this;
}
declare class ExtudeWall {
    curve: ExtrudeContourCurve;
    depthType: DepthType;
    depth: number;
    allDepth: number;
    wallType: DirectionType;
    private Tape;
    constructor(curve: ExtrudeContourCurve, depthType: DepthType, depth: number, allDepth: number, wallType: DirectionType);
    /**
     * 减去在另一个groove内的部分
     * @param groove this - groove
     * @param [clipSyntropy=false] 删除同向的面
     */
    ClipTo(groove: Groove, clipSyntropy?: boolean): void;
    ClipReverse(wall: this): void;
    /**
     * 当起始参数大于终止参数时,裁剪的区域经过终点
     *
     * @param startParam 起始参数
     * @param endParam 终止参数
     * @param faceType 裁剪面朝向
     * @param depth 裁剪面的深度
     */
    ClipFromParam(startParam: number, endParam: number, faceType: DepthType, depth: number): this;
    Draw(verticesArray: number[], uvArray: number[], edgeBuild: EdgeGeometryBuild, displayAccuracy?: number): void;
}
/**
 * 曲线参数范围关系(包含,分离,同向共线,反向共线)
 * 用来表示某一曲线在另一个曲线内的关系
 */
interface CurveParamRangeRelation {
    outer: Range[];
    container: Range[];
    syntropy: Range[];
    reverse: Range[];
}
/**
 *
 * @param orgStart 被裁剪范围的起点(如果起点大于终点,那么表示 s->end + 0->e)
 * @param orgEnd
 * @param clipStart
 * @param clipEnd
 * @param end
 * @returns
 */
export declare function SubtractRange(orgStart: number, orgEnd: number, clipStart: number, clipEnd: number, end: number): Range[];
export declare function SubtractRange2(r: Range, sr: Range, end: number): Range[];
type Range = [number, number];
export declare class ExtrudeGeometryBuilder {
    private br;
    verticesArray: number[];
    uvArray: number[];
    edgeAndLidBuilder: EdgeGeometryBuild;
    constructor(br: ExtrudeSolid, rotateUv?: boolean);
    protected GenerateMeshData(br: ExtrudeSolid, rotateUv: boolean): void;
    get MeshGeometry(): BufferGeometry;
    get EdgeGeometry(): BufferGeometry;
    protected ParseGrooves(): Groove[];
}
export {};
//# sourceMappingURL=ExtrudeEdgeGeometry2.d.ts.map