rm-build-dxf 0.1.186

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) hide show
  1. package/README.md +6 -0
  2. package/package.json +50 -0
  3. package/src/App.vue.d.ts +2 -0
  4. package/src/DomEventRegister.js +1 -0
  5. package/src/api/getSocket.d.ts +1 -0
  6. package/src/api/index.d.ts +27 -0
  7. package/src/api/type.d.ts +46 -0
  8. package/src/build.js +1 -0
  9. package/src/components/DragContainer.vue.d.ts +48 -0
  10. package/src/components/NumberEditor.vue.d.ts +33 -0
  11. package/src/constants.d.ts +11 -0
  12. package/src/demo.d.ts +1 -0
  13. package/src/dxf-system/DxfSystem.d.ts +26 -0
  14. package/src/dxf-system/build.d.ts +94 -0
  15. package/src/dxf-system/components/CorrectionDxf.d.ts +44 -0
  16. package/src/dxf-system/components/Dxf.d.ts +96 -0
  17. package/src/dxf-system/components/ThreeVJia.d.ts +33 -0
  18. package/src/dxf-system/components/Variable.d.ts +41 -0
  19. package/src/dxf-system/index.d.ts +2 -0
  20. package/src/dxf-system/plugins/editor/Command/ClippingLine.d.ts +30 -0
  21. package/src/dxf-system/plugins/editor/Command/Command.d.ts +346 -0
  22. package/src/dxf-system/plugins/editor/Command/DefaultCommand.d.ts +56 -0
  23. package/src/dxf-system/plugins/editor/Command/DeleteSelectLine.d.ts +25 -0
  24. package/src/dxf-system/plugins/editor/Command/DrawBalconyRailing.d.ts +12 -0
  25. package/src/dxf-system/plugins/editor/Command/DrawBeam.d.ts +12 -0
  26. package/src/dxf-system/plugins/editor/Command/DrawDoorLine.d.ts +9 -0
  27. package/src/dxf-system/plugins/editor/Command/DrawHole.d.ts +67 -0
  28. package/src/dxf-system/plugins/editor/Command/DrawLine.d.ts +41 -0
  29. package/src/dxf-system/plugins/editor/Command/DrawPillar.d.ts +12 -0
  30. package/src/dxf-system/plugins/editor/Command/DrawWindow.d.ts +12 -0
  31. package/src/dxf-system/plugins/editor/Command/ManualDistance.d.ts +23 -0
  32. package/src/dxf-system/plugins/editor/Command/MergeLine.d.ts +33 -0
  33. package/src/dxf-system/plugins/editor/Command/PointDrag/index.d.ts +38 -0
  34. package/src/dxf-system/plugins/editor/Command/PointDrag/modifyDoor.d.ts +40 -0
  35. package/src/dxf-system/plugins/editor/Command/PointDrag/modifyLine.d.ts +34 -0
  36. package/src/dxf-system/plugins/editor/Command/PointDrag/modifyWindow.d.ts +25 -0
  37. package/src/dxf-system/plugins/editor/Command/PropertiesPanel.d.ts +33 -0
  38. package/src/dxf-system/plugins/editor/Command/RayDistance.d.ts +23 -0
  39. package/src/dxf-system/plugins/editor/Command/SelectAll.d.ts +30 -0
  40. package/src/dxf-system/plugins/editor/Command/TwoLineConnectionLine.d.ts +33 -0
  41. package/src/dxf-system/plugins/editor/Command/TwoPointConnection.d.ts +33 -0
  42. package/src/dxf-system/plugins/editor/Command/VerticalCorr.d.ts +66 -0
  43. package/src/dxf-system/plugins/editor/Command/VerticalCorrContinue.d.ts +35 -0
  44. package/src/dxf-system/plugins/editor/Command/ViewAngle.d.ts +21 -0
  45. package/src/dxf-system/plugins/editor/Editor.d.ts +56 -0
  46. package/src/dxf-system/plugins/editor/RenderManager.d.ts +101 -0
  47. package/src/dxf-system/plugins/editor/index.d.ts +9 -0
  48. package/src/dxf-system/plugins/editor/pages/EditorTool/EditorTool.vue.d.ts +7 -0
  49. package/src/dxf-system/plugins/editor/pages/EditorTool/EditorToolContent.vue.d.ts +7 -0
  50. package/src/dxf-system/plugins/editor/pages/PropertiesPanel.vue.d.ts +18 -0
  51. package/src/dxf-system/plugins/editor/pages/components/Button.vue.d.ts +17 -0
  52. package/src/dxf-system/plugins/editor/pages/components/Input.vue.d.ts +13 -0
  53. package/src/dxf-system/plugins/editor/pages/components/ToolToggle.vue.d.ts +20 -0
  54. package/src/dxf-system/plugins/editor/type.d.ts +11 -0
  55. package/src/dxf-system/plugins/editor/us-service/DragControlPoint.d.ts +48 -0
  56. package/src/dxf-system/plugins/editor/us-service/LineSelector.d.ts +44 -0
  57. package/src/dxf-system/plugins/editor/us-service/PointerFollowMove.d.ts +86 -0
  58. package/src/dxf-system/plugins/editor/us-service/SnapController.d.ts +32 -0
  59. package/src/dxf-system/plugins/editor/utils/Wall2D.d.ts +10 -0
  60. package/src/dxf-system/plugins/model3d/components/DxfLineModel.d.ts +14 -0
  61. package/src/dxf-system/plugins/model3d/components/WhiteModel.d.ts +61 -0
  62. package/src/dxf-system/plugins/model3d/components/index.d.ts +2 -0
  63. package/src/dxf-system/plugins/model3d/index.d.ts +11 -0
  64. package/src/dxf-system/plugins/renderer/components/DomContainer.d.ts +13 -0
  65. package/src/dxf-system/plugins/renderer/components/DomEventRegister.d.ts +116 -0
  66. package/src/dxf-system/plugins/renderer/components/EventInput.d.ts +74 -0
  67. package/src/dxf-system/plugins/renderer/components/ModelDataRender.d.ts +13 -0
  68. package/src/dxf-system/plugins/renderer/components/Renderer.d.ts +100 -0
  69. package/src/dxf-system/plugins/renderer/components/index.d.ts +5 -0
  70. package/src/dxf-system/plugins/renderer/index.d.ts +13 -0
  71. package/src/dxf-system/type.d.ts +218 -0
  72. package/src/dxf-system/utils/BayWindowHelper.d.ts +58 -0
  73. package/src/dxf-system/utils/BoundExt.d.ts +51 -0
  74. package/src/dxf-system/utils/DoorFind.d.ts +44 -0
  75. package/src/dxf-system/utils/DoubleWallFinder.d.ts +24 -0
  76. package/src/dxf-system/utils/HeightQuery.d.ts +12 -0
  77. package/src/dxf-system/utils/LineGroupType.d.ts +125 -0
  78. package/src/dxf-system/utils/LoadModel.d.ts +7 -0
  79. package/src/dxf-system/utils/RunJianPipeline.d.ts +92 -0
  80. package/src/dxf-system/utils/SceneAutoGenerat.d.ts +42 -0
  81. package/src/dxf-system/utils/ThreeVJiaPipeline.d.ts +154 -0
  82. package/src/dxf-system/utils/WallGroupManager.d.ts +27 -0
  83. package/src/dxf-system/utils/WallHole.d.ts +134 -0
  84. package/src/dxf-system/utils/WallHoleDrawData.d.ts +31 -0
  85. package/src/dxf-system/utils/ZHouseMockData.d.ts +127 -0
  86. package/src/dxf-system/utils/cad/DxfDataPlugin.d.ts +20 -0
  87. package/src/dxf-system/utils/cad/DxfDrawPlugin.d.ts +13 -0
  88. package/src/dxf-system/utils/cad/draw-data.d.ts +43 -0
  89. package/src/dxf-system/utils/cad/draw-dxf-image.d.ts +2 -0
  90. package/src/dxf-system/utils/cad/draw-dxf-string.d.ts +3 -0
  91. package/src/dxf-system/utils/cad/index.d.ts +143 -0
  92. package/src/dxf-system/utils/clipping-double-wall.d.ts +7 -0
  93. package/src/dxf-system/utils/draw-helper.d.ts +6 -0
  94. package/src/dxf-system/utils/find-discrete.d.ts +26 -0
  95. package/src/dxf-system/utils/find-rooms.d.ts +16 -0
  96. package/src/dxf-system/utils/get-win-draw-data.d.ts +18 -0
  97. package/src/dxf-system/utils/index.d.ts +8 -0
  98. package/src/dxf-system/utils/line-pipeline/builtin/axis-align-corr.d.ts +16 -0
  99. package/src/dxf-system/utils/line-pipeline/builtin/beam-support-line.d.ts +3 -0
  100. package/src/dxf-system/utils/line-pipeline/builtin/bound-ext.d.ts +8 -0
  101. package/src/dxf-system/utils/line-pipeline/builtin/build-group/bay-window.d.ts +7 -0
  102. package/src/dxf-system/utils/line-pipeline/builtin/build-group/double-wall.d.ts +6 -0
  103. package/src/dxf-system/utils/line-pipeline/builtin/build-group/index.d.ts +7 -0
  104. package/src/dxf-system/utils/line-pipeline/builtin/door-space-handle.d.ts +5 -0
  105. package/src/dxf-system/utils/line-pipeline/builtin/door-to-hole.d.ts +9 -0
  106. package/src/dxf-system/utils/line-pipeline/builtin/double-wall-alignment.d.ts +7 -0
  107. package/src/dxf-system/utils/line-pipeline/builtin/index.d.ts +39 -0
  108. package/src/dxf-system/utils/line-pipeline/builtin/init.d.ts +8 -0
  109. package/src/dxf-system/utils/line-pipeline/builtin/remove-room-sundries.d.ts +3 -0
  110. package/src/dxf-system/utils/line-pipeline/builtin/remove-short-double-wall.d.ts +6 -0
  111. package/src/dxf-system/utils/line-pipeline/builtin/wall-height-handle.d.ts +8 -0
  112. package/src/dxf-system/utils/line-pipeline/index.d.ts +22 -0
  113. package/src/dxf-system/utils/remove-dangline.d.ts +7 -0
  114. package/src/dxf-system/utils/tools.d.ts +91 -0
  115. package/src/index.css +1 -0
  116. package/src/index.js +1 -0
  117. package/src/index2.js +1 -0
  118. package/src/index3.js +1 -0
  119. package/src/main.d.ts +0 -0
  120. package/src/pages/CubeView.vue.d.ts +4 -0
  121. package/src/pages/DxfPreview.vue.d.ts +9 -0
  122. package/src/pages/Editor.vue.d.ts +8 -0
  123. package/src/pages/ExportGLB.vue.d.ts +2 -0
  124. package/src/pages/ImagePreview.vue.d.ts +9 -0
  125. package/src/pages/ModelView.vue.d.ts +11 -0
  126. package/src/pages/Setting.vue.d.ts +6 -0
  127. package/src/pages/Todo.vue.d.ts +2 -0
  128. package/src/pages/WallView.vue.d.ts +9 -0
  129. package/src/pages/WindowManager.vue.d.ts +2 -0
  130. package/src/pages/buildJson.vue.d.ts +4 -0
  131. package/src/pages/modelCarrier/index.vue.d.ts +4 -0
  132. package/src/router/index.d.ts +2 -0
  133. package/src/utils/EventDispatcher.d.ts +18 -0
  134. package/src/utils/algorithms/AlignToParallelSegments.d.ts +25 -0
  135. package/src/utils/algorithms/AxisAlignCorr.d.ts +38 -0
  136. package/src/utils/algorithms/Box2.d.ts +96 -0
  137. package/src/utils/algorithms/CheckPointCloudContinuity.d.ts +63 -0
  138. package/src/utils/algorithms/ConstraintSystem.d.ts +17 -0
  139. package/src/utils/algorithms/ConvexHullGraham.d.ts +16 -0
  140. package/src/utils/algorithms/Debouncing.d.ts +10 -0
  141. package/src/utils/algorithms/LineIndexGenerator.d.ts +12 -0
  142. package/src/utils/algorithms/LineQueryer.d.ts +42 -0
  143. package/src/utils/algorithms/LineSegment.d.ts +258 -0
  144. package/src/utils/algorithms/LineSegmentSpatialHash.d.ts +86 -0
  145. package/src/utils/algorithms/LineSegmentUtils.d.ts +185 -0
  146. package/src/utils/algorithms/Map.d.ts +38 -0
  147. package/src/utils/algorithms/MaxiCircles.d.ts +15 -0
  148. package/src/utils/algorithms/MiniCircles.d.ts +57 -0
  149. package/src/utils/algorithms/OBB.d.ts +30 -0
  150. package/src/utils/algorithms/PCSparseOctree.d.ts +56 -0
  151. package/src/utils/algorithms/Pipeline.d.ts +20 -0
  152. package/src/utils/algorithms/Point.d.ts +271 -0
  153. package/src/utils/algorithms/PointSpatialHash.d.ts +149 -0
  154. package/src/utils/algorithms/PointUtils.d.ts +47 -0
  155. package/src/utils/algorithms/Polygon.d.ts +164 -0
  156. package/src/utils/algorithms/PolygonUtils.d.ts +9 -0
  157. package/src/utils/algorithms/Quadtree.d.ts +89 -0
  158. package/src/utils/algorithms/Rectangle.d.ts +62 -0
  159. package/src/utils/algorithms/UndirectedGraph.d.ts +124 -0
  160. package/src/utils/algorithms/UnionFindSet.d.ts +12 -0
  161. package/src/utils/algorithms/ccw.d.ts +2 -0
  162. package/src/utils/algorithms/lazy.d.ts +14 -0
  163. package/src/utils/algorithms/precision.d.ts +3 -0
  164. package/src/utils/algorithms/stepElimination.d.ts +6 -0
  165. package/src/utils/algorithms/uuid.d.ts +1 -0
  166. package/src/utils/command/CommandFlow.d.ts +45 -0
  167. package/src/utils/command/CommandSystem.d.ts +96 -0
  168. package/src/utils/command/index.d.ts +2 -0
  169. package/src/utils/decorators/measure-time.d.ts +5 -0
  170. package/src/utils/ecs/Component.d.ts +18 -0
  171. package/src/utils/ecs/Container.d.ts +47 -0
  172. package/src/utils/ecs/index.d.ts +4 -0
  173. package/src/utils/geometry-manager/GeometryManager.d.ts +2 -0
  174. package/src/utils/index.d.ts +25 -0
  175. package/src/utils/modelScenario/bayWindow.d.ts +35 -0
  176. package/src/utils/modelScenario/scenario.d.ts +92 -0
  177. package/src/utils/three-object-3d/ExtrudeMesh.d.ts +11 -0
  178. package/src/utils/three-object-3d/LineAlignmentGuide.d.ts +20 -0
  179. package/src/utils/three-object-3d/Lines.d.ts +25 -0
  180. package/src/utils/three-object-3d/Lines2.d.ts +22 -0
  181. package/src/utils/three-object-3d/Shape2D.d.ts +61 -0
  182. package/src/utils/tools/GCHandle.d.ts +12 -0
  183. package/src/utils/tools/Gltf.d.ts +7 -0
  184. package/src/utils/tools/SnapLine.d.ts +19 -0
  185. package/src/utils/tools/StorageHelper.d.ts +8 -0
  186. package/src/utils/tools/clone-user-data.d.ts +7 -0
  187. package/src/utils/tools/create-html.d.ts +9 -0
  188. package/src/utils/tools/create-promise.d.ts +5 -0
  189. package/src/utils/tools/createVueApp.d.ts +1 -0
  190. package/src/utils/tools/download.d.ts +1 -0
  191. package/src/utils/tools/get-json.d.ts +5 -0
  192. package/src/utils/tools/include.d.ts +1 -0
  193. package/src/utils/tools/is-mobile.d.ts +2 -0
  194. package/src/utils/tools/repetitive-task.d.ts +1 -0
  195. package/src/utils/tools/selectLocal-file.d.ts +7 -0
@@ -0,0 +1,143 @@
1
+ import { LineSegment } from '../../../utils/algorithms/LineSegment';
2
+ import { LineUserData, Unit } from '../../type';
3
+ import { SetMap } from '../../../utils/algorithms/Map';
4
+ import { Point } from '../../../utils/algorithms/Point';
5
+ type LineSegmentType = LineSegment<LineUserData>;
6
+ type JoinType = "jtMiter" | "jtSquare" | "jtRound";
7
+ type EndType = "etOpenSquare" | "etOpenButt" | "etOpenRound";
8
+ type DrawData = {
9
+ unit: Unit;
10
+ lines: [number, number, number, number, string][];
11
+ lines2: [number, number, number, number, string][];
12
+ arcs: [number, number, number, number, number, string][];
13
+ texts: [string, number, number, string][];
14
+ center: {
15
+ x: number;
16
+ y: number;
17
+ };
18
+ width: number;
19
+ height: number;
20
+ scale: number;
21
+ };
22
+ export type CADDrawHandler = {
23
+ handler: (opt: {
24
+ drawLine(p1: Point, p2: Point): void;
25
+ drawArc(pos: Point, radius: number, startAngle: number, endAngle: number): void;
26
+ drawDottedLine(p1: Point, p2: Point, dash?: number, gap?: number): void;
27
+ drawRulerLine(p1: Point, p2: Point): void;
28
+ drawText(str: string, p: Point): void;
29
+ group: Group;
30
+ setColor: (color: string) => void;
31
+ }) => void;
32
+ type: string[];
33
+ };
34
+ export interface ICADPlugin {
35
+ install(cad: CAD): void;
36
+ }
37
+ declare class Group {
38
+ type: string;
39
+ userData: Record<string, any>;
40
+ constructor(lines?: LineSegmentType[], type?: string, userData?: {});
41
+ lines: LineSegmentType[];
42
+ /** 添加线段
43
+ * @param arg
44
+ */
45
+ addLine(...arg: LineSegmentType[]): void;
46
+ removeLine(...lines: LineSegment[]): void;
47
+ clone(): Group;
48
+ }
49
+ /**
50
+ * 适用于所有线段
51
+ */
52
+ export declare class CAD {
53
+ groups: Group[];
54
+ _drawHandlerMap: SetMap<string, CADDrawHandler>;
55
+ needUpdate: boolean;
56
+ getAllLines(): LineSegmentType[];
57
+ /** 添加组
58
+ * @param lines
59
+ * @param type
60
+ */
61
+ addGroup(lines: LineSegmentType[], type?: string, userData?: Record<string, any>): Group;
62
+ /** 添加组
63
+ * @param lines
64
+ * @param type
65
+ */
66
+ addGroups(groups: LineSegmentType[][], type?: string): Group[];
67
+ /** 添加组并执行偏移
68
+ * @description 使用 ClipperLib 对每个点组进行线偏移处理,生成具有指定宽度的墙体路径
69
+ */
70
+ addGroupAndOffset(lines: LineSegmentType[], option?: {
71
+ offsetHalfWidth?: number;
72
+ joinType?: JoinType;
73
+ endType?: EndType;
74
+ type?: string;
75
+ scale?: number;
76
+ }): this;
77
+ /**
78
+ * 合并所有组
79
+ */
80
+ unionGroupAll(type?: string, threshold?: number): void;
81
+ /** 旋转
82
+ * @param angle 弧度
83
+ */
84
+ rotate(angle: number): void;
85
+ /**
86
+ * 重置原点
87
+ */
88
+ resetOrigin(): void;
89
+ /**
90
+ * 重置原点和旋转
91
+ * @param angle
92
+ */
93
+ rotateAndResetOrigin(angle: number): void;
94
+ /** 添加绘制处理
95
+ * @param handler
96
+ */
97
+ addDrawHandler(handler: CADDrawHandler): void;
98
+ /**
99
+ * 转为绘制数据
100
+ */
101
+ _cachedDrawDataMap: Map<string, DrawData>;
102
+ toDrawData(unit?: Unit): import('./draw-data').DrawData;
103
+ /** 转为图片
104
+ * @param type
105
+ */
106
+ toDxfImageBlob(unit?: Unit, type?: string, background?: string): Promise<any>;
107
+ /** 下载为图片
108
+ * @param filename
109
+ * @param unit
110
+ * @param type
111
+ * @returns
112
+ */
113
+ downloadDxfImage(filename: string, unit?: Unit, type?: string): Promise<boolean>;
114
+ /**
115
+ * 将点json结构转换为Dxf string
116
+ */
117
+ toDxfString(unit?: Unit): string;
118
+ /**
119
+ * 将点云结构转换为DXF格式
120
+ * @returns
121
+ */
122
+ toDxfBlob(unit?: Unit): Blob;
123
+ /** 下载为dxf
124
+ * @param filename
125
+ * @param unit
126
+ */
127
+ downloadDxf(filename: string, unit?: Unit): Promise<void>;
128
+ /** 使用插件
129
+ * @param plugin
130
+ */
131
+ usePlugin(plugin: ICADPlugin): this;
132
+ clone(): CAD;
133
+ clear(): void;
134
+ /** 计算图的倾斜度
135
+ * @param cad
136
+ * @returns
137
+ */
138
+ static obliquity(cad: CAD): {
139
+ angle: number;
140
+ referenceLine: LineSegment<Record<string, any>>;
141
+ };
142
+ }
143
+ export {};
@@ -0,0 +1,7 @@
1
+ import { LineSegment } from '../../utils/algorithms/LineSegment';
2
+ /** 分割多边形环为长方形,多边形环必须满足,每个角都为90度
3
+ * @param lines
4
+ * @returns
5
+ */
6
+ export declare function clippingDoubleWall(lines: LineSegment[]): LineSegment<Record<string, any>>[][];
7
+ export declare function clippingInsertObjectDoubleWall(lines: LineSegment[]): LineSegment<Record<string, any>>[][];
@@ -0,0 +1,6 @@
1
+ import { LineSegment } from '../../utils/algorithms/LineSegment';
2
+ import { LineBasicMaterialParameters, Object3D, PointsMaterialParameters } from 'three';
3
+ import { Point } from '../../utils/algorithms/Point';
4
+ export declare function drawLines(lines: LineSegment[] | LineSegment | Point[], parameters?: LineBasicMaterialParameters, offset?: number): Object3D<import('three').Object3DEventMap> | undefined;
5
+ export declare function drawPoint(point: Point | Point[], parameters?: PointsMaterialParameters, offset?: number): any;
6
+ export declare function drawText(text: any, point: Point, style?: any, offset?: number): any;
@@ -0,0 +1,26 @@
1
+ import { PointSpatialHash } from '../../utils/algorithms/PointSpatialHash';
2
+ import { LineSegment } from '../../utils/algorithms/LineSegment';
3
+ import { MapEnhance } from '../../utils/algorithms/Map';
4
+ import { Point } from '../../utils/algorithms/Point';
5
+ /** 查找有游离的点的线段,也就是有一端没有其他链接线的线段
6
+ * @param lines
7
+ * @param grid
8
+ * @returns
9
+ */
10
+ export declare function findDiscretePointLine<T = any>(lines: LineSegment<T>[], grid0?: PointSpatialHash<LineSegment<T>>, lineSet?: Set<LineSegment<T>>, deep?: boolean): Set<LineSegment<T>>;
11
+ /** 查找有游离的点的线段, 通过点的统计,而不是虚拟网格
12
+ * @param lines
13
+ * @param grid
14
+ * @returns
15
+ */
16
+ export declare function findDiscretePointLine2<T = any>(lines: LineSegment<T>[], lineSet?: Set<LineSegment<T>> | null, deep?: boolean): Set<LineSegment<T>>;
17
+ /** 获取游离的点
18
+ * @param lines
19
+ * @returns
20
+ */
21
+ export declare function findDiscretePoint<T = any>(lines: LineSegment<T>[]): MapEnhance<Point<Record<string, any>>, LineSegment<T>>;
22
+ /**
23
+ * @param lines
24
+ * @returns
25
+ */
26
+ export declare function findDiscretePoint2<T = any>(lines: LineSegment<T>[]): MapEnhance<Point<Record<string, any>>, LineSegment<T>>;
@@ -0,0 +1,16 @@
1
+ import { LineSegment } from '../../utils/algorithms/LineSegment';
2
+ import { LineUserData } from '../type';
3
+ import { Polygon } from '../../utils/algorithms/Polygon';
4
+ import { Point } from '../../utils/algorithms/Point';
5
+ export interface IRoom {
6
+ lines: LineSegment[];
7
+ ploy: Polygon;
8
+ center: Point;
9
+ }
10
+ /** 查找房间
11
+ * @param lines
12
+ */
13
+ export declare function findRooms(lines: LineSegment<LineUserData>[], trajectory?: Record<string, any> | undefined, option?: {
14
+ clone?: boolean;
15
+ split?: boolean;
16
+ }): IRoom[];
@@ -0,0 +1,18 @@
1
+ import { LineSegment } from '../../utils/algorithms/LineSegment';
2
+ import { LineUserData } from '../type';
3
+ import { PointSpatialHash } from '../../utils/algorithms/PointSpatialHash';
4
+ /**
5
+ * @param line
6
+ */
7
+ export declare function winDrawLine(line: LineSegment<LineUserData>, grid?: PointSpatialHash): LineSegment<any>[] | null;
8
+ /** 获取双线窗户线段
9
+ * @param lines
10
+ * @returns
11
+ */
12
+ export declare function doubleWinDrawLine(lines: LineSegment<LineUserData>[]): LineSegment<any>[] | null;
13
+ /** 获取窗户线段
14
+ * @param doubleWallGroup
15
+ * @param wall
16
+ * @returns
17
+ */
18
+ export declare function getWinDrawData(doubleWallGroup: LineSegment[][], wall: LineSegment[], lines?: LineSegment<LineUserData>[]): LineSegment<Record<string, any>>[];
@@ -0,0 +1,8 @@
1
+ export * from './DoubleWallFinder';
2
+ export * from './clipping-double-wall';
3
+ export * from './find-discrete';
4
+ export * from './LineGroupType';
5
+ export * from './SceneAutoGenerat';
6
+ export * from './ThreeVJiaPipeline';
7
+ export { BoundExt } from './BoundExt';
8
+ export * as tools from './tools';
@@ -0,0 +1,16 @@
1
+ import { LineSegment } from '../../../../utils/algorithms/LineSegment';
2
+ import { SetDataOption, LineUserData } from '../../../type';
3
+ /**
4
+ * 轴对齐垂直修正
5
+ * @param lines 待调整线段组
6
+ * @param targettLine 轴线段
7
+ * @returns
8
+ */
9
+ export declare function correction(lines: LineSegment<LineUserData>[], targettLine: LineSegment<LineUserData>, option?: SetDataOption): LineSegment<any>[];
10
+ /** 轴对齐垂直纠正
11
+ * @param lines
12
+ * @param option
13
+ * @param verticalReferenceLine
14
+ * @returns
15
+ */
16
+ export declare function axisAlignCorr(lines: LineSegment<LineUserData>[], option: SetDataOption, verticalReferenceLine?: LineSegment): LineSegment<LineUserData>[];
@@ -0,0 +1,3 @@
1
+ import { LineUserData, SetDataOption } from '../../../type';
2
+ import { LineSegment } from '../../../../utils';
3
+ export declare function beamSupportLine(lines: LineSegment<LineUserData>[], {}: SetDataOption): LineSegment<LineUserData>[];
@@ -0,0 +1,8 @@
1
+ import { SetDataOption } from '../../../type';
2
+ import { LineSegment } from '../../../../utils';
3
+ /** 外扩
4
+ * @param lines
5
+ * @param param1
6
+ * @returns
7
+ */
8
+ export declare function boundExt(lines: LineSegment[], { trajectory, onBoundExt }: SetDataOption): LineSegment<Record<string, any>>[];
@@ -0,0 +1,7 @@
1
+ import { LineSegment } from '../../../../../utils/algorithms/LineSegment';
2
+ import { LineUserData } from '../../../../type';
3
+ /** 构建飘窗组组结构
4
+ * @param lines
5
+ * @returns
6
+ */
7
+ export declare function buildBayWindowGroup(lines: LineSegment<LineUserData>[], clear?: boolean): LineSegment<LineUserData>[];
@@ -0,0 +1,6 @@
1
+ import { LineSegment } from '../../../../../utils/algorithms/LineSegment';
2
+ import { LineUserData } from '../../../../type';
3
+ /** */
4
+ export declare const buildDoubleWallGroup: ((lines_: LineSegment<LineUserData>[], clearInternalLine?: boolean) => LineSegment<LineUserData>[]) & {
5
+ setTrajectory(trajectory_: Record<string, any> | undefined): void;
6
+ };
@@ -0,0 +1,7 @@
1
+ import { buildBayWindowGroup } from './bay-window';
2
+ export declare class BuildGroup {
3
+ static get bayWindow(): typeof buildBayWindowGroup;
4
+ static get doubleWall(): ((lines_: import('../../../../../utils').LineSegment<import('../../../../type').LineUserData>[], clearInternalLine?: boolean) => import('../../../../../utils').LineSegment<import('../../../../type').LineUserData>[]) & {
5
+ setTrajectory(trajectory_: Record<string, any> | undefined): void;
6
+ };
7
+ }
@@ -0,0 +1,5 @@
1
+ import { LineSegment } from '../../../../utils/algorithms/LineSegment';
2
+ import { LineUserData } from '../../../type';
3
+ /** 处理门线垂直方向有其他线段遮挡的情况
4
+ */
5
+ export declare function doorSpaceHandle(lineSegments: LineSegment<LineUserData>[]): LineSegment<LineUserData>[];
@@ -0,0 +1,9 @@
1
+ import { LineUserData, SetDataOption } from '../../../type';
2
+ import { LineSegment } from '../../../../utils/algorithms/LineSegment';
3
+ /**
4
+ * 轴对齐垂直修正
5
+ * @param lines 待调整线段组
6
+ * @param targettLine 轴线段
7
+ * @returns
8
+ */
9
+ export declare function doorToHole(lines: LineSegment<LineUserData>[], option?: SetDataOption): LineSegment<any>[];
@@ -0,0 +1,7 @@
1
+ import { LineSegment } from '../../../../utils/algorithms/LineSegment';
2
+ import { LineUserData } from '../../../type';
3
+ /** 双线墙对齐
4
+ * @param lines
5
+ * @returns
6
+ */
7
+ export declare function doubleWallAlignment(lines: LineSegment<LineUserData>[]): LineSegment<LineUserData>[];
@@ -0,0 +1,39 @@
1
+ import { axisAlignCorr } from './axis-align-corr';
2
+ import { init } from './init';
3
+ import { boundExt } from './bound-ext';
4
+ import { doubleWallAlignment } from './double-wall-alignment';
5
+ import { wallHeightHandle } from './wall-height-handle';
6
+ import { doorSpaceHandle } from './door-space-handle';
7
+ import { removeShortDoubleWall } from './remove-short-double-wall';
8
+ import { doorToHole } from './door-to-hole';
9
+ import { LineSegment } from '../../../../utils/algorithms/LineSegment';
10
+ import { beamSupportLine } from './beam-support-line';
11
+ import { removeRoomSundries } from './remove-room-sundries';
12
+ /**
13
+ * 默认提供的预处理函数
14
+ */
15
+ export declare const builtinFun: {
16
+ init: typeof init;
17
+ DoorToHole: typeof doorToHole;
18
+ AxisAlignCorr: typeof axisAlignCorr;
19
+ /** 门落点查找
20
+ */
21
+ DoorFind: (lines: LineSegment[]) => LineSegment<Record<string, any>>[];
22
+ /** 外扩
23
+ */
24
+ BoundExt: typeof boundExt;
25
+ /** 双线墙对齐单线墙
26
+ */
27
+ DoubleWallAlignment: typeof doubleWallAlignment;
28
+ /** 处理线段没有高度是情况
29
+ */
30
+ WallHeightHandle: typeof wallHeightHandle;
31
+ /** 处理门线垂直方向有其他线段遮挡的情况
32
+ */
33
+ DoorSpaceHandle: typeof doorSpaceHandle;
34
+ /** 移除与双线墙链接的短线段
35
+ */
36
+ RemoveShortDoubleWall: typeof removeShortDoubleWall;
37
+ BeamSupportLine: typeof beamSupportLine;
38
+ RemoveRoomSundries: typeof removeRoomSundries;
39
+ };
@@ -0,0 +1,8 @@
1
+ import { LineSegment } from '../../../../utils/algorithms/LineSegment';
2
+ import { LineUserData, SetDataOption } from '../../../type';
3
+ /** 初始化基础信息
4
+ * @param lines
5
+ * @param option
6
+ * @returns
7
+ */
8
+ export declare function init(lines: LineSegment<LineUserData>[], option: SetDataOption): LineSegment<LineUserData>[];
@@ -0,0 +1,3 @@
1
+ import { LineUserData, SetDataOption } from '../../../type';
2
+ import { LineSegment } from '../../../../utils';
3
+ export declare function removeRoomSundries(lines: LineSegment<LineUserData>[], { trajectory }: SetDataOption): LineSegment<LineUserData>[];
@@ -0,0 +1,6 @@
1
+ import { LineSegment } from '../../../../utils/algorithms/LineSegment';
2
+ import { LineUserData } from '../../../type';
3
+ /**
4
+ * 移除与双线墙链接的短线段
5
+ */
6
+ export declare function removeShortDoubleWall(lineSegments: LineSegment<LineUserData>[]): LineSegment<LineUserData>[];
@@ -0,0 +1,8 @@
1
+ import { LineSegment } from '../../../../utils/algorithms/LineSegment';
2
+ import { SetDataOption } from '../../../type';
3
+ /** 处理线段没有高度是情况
4
+ * @param lineSegments
5
+ * @param option
6
+ * @returns
7
+ */
8
+ export declare function wallHeightHandle(lineSegments: LineSegment[], option: SetDataOption): LineSegment<Record<string, any>>[];
@@ -0,0 +1,22 @@
1
+ import { LineSegment } from '../../../utils/algorithms/LineSegment';
2
+ import { Pipeline } from '../../../utils/algorithms/Pipeline';
3
+ import { LineUserData, SetDataOption } from '../../type';
4
+ export declare class LinePipeline<T = SetDataOption> extends Pipeline<LineSegment[], T> {
5
+ static get builtin(): {
6
+ init: typeof import('./builtin/init').init;
7
+ DoorToHole: typeof import('./builtin/door-to-hole').doorToHole;
8
+ AxisAlignCorr: typeof import('./builtin/axis-align-corr').axisAlignCorr;
9
+ DoorFind: (lines: LineSegment[]) => LineSegment<Record<string, any>>[];
10
+ BoundExt: typeof import('./builtin/bound-ext').boundExt;
11
+ DoubleWallAlignment: typeof import('./builtin/double-wall-alignment').doubleWallAlignment;
12
+ WallHeightHandle: typeof import('./builtin/wall-height-handle').wallHeightHandle;
13
+ DoorSpaceHandle: typeof import('./builtin/door-space-handle').doorSpaceHandle;
14
+ RemoveShortDoubleWall: typeof import('./builtin/remove-short-double-wall').removeShortDoubleWall;
15
+ BeamSupportLine: typeof import('./builtin/beam-support-line').beamSupportLine;
16
+ RemoveRoomSundries: typeof import('./builtin/remove-room-sundries').removeRoomSundries;
17
+ };
18
+ constructor();
19
+ add(handle: (lines: LineSegment<LineUserData>[], option: T) => LineSegment<LineUserData>[]): this;
20
+ clear(): this;
21
+ execute(data: LineSegment<Record<string, any>>[], option: T): LineSegment<Record<string, any>>[];
22
+ }
@@ -0,0 +1,7 @@
1
+ import { LineSegment } from '../../utils/algorithms/LineSegment';
2
+ /** 移除游离短线段
3
+ * @param lines
4
+ * @param maxLen
5
+ * @returns
6
+ */
7
+ export declare function removeDangline(lines: LineSegment[], maxLen?: number, consecutive?: boolean): LineSegment<Record<string, any>>[];
@@ -0,0 +1,91 @@
1
+ import { LineSegment } from '../../utils/algorithms/LineSegment';
2
+ import { Quadtree } from '../../utils/algorithms/Quadtree';
3
+ import { LineUserData, OriginalDataItem } from '../type';
4
+ export * from './ThreeVJiaPipeline';
5
+ export * from './WallGroupManager';
6
+ /** 米转毫米
7
+ * @param value
8
+ * @returns
9
+ */
10
+ export declare function mToMm(value: number): number;
11
+ /** 毫米转米
12
+ * @param value
13
+ * @returns
14
+ */
15
+ export declare function mmTom(value: number): number;
16
+ /** 获取线段在另一个图形里对应的线段,通过线段中心
17
+ * @param targetLines
18
+ * @param lines
19
+ * @returns
20
+ */
21
+ export declare function getLineIndexByCenter(targetLines: LineSegment[], lines: LineSegment[]): any[];
22
+ /** 原始线段数据转为内部线段数据
23
+ * @param data
24
+ * @returns
25
+ */
26
+ export declare function originalDataToLineData(data: OriginalDataItem[]): {
27
+ originalZAverage: number;
28
+ lineSegments: LineSegment<LineUserData>[];
29
+ verticalReferenceIndex: number;
30
+ };
31
+ /**
32
+ * @param line
33
+ * @param originalZAverage
34
+ * @param quadtree
35
+ * @param lines
36
+ * @returns
37
+ */
38
+ export declare function toOriginalDataItem(line: LineSegment<LineUserData>, originalZAverage?: number, quadtree?: Quadtree, lines?: LineSegment[]): OriginalDataItem;
39
+ /**
40
+ * 线段数据转为原始json数据
41
+ */
42
+ export declare function lineDataToOriginalData(lines: LineSegment<LineUserData>[], originalZAverage?: number, quadtree?: Quadtree): OriginalDataItem[];
43
+ /** 从已有墙体线段,克隆一个新线段
44
+ * @param line
45
+ * @returns
46
+ */
47
+ export declare function deriveLine(line: LineSegment<LineUserData>): LineSegment<LineUserData>;
48
+ /** 根据交点,对线段进行裁剪
49
+ * @param lines
50
+ * @param minLen
51
+ * @returns
52
+ */
53
+ export declare function splitIntersectedLine(lines: LineSegment<LineUserData>[], minLen?: number, opt?: {
54
+ dedup?: boolean;
55
+ obstacle?: LineSegment[];
56
+ balconyRailing?: {
57
+ filteringRatio: number;
58
+ behavior?: "discard";
59
+ } | null;
60
+ }): LineSegment<Record<string, any>>[] | LineSegment<LineUserData>[];
61
+ /** 合并平行线
62
+ * @param lines
63
+ * @param callBack
64
+ * @param removeLines
65
+ * @param newLines
66
+ * @returns
67
+ */
68
+ export declare function mergeChainsLine(lines: LineSegment<LineUserData>[], callBack?: (newLine: LineSegment, group: LineSegment[]) => void, removeLines?: Set<LineSegment<Record<string, any>>>, newLines?: LineSegment[]): LineSegment<LineUserData>[];
69
+ /** 拆分线段userData
70
+ * @param newLine
71
+ * @param line2
72
+ */
73
+ export declare function clippingLineUserData(newLine: LineSegment<LineUserData>, line2: LineSegment<LineUserData>): void;
74
+ /** 合并线段userData
75
+ * @param line1
76
+ * @param line2
77
+ */
78
+ export declare function mergeLineUserData(newLine: LineSegment<LineUserData>, line2: LineSegment<LineUserData> | LineSegment<LineUserData>[]): void;
79
+ /** 获取内侧墙线段
80
+ * @param lines
81
+ * @param trajectory
82
+ */
83
+ export declare function innerWallLine(lines: LineSegment<LineUserData>[], trajectory: Record<string, {
84
+ x: number;
85
+ y: number;
86
+ z: number;
87
+ }>): (LineSegment<Record<string, any>> | LineSegment<{
88
+ quadtreeNode?: import('../../utils').QuadtreeNode;
89
+ } & import('../type').WallLineGlobalOption & {
90
+ expandDirect?: "left" | "right" | "on";
91
+ }>)[];