build-dxf 0.1.15 → 0.1.17

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 (62) hide show
  1. package/package.json +1 -1
  2. package/src/DomEventRegister.js +472 -0
  3. package/src/build.js +3352 -3847
  4. package/src/index.css +1 -131
  5. package/src/index.js +10 -10
  6. package/src/index2.js +2 -155
  7. package/src/index3.js +6295 -2640
  8. package/src/pages/ModelView.vue.d.ts +11 -0
  9. package/src/utils/DxfSystem/DxfSystem.d.ts +0 -3
  10. package/src/utils/DxfSystem/components/CorrectionDxf.d.ts +26 -2
  11. package/src/utils/DxfSystem/components/Dxf.d.ts +3 -2
  12. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/ClippingLine.d.ts +1 -2
  13. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/CommandFlowComponent.d.ts +7 -2
  14. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/DeleteSelectLine.d.ts +1 -1
  15. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/DrawDoorLine.d.ts +2 -3
  16. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/DrawLine.d.ts +3 -5
  17. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/DrawWindow.d.ts +2 -3
  18. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/MergeLine.d.ts +1 -1
  19. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/PointDrag.d.ts +2 -3
  20. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/SelectAll.d.ts +1 -1
  21. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/{IntersectionConnectionLine.d.ts → TwoLineConnectionLine.d.ts} +3 -3
  22. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/{ConnectionLine.d.ts → TwoPointConnection.d.ts} +3 -3
  23. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/{VerticalCorrection.d.ts → VerticalCorr.d.ts} +2 -12
  24. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/{DeleteSelectWindow.d.ts → VerticalCorrContinue.d.ts} +10 -8
  25. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/VerticalReferenceLine.d.ts +1 -1
  26. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/ViewAngle.d.ts +1 -1
  27. package/src/utils/DxfSystem/plugin/Editor/components/index.d.ts +1 -1
  28. package/src/utils/DxfSystem/plugin/RenderPlugin/components/Renderer.d.ts +1 -0
  29. package/src/utils/DxfSystem/plugin/RenderPlugin/index.d.ts +1 -2
  30. package/src/utils/DxfSystem/type.d.ts +2 -0
  31. package/src/utils/DxfSystem/utils/CAD.d.ts +0 -4
  32. package/src/utils/DxfSystem/utils/DoorFind.d.ts +36 -0
  33. package/src/utils/DxfSystem/utils/DoubleWallHelper.d.ts +4 -0
  34. package/src/utils/{modelScenario → DxfSystem/utils}/SceneAutoGenerat.d.ts +3 -1
  35. package/src/utils/DxfSystem/utils/index.d.ts +1 -5
  36. package/src/utils/GpuComputed.d.ts +30 -0
  37. package/src/utils/LineSegment.d.ts +9 -0
  38. package/src/utils/Map.d.ts +1 -0
  39. package/src/utils/MaxiCircles.d.ts +13 -0
  40. package/src/utils/MiniCircles.d.ts +33 -0
  41. package/src/utils/Point.d.ts +1 -1
  42. package/src/utils/{PointVirtualGrid/index.d.ts → PointVirtualGrid.d.ts} +5 -5
  43. package/src/utils/Polygon.d.ts +11 -0
  44. package/src/utils/UndirectedGraph.d.ts +4 -0
  45. package/src/utils/index.d.ts +4 -2
  46. package/src/bin/Main.js +0 -269
  47. package/src/bin/mini_cycles.js +0 -15
  48. package/src/bin/mini_cycles.wasm +0 -0
  49. package/src/bin/mini_cycles.wasm.map +0 -1
  50. package/src/bin/wasm_mini_cycles.js +0 -296
  51. package/src/index4.js +0 -4261
  52. package/src/utils/DxfSystem/components/DoorsAnalysis.d.ts +0 -115
  53. package/src/utils/DxfSystem/plugin/RenderPlugin/pages/Dxf.vue.d.ts +0 -21
  54. package/src/utils/DxfSystem/utils/closedPathArea.d.ts +0 -2
  55. package/src/utils/DxfSystem/utils/findClosedPolygons.d.ts +0 -14
  56. package/src/utils/DxfSystem/utils/findLargestCircle.d.ts +0 -14
  57. package/src/utils/DxfSystem/utils/mergeSmallestCircle.d.ts +0 -14
  58. package/src/utils/DxfSystem/utils/smallestCircle.d.ts +0 -6
  59. package/src/utils/deepClone.d.ts +0 -6
  60. package/src/utils/drawLinePathToPng.d.ts +0 -7
  61. /package/src/utils/{Lines.d.ts → DxfSystem/utils/Lines.d.ts} +0 -0
  62. /package/src/utils/{LoadModel.d.ts → DxfSystem/utils/LoadModel.d.ts} +0 -0
@@ -1,115 +0,0 @@
1
- import { Component, ComponentManager } from '../../ComponentManager';
2
- import { Dxf } from './Dxf';
3
- import { Quadtree } from '../../Quadtree';
4
- import { LineSegment } from '../../LineSegment';
5
- import { Point } from '../../Point';
6
- import { PointVirtualGrid } from '../../PointVirtualGrid';
7
- type ProjectionAnalysisResult = {
8
- source: LineSegment;
9
- sourceIndex: number;
10
- target: LineSegment;
11
- targetIndex: number;
12
- project: LineSegment;
13
- project2: LineSegment;
14
- };
15
- type DoorPoint = {
16
- line: LineSegment;
17
- point: Point;
18
- uuid: string;
19
- };
20
- declare class DoorsAnalysis {
21
- possibleDoorPoints: DoorPoint[];
22
- doorPoint: DoorPoint[];
23
- calculatedDoorPoint: DoorPoint[];
24
- dxf: Dxf;
25
- pointVirtualGrid: PointVirtualGrid<LineSegment<Record<string, any>>>;
26
- findPointVirtualGrid: PointVirtualGrid<LineSegment>;
27
- quadtree: Quadtree;
28
- resultList: ProjectionAnalysisResult[];
29
- lineSegments: LineSegment[];
30
- doorSearchNearAngle: number;
31
- doorSearchDistance: number;
32
- doors: LineSegment[];
33
- continueFind: boolean;
34
- constructor(dxf: Dxf, skipFindDoor: boolean);
35
- private handle;
36
- /** 查找
37
- * @param doorPoints
38
- * @param possibleDoorPoints
39
- * @param minDoorWidth
40
- * @param doorSearchDistance
41
- * @param doorSearchNearAngle
42
- * @returns
43
- */
44
- private search;
45
- /** 添加可查找点的过滤规则
46
- * @param rule
47
- */
48
- addPointsExcludeRule(rule: (line: LineSegment, point: Point, pointIndex: number) => boolean): void;
49
- private _pointsExcludeRule;
50
- /**
51
- * 查找所有可能为门的点位
52
- */
53
- getPossiblePoints(): DoorPoint[];
54
- /**
55
- * 查找已知为门的点位
56
- */
57
- getDoorPoint(): {
58
- doorPoints: DoorPoint[];
59
- calculatedDoorPoint: DoorPoint[];
60
- };
61
- /**
62
- * 查找双线墙的点位
63
- * @returns
64
- */
65
- searchDoubleLinePoint(): Map<number, 0 | 1 | -1>;
66
- /** 查找方案一:最近点查找
67
- * @description 以点为圆心,查找半径内符合角度的点
68
- * @param doorPoints
69
- * @param possibleDoorPoints
70
- * @param doorSearchDistance 查找的距离(半径)
71
- * @param doorSearchNearAngle 查找的角度
72
- * @returns
73
- */
74
- searchNearby(doorPoints: DoorPoint[], possibleDoorPoints?: DoorPoint[], doorSearchDistance?: number, doorSearchNearAngle?: number): any[];
75
- /** 方案二: 沿方向查找
76
- * @description
77
- * @param param0
78
- * @returns
79
- */
80
- searchAlongDirection({ point, line }: DoorPoint, doorSearchDistance?: number): {
81
- point: Point;
82
- line: LineSegment<Record<string, any>>;
83
- } | undefined;
84
- /** 方案三: 沿法线方向查找
85
- * @description
86
- * @param param0
87
- * @param doorSearchDistance
88
- * @returns
89
- */
90
- searchAlongNormalDirection({ point, line }: DoorPoint, doorSearchDistance?: number): {
91
- point: Point;
92
- line: LineSegment<Record<string, any>>;
93
- } | undefined;
94
- /**
95
- *
96
- * @param line
97
- * @returns
98
- */
99
- findLongLineSegment(line: LineSegment): LineSegment<Record<string, any>>;
100
- }
101
- export declare class DoorsAnalysisComponent extends Component<{
102
- analysisCompleted: {};
103
- }> {
104
- doorSearchNearAngle: number;
105
- doorSearchDistance: number;
106
- DoorsAnalysis?: DoorsAnalysis;
107
- skipFindDoor: boolean;
108
- doors: LineSegment[];
109
- /**
110
- *
111
- * @param parent
112
- */
113
- onAddFromParent(parent: ComponentManager): void;
114
- }
115
- export {};
@@ -1,21 +0,0 @@
1
- import { OriginalDataItem } from '../../../type';
2
- type __VLS_Props = {
3
- lines?: OriginalDataItem[];
4
- detailsPoint?: {
5
- position: {
6
- x: number;
7
- y: number;
8
- z: number;
9
- };
10
- direction: {
11
- x: number;
12
- y: number;
13
- z: number;
14
- };
15
- desc: string;
16
- }[];
17
- };
18
- 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, {
19
- elRef: HTMLDivElement;
20
- }, HTMLDivElement>;
21
- export default _default;
@@ -1,2 +0,0 @@
1
- import { Point } from '../../Point';
2
- export declare function closedPathArea(points: Point[]): number;
@@ -1,14 +0,0 @@
1
- import { LineSegment } from '../../LineSegment';
2
- /** 通过并查集,查找为环的一部分边
3
- * @description
4
- * @param lines
5
- */
6
- export declare function findRingEdges(lines: LineSegment[]): LineSegment<Record<string, any>>[];
7
- /**
8
- * 从线段集合中提取所有闭合多边形
9
- */
10
- export declare function findClosedPolygons(lines: LineSegment[]): {
11
- newLines: LineSegment<Record<string, any>>[];
12
- rings: LineSegment<Record<string, any>>[][];
13
- internalEdges: LineSegment<Record<string, any>>[];
14
- };
@@ -1,14 +0,0 @@
1
- import { LineSegment } from '../../LineSegment';
2
- /** 通过并查集,查找为环的一部分边
3
- * @description
4
- * @param lines
5
- */
6
- export declare function findCircleEdges(lines: LineSegment[]): LineSegment<Record<string, any>>[];
7
- /**
8
- * 从线段集合中提取所有闭合多边形
9
- */
10
- export declare function findLargestCircle(lines: LineSegment[]): {
11
- newLines: LineSegment<Record<string, any>>[];
12
- rings: LineSegment<Record<string, any>>[][];
13
- internalEdges: LineSegment<Record<string, any>>[];
14
- };
@@ -1,14 +0,0 @@
1
- import { LineSegment } from '../../LineSegment';
2
- /** 环去重
3
- * @param rings
4
- */
5
- export declare function ringsDeduplication(rings: LineSegment[][]): LineSegment<Record<string, any>>[][];
6
- /** 合并最小环、只留下外围环线
7
- * @description
8
- * @param lines
9
- * @param ringEdges
10
- */
11
- export declare function mergeSmallestCircle(rings: LineSegment[][], test?: boolean): {
12
- internalEdges: LineSegment<Record<string, any>>[];
13
- rings: LineSegment<Record<string, any>>[][];
14
- };
@@ -1,6 +0,0 @@
1
- import { LineSegment } from '../../LineSegment';
2
- /** 查找同侧能构成的最小环
3
- * @param lines
4
- * @param ringEdges
5
- */
6
- export declare function smallestCircle<T = any>(lines: LineSegment[], ringEdges: LineSegment[], halfCircle?: boolean): LineSegment<T>[][];
@@ -1,6 +0,0 @@
1
- /**
2
- * 实现深度克隆函数
3
- * @param value 要克隆的值
4
- * @returns 克隆后的新对象
5
- */
6
- export declare function deepClone<T>(value: T): T;
@@ -1,7 +0,0 @@
1
- /**
2
- * 55
3
- * @param points
4
- * @param width
5
- * @param height
6
- */
7
- export declare function drawLinePathToPng(points: number[][], width: number, height: number, color?: string, lineWidth?: number): string;