webcad-api/types/Geometry/ExtrudeEdgeGeometry2.d.ts

145 lines
4.5 KiB
TypeScript
Raw Normal View History

2020-09-24 11:04:12 +08:00
import { BufferGeometry, Vector3 } from "three";
import { Contour } from "../DatabaseServices/Contour";
import { ExtrudeSolid, ExtureContourCurve } 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 class Groove {
depthType: DepthType;
depth: number;
allDepth: number;
private box;
contourWall: ExtudeWall;
holeWalls: ExtudeWall[];
private lid;
2020-10-30 15:53:48 +08:00
constructor(contour: Contour, holes: Contour[], depthType: DepthType, depth: number, allDepth: number, box?: import("./Box").Box3Ext);
2020-09-24 11:04:12 +08:00
/**
* @param groove this - groove
* @param [eachOther=true]
*/
ClipTo(groove: Groove, eachOther?: boolean): void;
private ClipLid;
Draw(verticesArray: number[], uvArray: number[], edgeBuild: EdgeGeometryBuild, rotateUv: boolean): void;
}
declare enum DirectionType {
Outer = 0,
Inner = 1
}
export declare class ContourTreeNode {
contour: Contour;
children: ContourTreeNode[];
parent: ContourTreeNode;
constructor(contour: Contour, children?: ContourTreeNode[]);
SetParent(node: ContourTreeNode): void;
Draw(verticesArray: number[], uvArray: number[], front: boolean, z: number, rotateUv: boolean): void;
static ParseContourTree(contourNodes: ContourTreeNode[]): 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 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): 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: ExtureContourCurve;
depthType: DepthType;
depth: number;
allDepth: number;
wallType: DirectionType;
private Tape;
constructor(curve: ExtureContourCurve, 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): void;
}
/**
* 线(,,线,线)
* 线线
*/
interface CurveParamRangeRelation {
outer: Range[];
container: Range[];
syntropy: Range[];
reverse: Range[];
}
declare type Range = [number, number];
export declare class ExtrudeGeometryBuilder {
private br;
verticesArray: number[];
uvArray: number[];
edgeAndLidBuilder: EdgeGeometryBuild;
constructor(br: ExtrudeSolid);
get MeshGeometry(): BufferGeometry;
get EdgeGeometry(): BufferGeometry;
private ParseGrooves;
}
export {};
//# sourceMappingURL=ExtrudeEdgeGeometry2.d.ts.map