build-dxf 0.0.43 → 0.0.45
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.
- package/package.json +1 -1
- package/src/build.d.ts +1 -2
- package/src/build.js +2217 -1580
- package/src/index.css +1 -1
- package/src/index.js +1 -1
- package/src/index3.js +501 -501
- package/src/pages/Editor.vue.d.ts +1 -1
- package/src/pages/{Dxf.vue.d.ts → WallView.vue.d.ts} +3 -1
- package/src/selectLocalFile.js +792 -796
- package/src/utils/DxfSystem/DxfSystem.d.ts +4 -0
- package/src/utils/DxfSystem/components/AngleCorrectionDxf.d.ts +2 -2
- package/src/utils/DxfSystem/components/DoorsAnalysis.d.ts +118 -0
- package/src/utils/DxfSystem/components/Dxf.d.ts +4 -4
- package/src/utils/DxfSystem/components/LineAnalysis.d.ts +3 -97
- package/src/utils/DxfSystem/components/ThreeVJia.d.ts +27 -2
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/ClippingLine.d.ts +1 -1
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/CommandFlowComponent.d.ts +2 -2
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/Default.d.ts +1 -1
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/DrawWindow.d.ts +1 -1
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/PointDrag.d.ts +1 -1
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/SelectAll.d.ts +1 -1
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/VerticalCorrection.d.ts +2 -2
- package/src/utils/DxfSystem/plugin/Editor/components/Editor.d.ts +1 -1
- package/src/utils/DxfSystem/plugin/Editor/components/RenderManager.d.ts +5 -5
- package/src/utils/DxfSystem/plugin/RenderPlugin/components/ModelDataRender.d.ts +1 -1
- package/src/utils/DxfSystem/plugin/RenderPlugin/components/Renderer.d.ts +3 -3
- package/src/utils/DxfSystem/type.d.ts +14 -4
- package/src/utils/DxfSystem/utils/AxisAlignCorr.d.ts +1 -1
- package/src/utils/DxfSystem/utils/BoundExt.d.ts +3 -3
- package/src/utils/DxfSystem/utils/DoubleWallHelper.d.ts +19 -0
- package/src/utils/DxfSystem/utils/clippingDoubleWall.d.ts +6 -0
- package/src/utils/DxfSystem/utils/clippingLineUserData.d.ts +7 -0
- package/src/utils/DxfSystem/utils/closedPathArea.d.ts +2 -0
- package/src/utils/DxfSystem/utils/createPointVirtualGrid.d.ts +3 -0
- package/src/utils/DxfSystem/utils/drawHelper.d.ts +5 -5
- package/src/utils/DxfSystem/utils/findClosedPolygons.d.ts +22 -0
- package/src/utils/DxfSystem/utils/findClosedPolygons01.d.ts +27 -0
- package/src/utils/DxfSystem/utils/findDiscretePointLine.d.ts +14 -0
- package/src/utils/DxfSystem/utils/findVerticalReference.d.ts +1 -1
- package/src/utils/DxfSystem/utils/lineDataToOriginalData.d.ts +3 -2
- package/src/utils/DxfSystem/utils/lineSegmentClipping.d.ts +1 -1
- package/src/utils/DxfSystem/utils/mergeLineUserData.d.ts +7 -0
- package/src/utils/DxfSystem/utils/originalDataToLineData.d.ts +1 -1
- package/src/utils/DxfSystem/utils/recomputedWindow.d.ts +1 -1
- package/src/utils/{Quadtree/LineSegment.d.ts → LineSegment.d.ts} +35 -3
- package/src/utils/Map.d.ts +17 -0
- package/src/utils/{Quadtree/Point.d.ts → Point.d.ts} +9 -0
- package/src/utils/PointVirtualGrid/index.d.ts +12 -8
- package/src/utils/{Quadtree/Quadtree.d.ts → Quadtree.d.ts} +2 -2
- package/src/utils/UndirectedGraph.d.ts +28 -0
- package/src/utils/UnionFindSet.d.ts +12 -0
- package/src/utils/cloneUserData.d.ts +7 -0
- /package/src/utils/{Quadtree/Box2.d.ts → Box2.d.ts} +0 -0
- /package/src/utils/{Quadtree/Rectangle.d.ts → Rectangle.d.ts} +0 -0
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { ComponentManager } from '../ComponentManager';
|
|
2
2
|
import { AngleCorrectionDxf } from './components/AngleCorrectionDxf';
|
|
3
|
+
import { DoorsAnalysisComponent } from './components/DoorsAnalysis';
|
|
3
4
|
import { Dxf } from './components/Dxf';
|
|
5
|
+
import { LineAnalysis } from './components/LineAnalysis';
|
|
4
6
|
import { Variable } from './components/Variable';
|
|
5
7
|
export declare class DxfSystem extends ComponentManager {
|
|
6
8
|
Dxf: Dxf;
|
|
7
9
|
AngleCorrectionDxf: AngleCorrectionDxf;
|
|
8
10
|
Variable: Variable;
|
|
11
|
+
LineAnalysis: LineAnalysis;
|
|
12
|
+
DoorsAnalysis: DoorsAnalysisComponent;
|
|
9
13
|
wallWidth: number;
|
|
10
14
|
environment: "node" | "browser" | "unknown";
|
|
11
15
|
static finalInstance?: DxfSystem;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentManager } from '../../ComponentManager';
|
|
2
1
|
import { Dxf } from './Dxf';
|
|
2
|
+
import { DxfSystem } from '../DxfSystem';
|
|
3
3
|
/**
|
|
4
4
|
* 角度修正过后的DXF格式数据
|
|
5
5
|
*/
|
|
@@ -8,6 +8,6 @@ export declare class AngleCorrectionDxf extends Dxf<{
|
|
|
8
8
|
}> {
|
|
9
9
|
static name: string;
|
|
10
10
|
angle: number;
|
|
11
|
-
onAddFromParent(parent:
|
|
11
|
+
onAddFromParent(parent: DxfSystem): void;
|
|
12
12
|
update(): Promise<void>;
|
|
13
13
|
}
|
|
@@ -0,0 +1,118 @@
|
|
|
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
|
+
import { LineAnalysis } from './LineAnalysis';
|
|
8
|
+
type ProjectionAnalysisResult = {
|
|
9
|
+
source: LineSegment;
|
|
10
|
+
sourceIndex: number;
|
|
11
|
+
target: LineSegment;
|
|
12
|
+
targetIndex: number;
|
|
13
|
+
project: LineSegment;
|
|
14
|
+
project2: LineSegment;
|
|
15
|
+
};
|
|
16
|
+
type DoorPoint = {
|
|
17
|
+
line: LineSegment;
|
|
18
|
+
point: Point;
|
|
19
|
+
uuid: string;
|
|
20
|
+
};
|
|
21
|
+
declare class DoorsAnalysis {
|
|
22
|
+
possibleDoorPoints: DoorPoint[];
|
|
23
|
+
doorPoint: DoorPoint[];
|
|
24
|
+
calculatedDoorPoint: DoorPoint[];
|
|
25
|
+
dxf: Dxf;
|
|
26
|
+
pointVirtualGrid: PointVirtualGrid<LineSegment<Record<string, any>>>;
|
|
27
|
+
findPointVirtualGrid: PointVirtualGrid<LineSegment>;
|
|
28
|
+
quadtree: Quadtree;
|
|
29
|
+
resultList: ProjectionAnalysisResult[];
|
|
30
|
+
lineSegments: LineSegment[];
|
|
31
|
+
doorSearchNearAngle: number;
|
|
32
|
+
doorSearchDistance: number;
|
|
33
|
+
doors: LineSegment[];
|
|
34
|
+
lineAnalysis: LineAnalysis;
|
|
35
|
+
continueFind: boolean;
|
|
36
|
+
constructor(lineAnalysis: LineAnalysis);
|
|
37
|
+
private handle;
|
|
38
|
+
/** 查找
|
|
39
|
+
* @param doorPoints
|
|
40
|
+
* @param possibleDoorPoints
|
|
41
|
+
* @param minDoorWidth
|
|
42
|
+
* @param doorSearchDistance
|
|
43
|
+
* @param doorSearchNearAngle
|
|
44
|
+
* @returns
|
|
45
|
+
*/
|
|
46
|
+
private search;
|
|
47
|
+
/** 添加可查找点的过滤规则
|
|
48
|
+
* @param rule
|
|
49
|
+
*/
|
|
50
|
+
addPointsExcludeRule(rule: (line: LineSegment, point: Point, pointIndex: number) => boolean): void;
|
|
51
|
+
private _pointsExcludeRule;
|
|
52
|
+
/**
|
|
53
|
+
* 查找所有可能为门的点位
|
|
54
|
+
*/
|
|
55
|
+
getPossiblePoints(): DoorPoint[];
|
|
56
|
+
/**
|
|
57
|
+
* 查找已知为门的点位
|
|
58
|
+
*/
|
|
59
|
+
getDoorPoint(): {
|
|
60
|
+
doorPoints: DoorPoint[];
|
|
61
|
+
calculatedDoorPoint: DoorPoint[];
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* 查找双线墙的点位
|
|
65
|
+
* @returns
|
|
66
|
+
*/
|
|
67
|
+
searchDoubleLinePoint(): Map<number, 0 | 1 | -1>;
|
|
68
|
+
/** 查找方案一:最近点查找
|
|
69
|
+
* @description 以点为圆心,查找半径内符合角度的点
|
|
70
|
+
* @param doorPoints
|
|
71
|
+
* @param possibleDoorPoints
|
|
72
|
+
* @param doorSearchDistance 查找的距离(半径)
|
|
73
|
+
* @param doorSearchNearAngle 查找的角度
|
|
74
|
+
* @returns
|
|
75
|
+
*/
|
|
76
|
+
searchNearby(doorPoints: DoorPoint[], possibleDoorPoints?: DoorPoint[], doorSearchDistance?: number, doorSearchNearAngle?: number): any[];
|
|
77
|
+
/** 方案二: 沿方向查找
|
|
78
|
+
* @description
|
|
79
|
+
* @param param0
|
|
80
|
+
* @returns
|
|
81
|
+
*/
|
|
82
|
+
searchAlongDirection({ point, line }: DoorPoint, doorSearchDistance?: number): {
|
|
83
|
+
point: Point;
|
|
84
|
+
line: LineSegment<Record<string, any>>;
|
|
85
|
+
} | undefined;
|
|
86
|
+
/** 方案三: 沿法线方向查找
|
|
87
|
+
* @description
|
|
88
|
+
* @param param0
|
|
89
|
+
* @param doorSearchDistance
|
|
90
|
+
* @returns
|
|
91
|
+
*/
|
|
92
|
+
searchAlongNormalDirection({ point, line }: DoorPoint, doorSearchDistance?: number): {
|
|
93
|
+
point: Point;
|
|
94
|
+
line: LineSegment<Record<string, any>>;
|
|
95
|
+
} | undefined;
|
|
96
|
+
/**
|
|
97
|
+
*
|
|
98
|
+
* @param line
|
|
99
|
+
* @returns
|
|
100
|
+
*/
|
|
101
|
+
findLongLineSegment(line: LineSegment): LineSegment<Record<string, any>>;
|
|
102
|
+
}
|
|
103
|
+
export declare class DoorsAnalysisComponent extends Component<{
|
|
104
|
+
analysisCompleted: {};
|
|
105
|
+
}> {
|
|
106
|
+
doorSearchNearAngle: number;
|
|
107
|
+
doorSearchDistance: number;
|
|
108
|
+
DoorsAnalysis?: DoorsAnalysis;
|
|
109
|
+
skipFindDoor: boolean;
|
|
110
|
+
needsSaveDoor: boolean;
|
|
111
|
+
doors: LineSegment[];
|
|
112
|
+
/**
|
|
113
|
+
*
|
|
114
|
+
* @param parent
|
|
115
|
+
*/
|
|
116
|
+
onAddFromParent(parent: ComponentManager): void;
|
|
117
|
+
}
|
|
118
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Component } from '../../ComponentManager';
|
|
2
|
-
import { Point } from '../../
|
|
3
|
-
import { Box2 } from '../../
|
|
4
|
-
import { LineSegment } from '../../
|
|
5
|
-
import { Quadtree } from '../../Quadtree
|
|
2
|
+
import { Point } from '../../Point';
|
|
3
|
+
import { Box2 } from '../../Box2';
|
|
4
|
+
import { LineSegment } from '../../LineSegment';
|
|
5
|
+
import { Quadtree } from '../../Quadtree';
|
|
6
6
|
import { AxisAlignmentCorrectionOption, DataItem, DrawData, LineUserData, OriginalDataItem, Unit } from '../type';
|
|
7
7
|
/**
|
|
8
8
|
* 将点云结构转换为DXF格式
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Component, ComponentManager } from '../../ComponentManager';
|
|
2
2
|
import { Dxf } from './Dxf';
|
|
3
3
|
import { Variable } from './Variable';
|
|
4
|
-
import { Quadtree } from '../../Quadtree
|
|
5
|
-
import { LineSegment } from '../../
|
|
6
|
-
import { Point } from '../../
|
|
7
|
-
import { PointVirtualGrid } from '../../PointVirtualGrid';
|
|
4
|
+
import { Quadtree } from '../../Quadtree';
|
|
5
|
+
import { LineSegment } from '../../LineSegment';
|
|
6
|
+
import { Point } from '../../Point';
|
|
8
7
|
import * as THREE from "three";
|
|
9
8
|
type ProjectionAnalysisResult = {
|
|
10
9
|
source: LineSegment;
|
|
@@ -14,93 +13,6 @@ type ProjectionAnalysisResult = {
|
|
|
14
13
|
project: LineSegment;
|
|
15
14
|
project2: LineSegment;
|
|
16
15
|
};
|
|
17
|
-
type DoorPoint = {
|
|
18
|
-
line: LineSegment;
|
|
19
|
-
point: Point;
|
|
20
|
-
uuid: string;
|
|
21
|
-
};
|
|
22
|
-
declare class DoorsAnalysis {
|
|
23
|
-
possibleDoorPoints: DoorPoint[];
|
|
24
|
-
doorPoint: DoorPoint[];
|
|
25
|
-
calculatedDoorPoint: DoorPoint[];
|
|
26
|
-
dxf: Dxf;
|
|
27
|
-
pointVirtualGrid: PointVirtualGrid<LineSegment<Record<string, any>>>;
|
|
28
|
-
findPointVirtualGrid: PointVirtualGrid<LineSegment>;
|
|
29
|
-
quadtree: Quadtree;
|
|
30
|
-
resultList: ProjectionAnalysisResult[];
|
|
31
|
-
lineSegments: LineSegment[];
|
|
32
|
-
doorSearchNearAngle: number;
|
|
33
|
-
doorSearchDistance: number;
|
|
34
|
-
doors: LineSegment[];
|
|
35
|
-
lineAnalysis: LineAnalysis;
|
|
36
|
-
continueFind: boolean;
|
|
37
|
-
constructor(lineAnalysis: LineAnalysis);
|
|
38
|
-
private handle;
|
|
39
|
-
/** 查找
|
|
40
|
-
* @param doorPoints
|
|
41
|
-
* @param possibleDoorPoints
|
|
42
|
-
* @param minDoorWidth
|
|
43
|
-
* @param doorSearchDistance
|
|
44
|
-
* @param doorSearchNearAngle
|
|
45
|
-
* @returns
|
|
46
|
-
*/
|
|
47
|
-
private search;
|
|
48
|
-
/** 添加可查找点的过滤规则
|
|
49
|
-
* @param rule
|
|
50
|
-
*/
|
|
51
|
-
addPointsExcludeRule(rule: (line: LineSegment, point: Point, pointIndex: number) => boolean): void;
|
|
52
|
-
private _pointsExcludeRule;
|
|
53
|
-
/**
|
|
54
|
-
* 查找所有可能为门的点位
|
|
55
|
-
*/
|
|
56
|
-
getPossiblePoints(): DoorPoint[];
|
|
57
|
-
/**
|
|
58
|
-
* 查找已知为门的点位
|
|
59
|
-
*/
|
|
60
|
-
getDoorPoint(): {
|
|
61
|
-
doorPoints: DoorPoint[];
|
|
62
|
-
calculatedDoorPoint: DoorPoint[];
|
|
63
|
-
};
|
|
64
|
-
/**
|
|
65
|
-
* 查找双线墙的点位
|
|
66
|
-
* @returns
|
|
67
|
-
*/
|
|
68
|
-
searchDoubleLinePoint(): Map<number, 0 | 1 | -1>;
|
|
69
|
-
/** 查找方案一:最近点查找
|
|
70
|
-
* @description 以点为圆心,查找半径内符合角度的点
|
|
71
|
-
* @param doorPoints
|
|
72
|
-
* @param possibleDoorPoints
|
|
73
|
-
* @param doorSearchDistance 查找的距离(半径)
|
|
74
|
-
* @param doorSearchNearAngle 查找的角度
|
|
75
|
-
* @returns
|
|
76
|
-
*/
|
|
77
|
-
searchNearby(doorPoints: DoorPoint[], possibleDoorPoints?: DoorPoint[], doorSearchDistance?: number, doorSearchNearAngle?: number): any[];
|
|
78
|
-
/** 方案二: 沿方向查找
|
|
79
|
-
* @description
|
|
80
|
-
* @param param0
|
|
81
|
-
* @returns
|
|
82
|
-
*/
|
|
83
|
-
searchAlongDirection({ point, line }: DoorPoint, doorSearchDistance?: number): {
|
|
84
|
-
point: Point;
|
|
85
|
-
line: LineSegment<Record<string, any>>;
|
|
86
|
-
} | undefined;
|
|
87
|
-
/** 方案三: 沿法线方向查找
|
|
88
|
-
* @description
|
|
89
|
-
* @param param0
|
|
90
|
-
* @param doorSearchDistance
|
|
91
|
-
* @returns
|
|
92
|
-
*/
|
|
93
|
-
searchAlongNormalDirection({ point, line }: DoorPoint, doorSearchDistance?: number): {
|
|
94
|
-
point: Point;
|
|
95
|
-
line: LineSegment<Record<string, any>>;
|
|
96
|
-
} | undefined;
|
|
97
|
-
/**
|
|
98
|
-
*
|
|
99
|
-
* @param line
|
|
100
|
-
* @returns
|
|
101
|
-
*/
|
|
102
|
-
findLongLineSegment(line: LineSegment): LineSegment<Record<string, any>>;
|
|
103
|
-
}
|
|
104
16
|
export declare class LineAnalysis extends Component<{
|
|
105
17
|
analysisCompleted: {};
|
|
106
18
|
}> {
|
|
@@ -161,11 +73,5 @@ export declare class LineAnalysis extends Component<{
|
|
|
161
73
|
* @returns
|
|
162
74
|
*/
|
|
163
75
|
private projectionAnalysis;
|
|
164
|
-
doorSearchNearAngle: number;
|
|
165
|
-
doorSearchDistance: number;
|
|
166
|
-
doors: LineSegment[];
|
|
167
|
-
DoorsAnalysis?: DoorsAnalysis;
|
|
168
|
-
skipFindDoor: boolean;
|
|
169
|
-
doorsAnalysis(): void;
|
|
170
76
|
}
|
|
171
77
|
export {};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Component } from '../../ComponentManager';
|
|
2
|
-
import { LineSegment } from '../../
|
|
2
|
+
import { LineSegment } from '../../LineSegment';
|
|
3
|
+
import { LineUserData } from '../type';
|
|
4
|
+
import { ArrayMap } from '../../Map';
|
|
3
5
|
/**
|
|
4
6
|
* 转为 三维家 墙体结构
|
|
5
7
|
*/
|
|
@@ -7,9 +9,31 @@ export declare class ThreeVJia extends Component<{
|
|
|
7
9
|
updateData: {};
|
|
8
10
|
}> {
|
|
9
11
|
static name: string;
|
|
10
|
-
lineSegments: LineSegment<
|
|
12
|
+
lineSegments: LineSegment<LineUserData>[];
|
|
13
|
+
neededUpdate: boolean;
|
|
14
|
+
/**
|
|
15
|
+
*/
|
|
11
16
|
onAddFromParent(): void;
|
|
17
|
+
/** 获取分组
|
|
18
|
+
* @param lines
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
21
|
+
getGroups(lines: LineSegment<LineUserData>[]): ArrayMap<string, LineSegment<Record<string, any>>> | null;
|
|
22
|
+
/** 更新
|
|
23
|
+
*/
|
|
12
24
|
updateData(): void;
|
|
25
|
+
/** 处理有分组
|
|
26
|
+
* @param map
|
|
27
|
+
*/
|
|
28
|
+
handleGroup(map: ArrayMap<string, LineSegment<LineUserData>>): void;
|
|
29
|
+
/**
|
|
30
|
+
* 角度纠正
|
|
31
|
+
*/
|
|
32
|
+
angleCorrection(): void;
|
|
33
|
+
/**
|
|
34
|
+
* 处理没有分组
|
|
35
|
+
*/
|
|
36
|
+
handle(): void;
|
|
13
37
|
toJson(): {
|
|
14
38
|
version: string;
|
|
15
39
|
name: string;
|
|
@@ -29,6 +53,7 @@ export declare class ThreeVJia extends Component<{
|
|
|
29
53
|
};
|
|
30
54
|
thickness: number;
|
|
31
55
|
type: string;
|
|
56
|
+
isDoor: boolean | undefined;
|
|
32
57
|
loadBearingWall: boolean;
|
|
33
58
|
height: number;
|
|
34
59
|
}[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CommandFlowComponent } from './CommandFlowComponent';
|
|
2
|
-
import { LineSegment } from '../../../../../
|
|
2
|
+
import { LineSegment } from '../../../../../LineSegment';
|
|
3
3
|
import { ComponentManager } from '../../../../../ComponentManager';
|
|
4
4
|
import * as THREE from "three";
|
|
5
5
|
export declare class ClippingLine extends CommandFlowComponent<{
|
|
@@ -4,8 +4,8 @@ import { EventInput, Renderer } from '../../../RenderPlugin/components';
|
|
|
4
4
|
import { CommandManager } from '../../../../../CommandManager';
|
|
5
5
|
import { RenderManager } from '../RenderManager';
|
|
6
6
|
import { Default } from './Default';
|
|
7
|
-
import { LineSegment } from '../../../../../
|
|
8
|
-
import { Point } from '../../../../../
|
|
7
|
+
import { LineSegment } from '../../../../../LineSegment';
|
|
8
|
+
import { Point } from '../../../../../Point';
|
|
9
9
|
export declare class CommandFlowComponent<TEventMap extends {} = {}> extends Component<TEventMap> {
|
|
10
10
|
private _renderer?;
|
|
11
11
|
get renderer(): Renderer;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LineSegment } from '../../../../../
|
|
1
|
+
import { LineSegment } from '../../../../../LineSegment';
|
|
2
2
|
import { CommandFlowComponent } from './CommandFlowComponent';
|
|
3
3
|
import { LineUserData } from '../../../../type';
|
|
4
4
|
import * as THREE from "three";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CommandFlowComponent } from './CommandFlowComponent';
|
|
2
|
-
import { LineSegment } from '../../../../../
|
|
2
|
+
import { LineSegment } from '../../../../../LineSegment';
|
|
3
3
|
import { ComponentManager } from '../../../../../ComponentManager';
|
|
4
4
|
import { LineUserData } from '../../../../type';
|
|
5
5
|
import * as THREE from "three";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CommandFlowComponent } from './CommandFlowComponent';
|
|
2
|
-
import { LineSegment } from '../../../../../
|
|
2
|
+
import { LineSegment } from '../../../../../LineSegment';
|
|
3
3
|
import { ComponentManager } from '../../../../../ComponentManager';
|
|
4
4
|
import * as THREE from "three";
|
|
5
5
|
export declare class PointDrag extends CommandFlowComponent<{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CommandFlowComponent } from './CommandFlowComponent';
|
|
2
2
|
import { ComponentManager } from '../../../../../ComponentManager';
|
|
3
|
-
import { LineSegment } from '../../../../../
|
|
3
|
+
import { LineSegment } from '../../../../../LineSegment';
|
|
4
4
|
import * as THREE from "three";
|
|
5
5
|
/**
|
|
6
6
|
* 选择全部命令
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CommandFlowComponent } from './CommandFlowComponent';
|
|
2
2
|
import { ComponentManager } from '../../../../../ComponentManager';
|
|
3
|
-
import { LineSegment } from '../../../../../
|
|
4
|
-
import { Point } from '../../../../../
|
|
3
|
+
import { LineSegment } from '../../../../../LineSegment';
|
|
4
|
+
import { Point } from '../../../../../Point';
|
|
5
5
|
import { LineUserData } from '../../../../type';
|
|
6
6
|
import * as THREE from "three";
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Component } from '../../../../ComponentManager';
|
|
2
2
|
import { Dxf } from '../../../components/Dxf';
|
|
3
3
|
import { Variable } from '../../../components/Variable';
|
|
4
|
-
import { DomContainer, DomEventRegister, EventInput
|
|
4
|
+
import { Renderer, DomContainer, DomEventRegister, EventInput } from '../../RenderPlugin/components';
|
|
5
5
|
import { RenderManager } from './RenderManager';
|
|
6
6
|
import { CommandManager } from '../../../../CommandManager';
|
|
7
7
|
import { App } from 'vue';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { LineSegment } from '../../../../
|
|
1
|
+
import { LineSegment } from '../../../../LineSegment';
|
|
2
2
|
import { Component } from '../../../../ComponentManager';
|
|
3
3
|
import { Variable } from '../../../components/Variable';
|
|
4
4
|
import { EventInput, Renderer } from '../../RenderPlugin/components';
|
|
5
5
|
import { PointVirtualGrid } from '../../../../PointVirtualGrid';
|
|
6
6
|
import { Editor } from './Editor';
|
|
7
|
-
import { Quadtree } from '../../../../Quadtree
|
|
7
|
+
import { Quadtree } from '../../../../Quadtree';
|
|
8
8
|
import { DxfLineModel } from '../../ModelDataPlugin/components';
|
|
9
9
|
import { LineUserData, OriginalDataItem } from '../../../type';
|
|
10
10
|
import { Dxf } from '../../../components/Dxf';
|
|
@@ -47,7 +47,7 @@ export declare class RenderManager extends Component<{}> {
|
|
|
47
47
|
* @param point
|
|
48
48
|
* @returns
|
|
49
49
|
*/
|
|
50
|
-
adsorption(radius?: number, _?: PointVirtualGrid
|
|
50
|
+
adsorption(radius?: number, _?: PointVirtualGrid | null, quadtree?: Quadtree<any>): {
|
|
51
51
|
point: THREE.Vector3;
|
|
52
52
|
find: boolean;
|
|
53
53
|
mode: string;
|
|
@@ -55,8 +55,8 @@ export declare class RenderManager extends Component<{}> {
|
|
|
55
55
|
} | {
|
|
56
56
|
point: THREE.Vector3;
|
|
57
57
|
find: boolean;
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
line: undefined;
|
|
59
|
+
mode: undefined;
|
|
60
60
|
};
|
|
61
61
|
/** 创建几何体
|
|
62
62
|
* @param rectangle
|
|
@@ -2,8 +2,8 @@ import { CSS3DRenderer, CSS3DObject, CSS3DSprite } from 'three/addons/renderers/
|
|
|
2
2
|
import { CSS2DRenderer, CSS2DObject } from 'three/addons/renderers/CSS2DRenderer.js';
|
|
3
3
|
import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
|
|
4
4
|
import { Component } from '../../../../ComponentManager';
|
|
5
|
-
import { Point } from '../../../../
|
|
6
|
-
import { LineSegment } from '../../../../
|
|
5
|
+
import { Point } from '../../../../Point';
|
|
6
|
+
import { LineSegment } from '../../../../LineSegment';
|
|
7
7
|
import * as THREE from "three";
|
|
8
8
|
export interface RendererDescription {
|
|
9
9
|
canvas: HTMLCanvasElement;
|
|
@@ -93,6 +93,6 @@ export declare class Renderer extends Component<{
|
|
|
93
93
|
* @param parent
|
|
94
94
|
* @returns
|
|
95
95
|
*/
|
|
96
|
-
createCircle(point: Point, parameters?: THREE.PointsMaterialParameters, parent?: THREE.Object3D): THREE.Points<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.PointsMaterial, THREE.Object3DEventMap>;
|
|
96
|
+
createCircle(point: Point | Point[], parameters?: THREE.PointsMaterialParameters, parent?: THREE.Object3D): THREE.Points<THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>, THREE.PointsMaterial, THREE.Object3DEventMap>;
|
|
97
97
|
destroy(): void;
|
|
98
98
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { QuadtreeNode } from '../Quadtree
|
|
2
|
-
import { Point } from '../
|
|
3
|
-
import * as THREE from "three";
|
|
1
|
+
import { QuadtreeNode } from '../Quadtree';
|
|
2
|
+
import { Point } from '../Point';
|
|
4
3
|
export type Unit = "Unitless" | "Inches" | "Feet" | "Miles" | "Millimeters" | "Centimeters" | "Meters" | "Kilometers" | "Microinches" | "Mils" | "Yards" | "Angstroms" | "Nanometers" | "Microns" | "Decimeters" | "Decameters" | "Hectometers" | "Gigameters" | "Astronomical units" | "Light years" | "Parsecs";
|
|
5
4
|
export interface OriginalDataItem {
|
|
6
5
|
start: {
|
|
@@ -40,6 +39,7 @@ export interface OriginalDataItem {
|
|
|
40
39
|
isWindow?: boolean;
|
|
41
40
|
rooftopPz?: number;
|
|
42
41
|
isVerticalReferenceLine?: boolean;
|
|
42
|
+
groupId?: string;
|
|
43
43
|
drawWindow?: {
|
|
44
44
|
p: {
|
|
45
45
|
x: number;
|
|
@@ -57,11 +57,19 @@ export type LineUserData = {
|
|
|
57
57
|
isVerticalReferenceLine?: boolean;
|
|
58
58
|
wallWidth?: number;
|
|
59
59
|
rooftopPz?: number;
|
|
60
|
+
groupId?: string;
|
|
61
|
+
groupType?: string;
|
|
60
62
|
drawWindow?: {
|
|
61
|
-
p:
|
|
63
|
+
p: {
|
|
64
|
+
x: number;
|
|
65
|
+
y: number;
|
|
66
|
+
z: number;
|
|
67
|
+
};
|
|
62
68
|
width: number;
|
|
63
69
|
full: boolean;
|
|
70
|
+
rooftopPz?: number;
|
|
64
71
|
}[];
|
|
72
|
+
sillHeight?: number;
|
|
65
73
|
drawDoorData?: any;
|
|
66
74
|
quadtreeNode?: QuadtreeNode;
|
|
67
75
|
};
|
|
@@ -113,6 +121,8 @@ export type AxisAlignmentCorrectionOption = {
|
|
|
113
121
|
* 吸附方式, 默认 adsorption
|
|
114
122
|
*/
|
|
115
123
|
adsorptionMethod?: "originalInterPoint" | "adsorption";
|
|
124
|
+
removeClosedLine?: boolean;
|
|
125
|
+
wallGroup?: boolean;
|
|
116
126
|
};
|
|
117
127
|
/**
|
|
118
128
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { LineSegment } from '../../
|
|
2
|
-
import { Point } from '../../
|
|
1
|
+
import { LineSegment } from '../../LineSegment';
|
|
2
|
+
import { Point } from '../../Point';
|
|
3
3
|
import { OriginalDataItem } from '../type';
|
|
4
4
|
export declare class BoundExt {
|
|
5
5
|
/** 通过轨迹点查找外墙
|
|
@@ -12,5 +12,5 @@ export declare class BoundExt {
|
|
|
12
12
|
* @param lines
|
|
13
13
|
* @param trajectoryPoints
|
|
14
14
|
*/
|
|
15
|
-
static boundExtbyTraj(data: OriginalDataItem[], trajectory: any, wallWidth?: number): OriginalDataItem[];
|
|
15
|
+
static boundExtbyTraj(data: OriginalDataItem[], trajectory: any, wallWidth?: number, findCallBack?: (lines: LineSegment[], trajectory: Point[]) => void): OriginalDataItem[];
|
|
16
16
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { LineSegment } from '../../LineSegment';
|
|
2
|
+
import { LineUserData } from '../type';
|
|
3
|
+
export declare class DoubleWallHelper {
|
|
4
|
+
static errorAngle: number;
|
|
5
|
+
/** 线段投影分析
|
|
6
|
+
* @param index
|
|
7
|
+
* @param sourceLineSegment
|
|
8
|
+
* @param lineSegmentList
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
private static projectionAnalysis;
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @param lines
|
|
15
|
+
* @param wallWidth
|
|
16
|
+
* @returns
|
|
17
|
+
*/
|
|
18
|
+
static complementSide(lines: LineSegment<LineUserData>[], wallWidth?: number): LineSegment<LineUserData>[];
|
|
19
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { LineSegment } from '../../LineSegment';
|
|
2
|
+
import { LineUserData } from '../type';
|
|
3
|
+
/** 拆分线段userData
|
|
4
|
+
* @param line1
|
|
5
|
+
* @param line2
|
|
6
|
+
*/
|
|
7
|
+
export declare function clippingLineUserData(line1: LineSegment<LineUserData>, line2: LineSegment<LineUserData>): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { LineSegment } from '../../
|
|
2
|
-
import { LineBasicMaterialParameters, PointsMaterialParameters } from 'three';
|
|
3
|
-
import { Point } from '../../
|
|
4
|
-
export declare function drawLines(lines: LineSegment[] | LineSegment, parameters?: LineBasicMaterialParameters, offset?: number):
|
|
5
|
-
export declare function drawPoint(point: Point, parameters?: PointsMaterialParameters, offset?: number): any;
|
|
1
|
+
import { LineSegment } from '../../LineSegment';
|
|
2
|
+
import { LineBasicMaterialParameters, Object3D, PointsMaterialParameters } from 'three';
|
|
3
|
+
import { Point } from '../../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
6
|
export declare function drawText(text: any, point: Point, style?: any, offset?: number): any;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { PointVirtualGrid } from '../../PointVirtualGrid';
|
|
2
|
+
import { LineSegment } from '../../LineSegment';
|
|
3
|
+
/** 分组,通过路径
|
|
4
|
+
* @param lines
|
|
5
|
+
*/
|
|
6
|
+
export declare function groupByPath(lines: LineSegment[], grid?: PointVirtualGrid<LineSegment>): LineSegment<Record<string, any>>[][];
|
|
7
|
+
/** 移除非环线
|
|
8
|
+
* @param lines
|
|
9
|
+
*/
|
|
10
|
+
export declare function removeNotRingLine(lines: LineSegment[], removeLines?: Set<LineSegment<Record<string, any>>>, grid0?: PointVirtualGrid<LineSegment>): LineSegment<Record<string, any>>[][];
|
|
11
|
+
/** 查找线段组成的最大环
|
|
12
|
+
* @param lines
|
|
13
|
+
*/
|
|
14
|
+
export declare function findMaxRing(lines: LineSegment[], grid?: PointVirtualGrid<LineSegment>): LineSegment<Record<string, any>>[];
|
|
15
|
+
/**
|
|
16
|
+
* 从线段集合中提取所有闭合多边形
|
|
17
|
+
*/
|
|
18
|
+
export declare function findClosedPolygons(lines: LineSegment[]): {
|
|
19
|
+
removeLines: LineSegment<Record<string, any>>[];
|
|
20
|
+
groups: LineSegment<Record<string, any>>[][];
|
|
21
|
+
lines: LineSegment<Record<string, any>>[];
|
|
22
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { LineSegment } from '../../LineSegment';
|
|
2
|
+
import { Point } from '../../Point';
|
|
3
|
+
/** 将线段路径转换为点路径
|
|
4
|
+
* @param lines
|
|
5
|
+
*/
|
|
6
|
+
export declare function linePathToPointPath(lines: LineSegment[]): Point<Record<string, any>>[];
|
|
7
|
+
/** 通过并查集,查找为环的一部分边
|
|
8
|
+
* @param lines
|
|
9
|
+
*/
|
|
10
|
+
export declare function findRingEdges(lines: LineSegment[]): LineSegment<Record<string, any>>[];
|
|
11
|
+
/** 根据已知环线查找环
|
|
12
|
+
* @param lines
|
|
13
|
+
*/
|
|
14
|
+
export declare function findRing(lines: LineSegment[], ringEdges: LineSegment[]): {
|
|
15
|
+
ringLines: LineSegment<Record<string, any>>[];
|
|
16
|
+
removeLines: Set<LineSegment<Record<string, any>>>;
|
|
17
|
+
ringList: LineSegment<Record<string, any>>[][];
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* 从线段集合中提取所有闭合多边形
|
|
21
|
+
*/
|
|
22
|
+
export declare function findClosedPolygons(lines: LineSegment[]): {
|
|
23
|
+
lines: LineSegment<Record<string, any>>[];
|
|
24
|
+
removeLines: LineSegment<Record<string, any>>[];
|
|
25
|
+
groups: LineSegment<Record<string, any>>[][];
|
|
26
|
+
ringLines: LineSegment<Record<string, any>>[];
|
|
27
|
+
};
|