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,38 @@
1
+ import { Command } from '../Command';
2
+ import { ComponentContainer } from '../../../../../utils/ecs';
3
+ import { WindowValueOption } from './modifyWindow';
4
+ import { DoorValueOption } from './modifyDoor';
5
+ import { LineValueOption } from './modifyLine';
6
+ import * as THREE from "three";
7
+ type DataType = WindowValueOption | DoorValueOption | LineValueOption;
8
+ export declare class PointDrag extends Command<{
9
+ pointerMove: {
10
+ point: THREE.Vector3;
11
+ };
12
+ }> {
13
+ static name: string;
14
+ static shortcutKeys: string[];
15
+ static commandName: string;
16
+ container: THREE.Group<THREE.Object3DEventMap>;
17
+ showConfirm: import('vue').Ref<boolean, boolean>;
18
+ onAddFromParent(parent: ComponentContainer): void;
19
+ /** 选择线段
20
+ * @param next
21
+ * @returns
22
+ */
23
+ selectLine(next: any): Promise<void>;
24
+ verify(next: any, data: DataType): Promise<void>;
25
+ /** 执行完成
26
+ */
27
+ onCompleted(data: DataType): void;
28
+ /** 回滚操作
29
+ * @param data
30
+ */
31
+ protected onRollback(data: DataType): DataType;
32
+ /** 撤回回滚
33
+ * @param lines
34
+ * @returns
35
+ */
36
+ protected onRevokeRollback(data: any): any;
37
+ }
38
+ export {};
@@ -0,0 +1,40 @@
1
+ import { LineUserData } from '../../../../type';
2
+ import { PointDrag } from '.';
3
+ import { LineSegment } from '../../../../../utils/algorithms/LineSegment';
4
+ export type DoorValueOption = {
5
+ type: "door";
6
+ list: {
7
+ line: LineSegment<LineUserData>;
8
+ old: {
9
+ start: {
10
+ x: number;
11
+ y: number;
12
+ z: number;
13
+ };
14
+ end: {
15
+ x: number;
16
+ y: number;
17
+ z: number;
18
+ };
19
+ };
20
+ new: {
21
+ start: {
22
+ x: number;
23
+ y: number;
24
+ z: number;
25
+ };
26
+ end: {
27
+ x: number;
28
+ y: number;
29
+ z: number;
30
+ };
31
+ };
32
+ }[];
33
+ };
34
+ /**
35
+ * 关系门
36
+ * @param context
37
+ * @param line
38
+ * @returns
39
+ */
40
+ export declare function modifyDoor(context: PointDrag, line: LineSegment<LineUserData>): Promise<DoorValueOption>;
@@ -0,0 +1,34 @@
1
+ import { LineUserData } from '../../../../type';
2
+ import { PointDrag } from '.';
3
+ import { LineSegment } from '../../../../../utils/algorithms/LineSegment';
4
+ export type LineValueOption = {
5
+ type: "line";
6
+ list: {
7
+ line: LineSegment<LineUserData>;
8
+ old: {
9
+ start: {
10
+ x: number;
11
+ y: number;
12
+ z: number;
13
+ };
14
+ end: {
15
+ x: number;
16
+ y: number;
17
+ z: number;
18
+ };
19
+ };
20
+ new: {
21
+ start: {
22
+ x: number;
23
+ y: number;
24
+ z: number;
25
+ };
26
+ end: {
27
+ x: number;
28
+ y: number;
29
+ z: number;
30
+ };
31
+ };
32
+ }[];
33
+ };
34
+ export declare function modifyLine(context: PointDrag, line: LineSegment<LineUserData>): Promise<LineValueOption>;
@@ -0,0 +1,25 @@
1
+ import { PointDrag } from '.';
2
+ import { LineSegment } from '../../../../../utils/algorithms/LineSegment';
3
+ import { HoleData, LineUserData } from '../../../../type';
4
+ export type WindowValueOption = {
5
+ type: "window";
6
+ line: LineSegment<LineUserData>;
7
+ holeData: HoleData;
8
+ old: {
9
+ p: {
10
+ x: number;
11
+ y: number;
12
+ z: number;
13
+ };
14
+ width: number;
15
+ };
16
+ new: {
17
+ p: {
18
+ x: number;
19
+ y: number;
20
+ z: number;
21
+ };
22
+ width: number;
23
+ };
24
+ };
25
+ export declare function modifyWindow(context: PointDrag, winLine: LineSegment, line: LineSegment<LineUserData>): Promise<WindowValueOption>;
@@ -0,0 +1,33 @@
1
+ import { Command } from './Command';
2
+ import { ComponentContainer } from '../../../../utils/ecs';
3
+ import { LineSegment } from '../../../../utils/algorithms/LineSegment';
4
+ import * as THREE from "three";
5
+ export declare class PropertiesPanel extends Command<{}> {
6
+ static name: string;
7
+ container: THREE.Group<THREE.Object3DEventMap>;
8
+ static shortcutKeys: string[];
9
+ static commandName: string;
10
+ isOpen: boolean;
11
+ onAddFromParent(parent: ComponentContainer): void;
12
+ getSelectLines(): {
13
+ list: LineSegment<import('../../../type').LineUserData>[];
14
+ winList: LineSegment<Record<string, any>>[];
15
+ };
16
+ private constraint;
17
+ /** 选择开始点
18
+ * @param next
19
+ */
20
+ open(next: any): void;
21
+ /** 执行完成
22
+ */
23
+ completed(): void;
24
+ /** 回滚操作
25
+ * @param data
26
+ */
27
+ private rollback;
28
+ /** 撤回回滚
29
+ * @param lines
30
+ * @returns
31
+ */
32
+ private revokeRollback;
33
+ }
@@ -0,0 +1,23 @@
1
+ import { Command } from './Command';
2
+ import { ComponentContainer } from '../../../../utils/ecs';
3
+ import { Point } from '../../../../utils/algorithms/Point';
4
+ import * as THREE from "three";
5
+ /**
6
+ * 生成长度标记辅助虚线
7
+ */
8
+ export declare function buildDashedHelperLine(start: Point, end: Point, offset?: number): Point[];
9
+ export declare class RayDistance extends Command<{}> {
10
+ static name: string;
11
+ container: THREE.Group<THREE.Object3DEventMap>;
12
+ static shortcutKeys: string[];
13
+ static commandName: string;
14
+ onAddFromParent(parent: ComponentContainer): void;
15
+ /** 选择点
16
+ * @param next
17
+ */
18
+ private selectPoint;
19
+ /** 射线
20
+ * @param points
21
+ */
22
+ private ray;
23
+ }
@@ -0,0 +1,30 @@
1
+ import { Command } from './Command';
2
+ import { ComponentContainer } from '../../../../utils/ecs';
3
+ import { LineSegment } from '../../../../utils/algorithms/LineSegment';
4
+ import * as THREE from "three";
5
+ /**
6
+ * 选择全部命令
7
+ */
8
+ export declare class SelectAll extends Command<{}> {
9
+ static name: string;
10
+ container: THREE.Group<THREE.Object3DEventMap>;
11
+ static shortcutKeys: string[];
12
+ static commandName: string;
13
+ onAddFromParent(parent: ComponentContainer): void;
14
+ /** 开始
15
+ * @param next
16
+ */
17
+ selectAll(next: any): void;
18
+ /** 执行完成
19
+ */
20
+ completed(lines: LineSegment[]): void;
21
+ /** 回滚操作
22
+ * @param lines
23
+ */
24
+ private rollback;
25
+ /** 撤回回滚
26
+ * @param lines
27
+ * @returns
28
+ */
29
+ private revokeRollback;
30
+ }
@@ -0,0 +1,33 @@
1
+ import { Command } from './Command';
2
+ import { ComponentContainer } from '../../../../utils/ecs';
3
+ /**
4
+ * 两线段链接
5
+ */
6
+ export declare class TwoLineConnectionLine extends Command<{}> {
7
+ static name: string;
8
+ static shortcutKeys: string[];
9
+ static commandName: string;
10
+ onAddFromParent(parent: ComponentContainer): void;
11
+ /**
12
+ * 进入命令约束
13
+ */
14
+ private constraint;
15
+ /** 开始
16
+ * @param next
17
+ */
18
+ private connection;
19
+ /** 执行完成
20
+ * @param next
21
+ * @param selectLines
22
+ */
23
+ private completed;
24
+ /** 回滚操作
25
+ * @param data
26
+ */
27
+ private rollback;
28
+ /** 撤回回滚
29
+ * @param lines
30
+ * @returns
31
+ */
32
+ private revokeRollback;
33
+ }
@@ -0,0 +1,33 @@
1
+ import { Command } from './Command';
2
+ import { ComponentContainer } from '../../../../utils/ecs';
3
+ /**
4
+ * 两点链接
5
+ */
6
+ export declare class TwoPointConnection extends Command<{}> {
7
+ static name: string;
8
+ static shortcutKeys: string[];
9
+ static commandName: string;
10
+ onAddFromParent(parent: ComponentContainer): void;
11
+ /**
12
+ * 进入命令约束
13
+ */
14
+ private constraint;
15
+ /** 连接
16
+ * @param next
17
+ */
18
+ private connection;
19
+ /** 成功
20
+ * @param next
21
+ * @param selectLines
22
+ */
23
+ private completed;
24
+ /** 回滚操作
25
+ * @param data
26
+ */
27
+ private rollback;
28
+ /** 撤回回滚
29
+ * @param lines
30
+ * @returns
31
+ */
32
+ private revokeRollback;
33
+ }
@@ -0,0 +1,66 @@
1
+ import { Command } from './Command';
2
+ import { ComponentContainer } from '../../../../utils/ecs';
3
+ import { LineSegment } from '../../../../utils/algorithms/LineSegment';
4
+ import { Point } from '../../../../utils/algorithms/Point';
5
+ import { LineUserData } from '../../../type';
6
+ import * as THREE from "three";
7
+ /**
8
+ * 垂直纠正
9
+ */
10
+ export declare class VerticalCorr extends Command<{}> {
11
+ static name: string;
12
+ container: THREE.Group<THREE.Object3DEventMap>;
13
+ static shortcutKeys: string[];
14
+ static commandName: string;
15
+ onAddFromParent(parent: ComponentContainer): void;
16
+ /**
17
+ * 进入命令约束
18
+ */
19
+ constraint(next: any, selectLines: LineSegment[]): void;
20
+ /**
21
+ * @param line0
22
+ * @param line1
23
+ */
24
+ isTowLineSegmentConnect(line0: LineSegment, line1: LineSegment): boolean;
25
+ /**
26
+ * @param line
27
+ * @param newStartPoint
28
+ * @param newEndPoint
29
+ * @param mode 需要匹配的点
30
+ * @param record
31
+ * @param id
32
+ * @returns
33
+ */
34
+ setLinePoint(line: LineSegment, newStartPoint: Point, newEndPoint: Point, mode?: "start" | "end" | "all" | "none", resultList?: any[], id?: string): {
35
+ point: Point;
36
+ userData?: LineSegment<LineUserData>;
37
+ }[];
38
+ /** 修正2
39
+ * 第一步:确定需要修复的线段
40
+ * 第二步:查找与该线段相交的其他线段
41
+ * 第三步:找出两端点相交的线段,其他为区间相交
42
+ * 第四步:修正相交的线段的另一个端点
43
+ * 第五步:判断是否有方向一致的线段,有就调整,调整方法:查找连续平行的线段,求点在线段方向的投影,直到不平行的线段结束
44
+ * 第六步: 中间线段采用投影修正
45
+ * @param targettLine
46
+ * @param vistedList
47
+ */
48
+ correction(targettLine: LineSegment, resultList?: any[], vistedList?: Set<LineSegment>): any[];
49
+ /** 开始
50
+ * @param next
51
+ */
52
+ verticalCorrection(next: any, selectLines: LineSegment[]): void;
53
+ /** 执行完成
54
+ * @param data
55
+ */
56
+ private completed;
57
+ /** 回滚操作
58
+ * @param data
59
+ */
60
+ private rollback;
61
+ /** 撤回回滚
62
+ * @param lines
63
+ * @returns
64
+ */
65
+ private revokeRollback;
66
+ }
@@ -0,0 +1,35 @@
1
+ import { Command } from './Command';
2
+ import { ComponentContainer } from '../../../../utils/ecs';
3
+ import { LineSegment } from '../../../../utils/algorithms/LineSegment';
4
+ import * as THREE from "three";
5
+ /**
6
+ * 连续垂直纠正
7
+ */
8
+ export declare class VerticalCorrContinue extends Command<{}> {
9
+ static name: string;
10
+ container: THREE.Group<THREE.Object3DEventMap>;
11
+ static shortcutKeys: string[];
12
+ static commandName: string;
13
+ onAddFromParent(parent: ComponentContainer): void;
14
+ /**
15
+ * 进入命令约束
16
+ */
17
+ constraint(next: any, selectLines: LineSegment[]): void;
18
+ /** 开始
19
+ * @param next
20
+ */
21
+ verticalCorrection(next: any, selectLines: LineSegment[]): void;
22
+ /** 执行完成
23
+ * @param data
24
+ */
25
+ onCompleted(data: any): void;
26
+ /** 回滚操作
27
+ * @param data
28
+ */
29
+ onRollback(data: any): any;
30
+ /** 撤回回滚
31
+ * @param lines
32
+ * @returns
33
+ */
34
+ onRevokeRollback(data: any): any;
35
+ }
@@ -0,0 +1,21 @@
1
+ import { Command } from './Command';
2
+ import { ComponentContainer } from '../../../../utils/ecs';
3
+ /**
4
+ * 合并同向线段
5
+ */
6
+ export declare class ViewAngle extends Command<{}> {
7
+ static name: string;
8
+ static shortcutKeys: string[];
9
+ static commandName: string;
10
+ onAddFromParent(parent: ComponentContainer): void;
11
+ /**
12
+ * 进入命令约束
13
+ */
14
+ private constraint;
15
+ /**
16
+ *
17
+ * @param next
18
+ * @param selectLines
19
+ */
20
+ private viewAngle;
21
+ }
@@ -0,0 +1,56 @@
1
+ import { Component } from '../../../utils/ecs';
2
+ import { Dxf } from '../../components/Dxf';
3
+ import { Variable } from '../../components/Variable';
4
+ import { Renderer, DomContainer, DomEventRegister, EventInput } from '../renderer/components';
5
+ import { RenderManager } from './RenderManager';
6
+ import { CommandManager } from '../../../utils/command';
7
+ import { App } from 'vue';
8
+ import { DxfSystem } from '../..';
9
+ import { LineSegment } from '../../../utils/index.ts';
10
+ import * as THREE from "three";
11
+ export declare class Editor extends Component<{
12
+ pointerPositionChange: {
13
+ position: THREE.Vector2;
14
+ };
15
+ cancelCommand: {};
16
+ drawHoleCommandStateChange: {
17
+ point: THREE.Vector3;
18
+ line?: LineSegment | null;
19
+ hole?: LineSegment | null;
20
+ };
21
+ }> {
22
+ static name: string;
23
+ container: THREE.Group<THREE.Object3DEventMap>;
24
+ get renderer(): Renderer;
25
+ get dxf(): Dxf;
26
+ get variable(): Variable;
27
+ get eventInput(): EventInput;
28
+ get renderManager(): RenderManager;
29
+ get domEventRegister(): DomEventRegister;
30
+ get domContainer(): DomContainer;
31
+ commandManager: CommandManager;
32
+ plane: THREE.Mesh<THREE.PlaneGeometry, THREE.Material | THREE.Material[], THREE.Object3DEventMap>;
33
+ app?: App<Element>;
34
+ domElement: HTMLDivElement;
35
+ viewPermission?: "admin";
36
+ imgEl: HTMLImageElement;
37
+ imgWidth: number;
38
+ constructor(viewPermission?: "admin");
39
+ onAddFromParent(parent: DxfSystem): void;
40
+ /**
41
+ * 取消命令,由其他命令组件监听事件后注册事件监听实现
42
+ */
43
+ cancelCommand(): void;
44
+ coords: THREE.Vector2;
45
+ pointerPosition: THREE.Vector2;
46
+ private _exitEditCallBack?;
47
+ /**
48
+ * 打开编辑器
49
+ */
50
+ openEdit(): void;
51
+ /**
52
+ * 退出编辑
53
+ */
54
+ exitEdit(): void;
55
+ destroy(): void;
56
+ }
@@ -0,0 +1,101 @@
1
+ import { LineSegment } from '../../../utils/algorithms/LineSegment';
2
+ import { Component } from '../../../utils/ecs';
3
+ import { Variable } from '../../components/Variable';
4
+ import { EventInput, Renderer } from '../renderer/components';
5
+ import { PointSpatialHash } from '../../../utils/algorithms/PointSpatialHash';
6
+ import { Editor } from './Editor';
7
+ import { Quadtree } from '../../../utils/algorithms/Quadtree';
8
+ import { DxfLineModel } from '../model3d/components';
9
+ import { LineUserData, OriginalDataItem } from '../../type';
10
+ import { Dxf } from '../../components/Dxf';
11
+ import * as THREE from "three";
12
+ export type AdsorptionResult = {
13
+ point: THREE.Vector3;
14
+ find: boolean;
15
+ mode: string;
16
+ line: LineSegment<Record<string, any>>;
17
+ } | {
18
+ point: THREE.Vector3;
19
+ find: boolean;
20
+ line: undefined;
21
+ mode: undefined;
22
+ };
23
+ export declare class RenderManager extends Component<{
24
+ adsorptionPointChange: AdsorptionResult;
25
+ }> {
26
+ static name: string;
27
+ container: THREE.Group<THREE.Object3DEventMap>;
28
+ lines: LineSegment<LineUserData>[];
29
+ pointVirtualGrid: PointSpatialHash<LineSegment<LineUserData>>;
30
+ quadtree: Quadtree<any>;
31
+ verticalReferenceLineFlag: THREE.Mesh<THREE.PlaneGeometry, THREE.MeshBasicMaterial, THREE.Object3DEventMap>;
32
+ onAddFromParent(): void;
33
+ private updatedMode;
34
+ /** 重新设置数据
35
+ */
36
+ reset(): void;
37
+ /** 添加线段
38
+ * @param line
39
+ */
40
+ addLine(line: LineSegment<LineUserData>, needdraw?: boolean): void;
41
+ /**
42
+ * 批量添加
43
+ * @param lines
44
+ */
45
+ addLines(lines: LineSegment<LineUserData>[], needdraw?: boolean): void;
46
+ /** 移除线段
47
+ * @param line
48
+ */
49
+ removeLine(line: LineSegment<LineUserData>, needdraw?: boolean): void;
50
+ /**
51
+ * 删除
52
+ * @param lines
53
+ */
54
+ removeLines(lines: LineSegment<LineUserData>[], needdraw?: boolean): void;
55
+ /** 移除所有
56
+ * @param needdraw
57
+ */
58
+ removeLineAll(needdraw?: boolean): void;
59
+ /** 创建几何体
60
+ * @param rectangle
61
+ */
62
+ createGeometry(map: Record<string, number[]>, count: number): THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>;
63
+ lineAdsorption: import('vue').Ref<boolean, boolean>;
64
+ pointAdsorption: import('vue').Ref<boolean, boolean>;
65
+ /** 获取鼠标当前点, 吸附后的点
66
+ * @param point
67
+ * @returns
68
+ */
69
+ adsorption(radius?: number, quadtree?: Quadtree): AdsorptionResult;
70
+ /**
71
+ * 辅助线吸附
72
+ */
73
+ auxiliaryLineAdsorption(radius?: number | null, quadtree?: Quadtree): AdsorptionResult;
74
+ /** 设置辅助线的显示
75
+ * @param b
76
+ */
77
+ private lineDashed1;
78
+ private lineDashed2;
79
+ private lineDashedText1;
80
+ private lineDashedText2;
81
+ setAuxiliaryLineVisible(b: boolean): void;
82
+ /**
83
+ * 转为json
84
+ */
85
+ toJson(): OriginalDataItem[];
86
+ private debouncing;
87
+ /**
88
+ * 同步到dxf
89
+ */
90
+ synchronizeDxf(): void;
91
+ /**
92
+ * 绘制
93
+ */
94
+ draw(synchronize?: boolean): void;
95
+ get renderer(): Renderer;
96
+ get dxf(): Dxf;
97
+ get variable(): Variable;
98
+ get eventInput(): EventInput;
99
+ get editor(): Editor;
100
+ get dxfLineModel(): DxfLineModel;
101
+ }
@@ -0,0 +1,9 @@
1
+ import { DxfSystem } from '../../DxfSystem';
2
+ type Option = {
3
+ viewPermission?: "admin";
4
+ };
5
+ export declare function Editor_(dxfSystem: DxfSystem, option?: Option): void;
6
+ declare const EditorPlugin: typeof Editor_ & {
7
+ create(option?: Option): (dxfSystem: DxfSystem) => void;
8
+ };
9
+ export { EditorPlugin };
@@ -0,0 +1,7 @@
1
+ import { DxfSystem } from '../../../../DxfSystem';
2
+ type __VLS_Props = {
3
+ dxfSystem: DxfSystem;
4
+ permission?: "admin";
5
+ };
6
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
7
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { DxfSystem } from '../../../../DxfSystem';
2
+ type __VLS_Props = {
3
+ dxfSystem: DxfSystem;
4
+ permission?: "admin";
5
+ };
6
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
7
+ export default _default;
@@ -0,0 +1,18 @@
1
+ import { LineUserData } from '../../../type';
2
+ import { LineSegment } from '../../../../utils/algorithms/LineSegment';
3
+ import { Ref } from 'vue';
4
+ type __VLS_Props = {
5
+ selectLines: Ref<LineSegment<LineUserData & {
6
+ isSelectWindow: boolean;
7
+ groundClearance: number;
8
+ width: number;
9
+ }>[]>;
10
+ };
11
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
12
+ update: (...args: any[]) => void;
13
+ clickIcon: (...args: any[]) => void;
14
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ onUpdate?: ((...args: any[]) => any) | undefined;
16
+ onClickIcon?: ((...args: any[]) => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
18
+ export default _default;
@@ -0,0 +1,17 @@
1
+ type __VLS_Props = {
2
+ titleColor?: string;
3
+ titleSize?: string;
4
+ icon?: string;
5
+ iconSize?: string;
6
+ title?: string;
7
+ };
8
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
9
+ click: (...args: any[]) => void;
10
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
11
+ onClick?: ((...args: any[]) => any) | undefined;
12
+ }>, {
13
+ titleColor: string;
14
+ titleSize: string;
15
+ iconSize: string;
16
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
17
+ export default _default;
@@ -0,0 +1,13 @@
1
+ type __VLS_PublicProps = {
2
+ "modelValue"?: number;
3
+ };
4
+ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
5
+ blur: (...args: any[]) => void;
6
+ change: (...args: any[]) => void;
7
+ "update:modelValue": (value: number) => void;
8
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
9
+ onBlur?: ((...args: any[]) => any) | undefined;
10
+ onChange?: ((...args: any[]) => any) | undefined;
11
+ "onUpdate:modelValue"?: ((value: number) => any) | undefined;
12
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLInputElement>;
13
+ export default _default;