| 
									
										
										
										
											2025-05-20 18:10:58 +08:00
										 |  |  | import { BufferGeometry, Geometry, Matrix4, Vector2, Vector3 } from "three"; | 
					
						
							| 
									
										
										
										
											2024-10-29 17:14:43 +08:00
										 |  |  | import { LineGeometry } from "three/examples/jsm/lines/LineGeometry"; | 
					
						
							|  |  |  | import { Curve } from "../DatabaseServices/Entity/Curve"; | 
					
						
							|  |  |  | import { Polyline } from "../DatabaseServices/Entity/Polyline"; | 
					
						
							|  |  |  | /** | 
					
						
							|  |  |  |  * 使用轮廓和扫描路径构建扫描几何体,实现衣柜中的顶线或者地脚线之类的实体. | 
					
						
							|  |  |  |  * 该几何体需要轮廓和路径的起始截面垂直,否则构造的实体将会错误. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | export declare class SweepGeometry extends Geometry { | 
					
						
							|  |  |  |     edgePts: number[]; | 
					
						
							|  |  |  |     polygonIndexes: any[]; | 
					
						
							|  |  |  |     ShapeMaterialSlotData: number[]; | 
					
						
							|  |  |  |     constructor(contour: Polyline, path: Curve[] | Curve, ShapeMaterialSlotData?: number[]); | 
					
						
							|  |  |  |     get LineGeom(): LineGeometry; | 
					
						
							|  |  |  |     get EdgeGeom(): BufferGeometry; | 
					
						
							|  |  |  |     AddShape(contour: Polyline, path: Curve): void; | 
					
						
							|  |  |  |     AddShape2(contour: Polyline, paths: Curve[]): void; | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * 使用4点构建面 | 
					
						
							|  |  |  |      * @param a 左下 | 
					
						
							|  |  |  |      * @param b 右下 | 
					
						
							|  |  |  |      * @param c 左上 | 
					
						
							|  |  |  |      * @param d 右上 | 
					
						
							|  |  |  |      * @param uvs | 
					
						
							|  |  |  |      * @param [materialIndex] | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     protected BuildFace4(a: number, b: number, c: number, d: number, uvs: Vector2[], materialIndex?: number): void; | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * 构造边缘面开始标记 | 
					
						
							|  |  |  |      * @param dir 前进方向(单位向量) | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     protected SideStartMark(dir: Vector3): void; | 
					
						
							|  |  |  |     protected BuildSideFaces(shapePts2d: Vector2[], pathPts2d: Vector2[], pathPts: Vector3[], verts: Vector3[][]): void; | 
					
						
							|  |  |  |     protected BuildLid(shapePts2d: Vector2[], verts: Vector3[][]): void; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | /** | 
					
						
							|  |  |  |  * 将轮廓变换到`路径上某个点`. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * @param {Vector3[]} contourPts 原始的轮廓点(在世界坐标系) | 
					
						
							|  |  |  |  * @param {Vector3} normal 路径法向量 | 
					
						
							|  |  |  |  * @param {Vector3} curP 路径上当前点 | 
					
						
							|  |  |  |  * @param {Vector3} [preP] 路径的前一个点 | 
					
						
							|  |  |  |  * @param {Vector3} [nextP] 路径下一个点 | 
					
						
							|  |  |  |  * @returns 变换后的轮廓点表 | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | export declare function ProjectionToPlane(contourPts: Vector3[], normal: Vector3, curP: Vector3, preP?: Vector3, nextP?: Vector3): Vector3[]; | 
					
						
							| 
									
										
										
										
											2025-05-20 18:10:58 +08:00
										 |  |  | /** | 
					
						
							|  |  |  |  * 计算轮廓变换到`路径上某个点`的矩阵 | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * @param {Vector3} pt 路径上的点 | 
					
						
							|  |  |  |  * @param {Vector3} norm 曲线法向量 | 
					
						
							|  |  |  |  * @param {Vector3} dir 点前进的方向. | 
					
						
							|  |  |  |  * @returns {Matrix4} | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | export declare function ContourTransfromToPath(pt: Vector3, norm: Vector3, dir: Vector3): Matrix4; | 
					
						
							| 
									
										
										
										
											2024-10-29 17:14:43 +08:00
										 |  |  | type Polygon = number[]; | 
					
						
							|  |  |  | export declare class SweepGeometrySimple extends SweepGeometry { | 
					
						
							|  |  |  |     SidePolygons: (Polygon[])[]; | 
					
						
							|  |  |  |     private _curSidePolygons; | 
					
						
							|  |  |  |     private _curDir; | 
					
						
							|  |  |  |     TriFaces: (number[])[]; | 
					
						
							|  |  |  |     shapeVerts: Vector3[][]; | 
					
						
							|  |  |  |     shapePts2d: Vector2[]; | 
					
						
							|  |  |  |     computeVertexNormals(): void; | 
					
						
							|  |  |  |     computeFaceNormals(): void; | 
					
						
							|  |  |  |     BuildFace4(a: number, b: number, c: number, d: number, uvs: Vector2[], materialIndex?: number): void; | 
					
						
							|  |  |  |     protected SideStartMark(dir: Vector3): void; | 
					
						
							|  |  |  |     protected BuildSideFaces(shapePts2d: Vector2[], pathPts2d: Vector2[], pathPts: Vector3[], verts: Vector3[][]): void; | 
					
						
							|  |  |  |     protected BuildLid(shapePts2d: Vector2[], verts: Vector3[][]): void; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | export {}; | 
					
						
							|  |  |  | //# sourceMappingURL=SweepGeometry.d.ts.map
 |