build-dxf 0.0.20 → 0.0.22
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/README.md +3 -0
- package/package.json +6 -4
- package/src/build.d.ts +6 -0
- package/src/build.js +1432 -1916
- package/src/index.css +1 -641
- package/src/index.js +7 -7
- package/src/index2.js +327 -528
- package/src/index3.js +2049 -1736
- package/src/selectLocalFile.js +1960 -3145
- package/src/utils/CommandManager/CommandFlow.d.ts +17 -0
- package/src/utils/CommandManager/CommandManager.d.ts +23 -0
- package/src/utils/DxfSystem/components/AngleCorrectionDxf.d.ts +13 -0
- package/src/utils/DxfSystem/components/Dxf.d.ts +36 -5
- package/src/utils/DxfSystem/components/LineAnalysis.d.ts +3 -1
- package/src/utils/DxfSystem/index.d.ts +2 -0
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/ClippingLine.d.ts +45 -0
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/CommandFlowComponent.d.ts +15 -1
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/ConnectionLine.d.ts +33 -0
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/Default.d.ts +2 -26
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/DeleteSelectLine.d.ts +28 -0
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/DeleteSelectWindow.d.ts +33 -0
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/DrawDoorLine.d.ts +22 -4
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/DrawLine.d.ts +20 -4
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/DrawWindow.d.ts +25 -2
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/IntersectionConnectionLine.d.ts +33 -0
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/MergeLine.d.ts +33 -0
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/PointDrag.d.ts +14 -1
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/SelectAll.d.ts +30 -0
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/VerticalCorrection.d.ts +75 -0
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/VerticalReferenceLine.d.ts +21 -0
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/ViewAngle.d.ts +21 -0
- package/src/utils/DxfSystem/plugin/Editor/components/Editor.d.ts +4 -1
- package/src/utils/DxfSystem/plugin/Editor/components/RenderManager.d.ts +4 -1
- package/src/utils/DxfSystem/plugin/Editor/components/index.d.ts +1 -0
- package/src/utils/DxfSystem/plugin/RenderPlugin/components/Renderer.d.ts +3 -0
- package/src/utils/PointVirtualGrid/index.d.ts +8 -0
- package/src/utils/Quadtree/LineSegment.d.ts +34 -2
- package/src/utils/Quadtree/Point.d.ts +9 -2
- package/src/utils/Quadtree/Quadtree.d.ts +1 -1
- package/src/utils/deepClone.d.ts +6 -0
|
@@ -18,6 +18,23 @@ export declare class CommandFlow extends EventDispatcher<{
|
|
|
18
18
|
finally: {};
|
|
19
19
|
}> {
|
|
20
20
|
list: CommandFlowCallBack[];
|
|
21
|
+
rollbacklist: ((data?: any) => void)[];
|
|
22
|
+
revokeRollbacklist: ((data?: any) => void)[];
|
|
23
|
+
writeOperationList: boolean;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @param operation
|
|
27
|
+
* @returns
|
|
28
|
+
*/
|
|
21
29
|
add(operation: CommandFlowCallBack): this;
|
|
30
|
+
/** 添加回滚回调列表
|
|
31
|
+
* @param callBack
|
|
32
|
+
*/
|
|
33
|
+
addRollback(callBack: (data?: any) => void): this;
|
|
34
|
+
/** 添加撤回回滚回调列表
|
|
35
|
+
* @param callBack
|
|
36
|
+
* @returns
|
|
37
|
+
*/
|
|
38
|
+
addRevokeRollback(callBack: (data?: any) => void): this;
|
|
22
39
|
}
|
|
23
40
|
export {};
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { EventDispatcher } from '../ComponentManager';
|
|
2
2
|
import { CommandFlow } from './CommandFlow';
|
|
3
|
+
export type Operation = {
|
|
4
|
+
name: string;
|
|
5
|
+
data: any;
|
|
6
|
+
};
|
|
3
7
|
export declare class CommandManager extends EventDispatcher<{
|
|
4
8
|
startedBefore: {
|
|
5
9
|
name: string;
|
|
@@ -31,6 +35,12 @@ export declare class CommandManager extends EventDispatcher<{
|
|
|
31
35
|
finally: {
|
|
32
36
|
name: string;
|
|
33
37
|
};
|
|
38
|
+
rollback: {
|
|
39
|
+
name: string;
|
|
40
|
+
};
|
|
41
|
+
revokeRollback: {
|
|
42
|
+
name: string;
|
|
43
|
+
};
|
|
34
44
|
}> {
|
|
35
45
|
commandFlowMap: Map<string, CommandFlow>;
|
|
36
46
|
lock: boolean;
|
|
@@ -40,6 +50,11 @@ export declare class CommandManager extends EventDispatcher<{
|
|
|
40
50
|
private _disabled;
|
|
41
51
|
set disabled(disabled: boolean);
|
|
42
52
|
get disabled(): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* 操作记录
|
|
55
|
+
*/
|
|
56
|
+
operationList: Operation[];
|
|
57
|
+
rollbackList: Operation[];
|
|
43
58
|
constructor();
|
|
44
59
|
/** 添加命令流
|
|
45
60
|
* @param name
|
|
@@ -56,4 +71,12 @@ export declare class CommandManager extends EventDispatcher<{
|
|
|
56
71
|
/** 取消当前命令
|
|
57
72
|
*/
|
|
58
73
|
cancel(): void;
|
|
74
|
+
/**
|
|
75
|
+
* 回滚
|
|
76
|
+
*/
|
|
77
|
+
rollback(): boolean;
|
|
78
|
+
/**
|
|
79
|
+
* 撤销回滚
|
|
80
|
+
*/
|
|
81
|
+
revokeRollback(): boolean;
|
|
59
82
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ComponentManager } from '../../ComponentManager';
|
|
2
|
+
import { Dxf } from './Dxf';
|
|
3
|
+
/**
|
|
4
|
+
* 角度修正过后的DXF格式数据
|
|
5
|
+
*/
|
|
6
|
+
export declare class AngleCorrectionDxf extends Dxf<{
|
|
7
|
+
updateData: {};
|
|
8
|
+
}> {
|
|
9
|
+
static name: string;
|
|
10
|
+
angle: number;
|
|
11
|
+
onAddFromParent(parent: ComponentManager): void;
|
|
12
|
+
update(): Promise<void>;
|
|
13
|
+
}
|
|
@@ -22,6 +22,7 @@ export interface OriginalDataItem {
|
|
|
22
22
|
z?: number;
|
|
23
23
|
};
|
|
24
24
|
}[];
|
|
25
|
+
length: number;
|
|
25
26
|
isDoor?: boolean;
|
|
26
27
|
doorDirectConnection?: boolean;
|
|
27
28
|
drawDoorData?: {
|
|
@@ -37,6 +38,7 @@ export interface OriginalDataItem {
|
|
|
37
38
|
};
|
|
38
39
|
};
|
|
39
40
|
isWindow?: boolean;
|
|
41
|
+
isVerticalReferenceLine?: boolean;
|
|
40
42
|
drawWindow?: {
|
|
41
43
|
p: {
|
|
42
44
|
x: number;
|
|
@@ -51,6 +53,19 @@ export interface OriginalDataItem {
|
|
|
51
53
|
* [开始点, 结束点, 相交点, 是否是门, 索引]
|
|
52
54
|
*/
|
|
53
55
|
export type DataItem = [Point, Point, number[], boolean, number];
|
|
56
|
+
export type DrawData = {
|
|
57
|
+
unit: Unit;
|
|
58
|
+
line: [number, number, number, number, string][];
|
|
59
|
+
arc: [number, number, number, number, number, string][];
|
|
60
|
+
dimensionLine: number[][];
|
|
61
|
+
center: {
|
|
62
|
+
x: number;
|
|
63
|
+
y: number;
|
|
64
|
+
};
|
|
65
|
+
width: number;
|
|
66
|
+
height: number;
|
|
67
|
+
scale: number;
|
|
68
|
+
};
|
|
54
69
|
/**
|
|
55
70
|
*
|
|
56
71
|
*/
|
|
@@ -61,7 +76,7 @@ export interface PointGroup {
|
|
|
61
76
|
/**
|
|
62
77
|
* 将点云结构转换为DXF格式
|
|
63
78
|
*/
|
|
64
|
-
export declare class Dxf extends Component<{
|
|
79
|
+
export declare class Dxf<TEventMap extends {} = {}> extends Component<{
|
|
65
80
|
setDta: {
|
|
66
81
|
originalData: OriginalDataItem[];
|
|
67
82
|
data: DataItem[];
|
|
@@ -72,7 +87,7 @@ export declare class Dxf extends Component<{
|
|
|
72
87
|
createGroup: {
|
|
73
88
|
groups: Point[][][];
|
|
74
89
|
};
|
|
75
|
-
}> {
|
|
90
|
+
} & TEventMap> {
|
|
76
91
|
static name: string;
|
|
77
92
|
shortLine: number;
|
|
78
93
|
width: number;
|
|
@@ -88,7 +103,8 @@ export declare class Dxf extends Component<{
|
|
|
88
103
|
lineSegments: LineSegment<{
|
|
89
104
|
isDoor: boolean;
|
|
90
105
|
isWindow: boolean;
|
|
91
|
-
drawDoorData: any
|
|
106
|
+
drawDoorData: any;
|
|
107
|
+
drawWindow: any[];
|
|
92
108
|
}>[];
|
|
93
109
|
originalZAverage: number;
|
|
94
110
|
static EndType: {
|
|
@@ -106,7 +122,8 @@ export declare class Dxf extends Component<{
|
|
|
106
122
|
get lines(): LineSegment<{
|
|
107
123
|
isDoor: boolean;
|
|
108
124
|
isWindow: boolean;
|
|
109
|
-
drawDoorData: any
|
|
125
|
+
drawDoorData: any;
|
|
126
|
+
drawWindow: any[];
|
|
110
127
|
}>[];
|
|
111
128
|
/**初始化
|
|
112
129
|
* @param data 点云数据
|
|
@@ -174,7 +191,16 @@ export declare class Dxf extends Component<{
|
|
|
174
191
|
*/
|
|
175
192
|
private getArcAngleRange;
|
|
176
193
|
/**
|
|
177
|
-
*
|
|
194
|
+
* 转为绘制数据
|
|
195
|
+
*/
|
|
196
|
+
toDrawDataJson(unit?: Unit): DrawData;
|
|
197
|
+
/**
|
|
198
|
+
*
|
|
199
|
+
* @param type
|
|
200
|
+
*/
|
|
201
|
+
toDxfImageBlob(unit?: Unit, type?: string, background?: string): Promise<any>;
|
|
202
|
+
/**
|
|
203
|
+
* 将点json结构转换为Dxf string
|
|
178
204
|
*/
|
|
179
205
|
toDxfString(unit?: Unit): string;
|
|
180
206
|
/**
|
|
@@ -187,6 +213,11 @@ export declare class Dxf extends Component<{
|
|
|
187
213
|
* @param filename
|
|
188
214
|
*/
|
|
189
215
|
download(filename: string, unit?: Unit): Promise<void>;
|
|
216
|
+
/**
|
|
217
|
+
* 下载
|
|
218
|
+
* @param filename
|
|
219
|
+
*/
|
|
220
|
+
downloadImage(filename: string, unit?: Unit, type?: string): Promise<boolean>;
|
|
190
221
|
/**
|
|
191
222
|
* 计算原始数据的边界框
|
|
192
223
|
* @description 计算所有线段的起点和终点的最小最大值,形成一个边界框
|
|
@@ -13,7 +13,9 @@ type ProjectionAnalysisResult = {
|
|
|
13
13
|
project: LineSegment;
|
|
14
14
|
project2: LineSegment;
|
|
15
15
|
};
|
|
16
|
-
export declare class LineAnalysis extends Component
|
|
16
|
+
export declare class LineAnalysis extends Component<{
|
|
17
|
+
analysisCompleted: {};
|
|
18
|
+
}> {
|
|
17
19
|
static name: string;
|
|
18
20
|
Dxf: Dxf | null;
|
|
19
21
|
Variable: Variable | null;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { ComponentManager } from '../ComponentManager';
|
|
2
|
+
import { AngleCorrectionDxf } from './components/AngleCorrectionDxf';
|
|
2
3
|
import { Dxf } from './components/Dxf';
|
|
3
4
|
import { Variable } from './components/Variable';
|
|
4
5
|
export declare class DxfSystem extends ComponentManager {
|
|
5
6
|
Dxf: Dxf;
|
|
7
|
+
AngleCorrectionDxf: AngleCorrectionDxf;
|
|
6
8
|
Variable: Variable;
|
|
7
9
|
wallWidth: number;
|
|
8
10
|
environment: "node" | "browser" | "unknown";
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { CommandFlowComponent } from './CommandFlowComponent';
|
|
2
|
+
import { LineSegment } from '../../../../../Quadtree/LineSegment';
|
|
3
|
+
import { ComponentManager } from '../../../../../ComponentManager';
|
|
4
|
+
import * as THREE from "three";
|
|
5
|
+
export declare class ClippingLine extends CommandFlowComponent<{
|
|
6
|
+
pointerMove: {
|
|
7
|
+
point: THREE.Vector3;
|
|
8
|
+
};
|
|
9
|
+
}> {
|
|
10
|
+
static name: string;
|
|
11
|
+
container: THREE.Group<THREE.Object3DEventMap>;
|
|
12
|
+
shortcutKeys: string[];
|
|
13
|
+
commandName: string;
|
|
14
|
+
static commandName: string;
|
|
15
|
+
onAddFromParent(parent: ComponentManager): void;
|
|
16
|
+
/** 选择开始点
|
|
17
|
+
* @param next
|
|
18
|
+
*/
|
|
19
|
+
selectPointStart(next: any): void;
|
|
20
|
+
/** 选择结束点
|
|
21
|
+
* @param next
|
|
22
|
+
*/
|
|
23
|
+
selectPointEnd(next: any, { point, line }: {
|
|
24
|
+
point: THREE.Vector3;
|
|
25
|
+
line: LineSegment;
|
|
26
|
+
}): void;
|
|
27
|
+
/**
|
|
28
|
+
* 结束处理
|
|
29
|
+
* @param next
|
|
30
|
+
* @param points
|
|
31
|
+
*/
|
|
32
|
+
private end;
|
|
33
|
+
/** 执行完成
|
|
34
|
+
*/
|
|
35
|
+
completed(data: any): void;
|
|
36
|
+
/** 回滚操作
|
|
37
|
+
* @param data
|
|
38
|
+
*/
|
|
39
|
+
private rollback;
|
|
40
|
+
/** 撤回回滚
|
|
41
|
+
* @param data
|
|
42
|
+
* @returns
|
|
43
|
+
*/
|
|
44
|
+
private revokeRollback;
|
|
45
|
+
}
|
|
@@ -3,6 +3,9 @@ import { Editor } from '../Editor';
|
|
|
3
3
|
import { EventInput, Renderer } from '../../../RenderPlugin/components';
|
|
4
4
|
import { CommandManager } from '../../../../../CommandManager';
|
|
5
5
|
import { RenderManager } from '../RenderManager';
|
|
6
|
+
import { Default } from './Default';
|
|
7
|
+
import { LineSegment } from '../../../../../Quadtree/LineSegment';
|
|
8
|
+
import { Point } from '../../../../../Quadtree/Point';
|
|
6
9
|
export declare class CommandFlowComponent<TEventMap extends {} = {}> extends Component<TEventMap> {
|
|
7
10
|
private _renderer?;
|
|
8
11
|
get renderer(): Renderer;
|
|
@@ -16,6 +19,8 @@ export declare class CommandFlowComponent<TEventMap extends {} = {}> extends Com
|
|
|
16
19
|
get renderManager(): RenderManager;
|
|
17
20
|
private _commandManager?;
|
|
18
21
|
get commandManager(): CommandManager;
|
|
22
|
+
private _default?;
|
|
23
|
+
get default(): Default;
|
|
19
24
|
interruptKeys: string[];
|
|
20
25
|
commandName: string;
|
|
21
26
|
constructor();
|
|
@@ -25,7 +30,7 @@ export declare class CommandFlowComponent<TEventMap extends {} = {}> extends Com
|
|
|
25
30
|
*/
|
|
26
31
|
cancel(): void;
|
|
27
32
|
/**
|
|
28
|
-
*
|
|
33
|
+
* 创建中断处理命令节点
|
|
29
34
|
* @returns
|
|
30
35
|
*/
|
|
31
36
|
createInterrupt(): (next: any, data: any) => void;
|
|
@@ -40,4 +45,13 @@ export declare class CommandFlowComponent<TEventMap extends {} = {}> extends Com
|
|
|
40
45
|
* @returns
|
|
41
46
|
*/
|
|
42
47
|
createFinally(keys?: string[]): () => void;
|
|
48
|
+
/**
|
|
49
|
+
* 创建鼠标移动
|
|
50
|
+
* @param callBack
|
|
51
|
+
* @returns
|
|
52
|
+
*/
|
|
53
|
+
createPointerMove(callBack: (point: Point, isAdsorb: boolean) => void): {
|
|
54
|
+
destroy(): void;
|
|
55
|
+
setBaseLine(line: LineSegment | null, point: Point | null): void;
|
|
56
|
+
};
|
|
43
57
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { CommandFlowComponent } from './CommandFlowComponent';
|
|
2
|
+
import { ComponentManager } from '../../../../../ComponentManager';
|
|
3
|
+
/**
|
|
4
|
+
* 连接选择的线段
|
|
5
|
+
*/
|
|
6
|
+
export declare class ConnectionLine extends CommandFlowComponent<{}> {
|
|
7
|
+
static name: string;
|
|
8
|
+
shortcutKeys: string[];
|
|
9
|
+
static commandName: string;
|
|
10
|
+
onAddFromParent(parent: ComponentManager): 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
|
+
}
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import { Component } from '../../../../../ComponentManager';
|
|
2
|
-
import { Editor } from '../Editor';
|
|
3
|
-
import { Renderer } from '../../../RenderPlugin/components';
|
|
4
1
|
import { LineSegment } from '../../../../../Quadtree/LineSegment';
|
|
5
2
|
import { LineUserData } from '../RenderManager';
|
|
3
|
+
import { CommandFlowComponent } from './CommandFlowComponent';
|
|
6
4
|
import * as THREE from "three";
|
|
7
|
-
export declare class Default extends
|
|
5
|
+
export declare class Default extends CommandFlowComponent<{
|
|
8
6
|
selectLineChange: {};
|
|
9
7
|
}> {
|
|
10
8
|
static name: string;
|
|
11
|
-
get editor(): Editor;
|
|
12
|
-
renderer?: Renderer;
|
|
13
9
|
container: THREE.Group<THREE.Object3DEventMap>;
|
|
14
10
|
onAddFromParent(): void;
|
|
15
11
|
selectLines: LineSegment<LineUserData>[];
|
|
@@ -26,26 +22,6 @@ export declare class Default extends Component<{
|
|
|
26
22
|
* 移除所有选中线段
|
|
27
23
|
*/
|
|
28
24
|
removeSelectLineAll(): void;
|
|
29
|
-
/**
|
|
30
|
-
* 删除选择的线段
|
|
31
|
-
*/
|
|
32
|
-
deleteSelectLine(): void;
|
|
33
|
-
/**
|
|
34
|
-
* 删除选择线段上的窗户
|
|
35
|
-
*/
|
|
36
|
-
deleteSelectWindow(): void;
|
|
37
|
-
/**
|
|
38
|
-
* 如果只选择两个线段,可为两个未链接的点创建连接
|
|
39
|
-
*/
|
|
40
|
-
connection(): void;
|
|
41
|
-
/**
|
|
42
|
-
* 如果只选择两个线段,可为两个未链接的点创建连接, 通过计算交点,线段延长到交点
|
|
43
|
-
*/
|
|
44
|
-
intersectionConnection(): void;
|
|
45
|
-
/**
|
|
46
|
-
* 如果只选择两个线段, 且两个线段在一条路径上,合并线段
|
|
47
|
-
*/
|
|
48
|
-
mergeLine(): void;
|
|
49
25
|
private _timer;
|
|
50
26
|
/**
|
|
51
27
|
* 更新选择的线段
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { CommandFlowComponent } from './CommandFlowComponent';
|
|
2
|
+
import { ComponentManager } from '../../../../../ComponentManager';
|
|
3
|
+
/**
|
|
4
|
+
* 删除选择的线段
|
|
5
|
+
*/
|
|
6
|
+
export declare class DeleteSelectLine extends CommandFlowComponent<{}> {
|
|
7
|
+
static name: string;
|
|
8
|
+
shortcutKeys: string[];
|
|
9
|
+
static commandName: string;
|
|
10
|
+
onAddFromParent(parent: ComponentManager): void;
|
|
11
|
+
/**
|
|
12
|
+
* 进入命令约束
|
|
13
|
+
*/
|
|
14
|
+
private constraint;
|
|
15
|
+
/** 开始
|
|
16
|
+
* @param next
|
|
17
|
+
*/
|
|
18
|
+
private delete;
|
|
19
|
+
/** 回滚操作
|
|
20
|
+
* @param data
|
|
21
|
+
*/
|
|
22
|
+
private rollback;
|
|
23
|
+
/** 撤回回滚
|
|
24
|
+
* @param lines
|
|
25
|
+
* @returns
|
|
26
|
+
*/
|
|
27
|
+
private revokeRollback;
|
|
28
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { CommandFlowComponent } from './CommandFlowComponent';
|
|
2
|
+
import { ComponentManager } from '../../../../../ComponentManager';
|
|
3
|
+
/**
|
|
4
|
+
* 删除选择的线段上的窗户线
|
|
5
|
+
*/
|
|
6
|
+
export declare class DeleteSelectWindow extends CommandFlowComponent<{}> {
|
|
7
|
+
static name: string;
|
|
8
|
+
shortcutKeys: string[];
|
|
9
|
+
static commandName: string;
|
|
10
|
+
onAddFromParent(parent: ComponentManager): void;
|
|
11
|
+
/**
|
|
12
|
+
* 进入命令约束
|
|
13
|
+
*/
|
|
14
|
+
private constraint;
|
|
15
|
+
/** 开始
|
|
16
|
+
* @param next
|
|
17
|
+
*/
|
|
18
|
+
private end;
|
|
19
|
+
/**
|
|
20
|
+
* 完成
|
|
21
|
+
* @param list
|
|
22
|
+
*/
|
|
23
|
+
private completed;
|
|
24
|
+
/** 回滚操作
|
|
25
|
+
* @param data
|
|
26
|
+
*/
|
|
27
|
+
private rollback;
|
|
28
|
+
/** 撤回回滚
|
|
29
|
+
* @param lines
|
|
30
|
+
* @returns
|
|
31
|
+
*/
|
|
32
|
+
private revokeRollback;
|
|
33
|
+
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { ComponentManager } from '../../../../../ComponentManager';
|
|
2
|
-
import { Point } from '../../../../../Quadtree/Point';
|
|
3
2
|
import { CommandFlowComponent } from './CommandFlowComponent';
|
|
4
3
|
import * as THREE from "three";
|
|
5
|
-
export declare class DrawDoorLine extends CommandFlowComponent<{
|
|
4
|
+
export declare class DrawDoorLine extends CommandFlowComponent<{
|
|
5
|
+
pointerMove: {
|
|
6
|
+
point: THREE.Vector3;
|
|
7
|
+
};
|
|
8
|
+
}> {
|
|
6
9
|
static name: string;
|
|
7
10
|
container: THREE.Group<THREE.Object3DEventMap>;
|
|
8
11
|
interruptKeys: string[];
|
|
@@ -12,8 +15,23 @@ export declare class DrawDoorLine extends CommandFlowComponent<{}> {
|
|
|
12
15
|
/** 选择点
|
|
13
16
|
* @param next
|
|
14
17
|
*/
|
|
15
|
-
selectPoint
|
|
18
|
+
private selectPoint;
|
|
19
|
+
/**
|
|
20
|
+
* 结束处理
|
|
21
|
+
* @param next
|
|
22
|
+
* @param points
|
|
23
|
+
*/
|
|
24
|
+
private end;
|
|
16
25
|
/** 执行完成
|
|
17
26
|
*/
|
|
18
|
-
completed(
|
|
27
|
+
completed(data: any[]): void;
|
|
28
|
+
/** 回滚操作
|
|
29
|
+
* @param data
|
|
30
|
+
*/
|
|
31
|
+
private rollback;
|
|
32
|
+
/** 撤回回滚
|
|
33
|
+
* @param data
|
|
34
|
+
* @returns
|
|
35
|
+
*/
|
|
36
|
+
private revokeRollback;
|
|
19
37
|
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { Point } from '../../../../../Quadtree/Point';
|
|
2
1
|
import { CommandFlowComponent } from './CommandFlowComponent';
|
|
3
2
|
import { ComponentManager } from '../../../../../ComponentManager';
|
|
4
3
|
import * as THREE from "three";
|
|
5
|
-
export declare class DrawLine extends CommandFlowComponent<{
|
|
4
|
+
export declare class DrawLine extends CommandFlowComponent<{
|
|
5
|
+
pointerMove: {
|
|
6
|
+
point: THREE.Vector3;
|
|
7
|
+
};
|
|
8
|
+
}> {
|
|
6
9
|
static name: string;
|
|
7
10
|
container: THREE.Group<THREE.Object3DEventMap>;
|
|
8
11
|
interruptKeys: string[];
|
|
@@ -14,8 +17,21 @@ export declare class DrawLine extends CommandFlowComponent<{}> {
|
|
|
14
17
|
/** 选择点
|
|
15
18
|
* @param next
|
|
16
19
|
*/
|
|
17
|
-
selectPoint
|
|
20
|
+
private selectPoint;
|
|
21
|
+
/** 结束, 汇总结果
|
|
22
|
+
* @param points
|
|
23
|
+
*/
|
|
24
|
+
private end;
|
|
18
25
|
/** 执行完成
|
|
19
26
|
*/
|
|
20
|
-
completed
|
|
27
|
+
private completed;
|
|
28
|
+
/** 回滚操作
|
|
29
|
+
* @param data
|
|
30
|
+
*/
|
|
31
|
+
private rollback;
|
|
32
|
+
/** 撤回回滚
|
|
33
|
+
* @param lines
|
|
34
|
+
* @returns
|
|
35
|
+
*/
|
|
36
|
+
private revokeRollback;
|
|
21
37
|
}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { CommandFlowComponent } from './CommandFlowComponent';
|
|
2
2
|
import { LineSegment } from '../../../../../Quadtree/LineSegment';
|
|
3
|
+
import { LineUserData } from '../RenderManager';
|
|
3
4
|
import { ComponentManager } from '../../../../../ComponentManager';
|
|
4
5
|
import * as THREE from "three";
|
|
5
|
-
export declare class DrawWindow extends CommandFlowComponent<{
|
|
6
|
+
export declare class DrawWindow extends CommandFlowComponent<{
|
|
7
|
+
pointerMove: {
|
|
8
|
+
point: THREE.Vector3;
|
|
9
|
+
};
|
|
10
|
+
}> {
|
|
6
11
|
static name: string;
|
|
7
12
|
container: THREE.Group<THREE.Object3DEventMap>;
|
|
8
13
|
interruptKeys: string[];
|
|
@@ -20,7 +25,25 @@ export declare class DrawWindow extends CommandFlowComponent<{}> {
|
|
|
20
25
|
point: THREE.Vector3;
|
|
21
26
|
line: LineSegment;
|
|
22
27
|
}): void;
|
|
28
|
+
/**
|
|
29
|
+
* 结束处理
|
|
30
|
+
* @param next
|
|
31
|
+
* @param points
|
|
32
|
+
*/
|
|
33
|
+
private end;
|
|
23
34
|
/** 执行完成
|
|
24
35
|
*/
|
|
25
|
-
completed(
|
|
36
|
+
completed({ doorDataItem, line }: {
|
|
37
|
+
doorDataItem: any;
|
|
38
|
+
line: LineSegment<LineUserData>;
|
|
39
|
+
}): void;
|
|
40
|
+
/** 回滚操作
|
|
41
|
+
* @param data
|
|
42
|
+
*/
|
|
43
|
+
private rollback;
|
|
44
|
+
/** 撤回回滚
|
|
45
|
+
* @param data
|
|
46
|
+
* @returns
|
|
47
|
+
*/
|
|
48
|
+
private revokeRollback;
|
|
26
49
|
}
|
package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/IntersectionConnectionLine.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { CommandFlowComponent } from './CommandFlowComponent';
|
|
2
|
+
import { ComponentManager } from '../../../../../ComponentManager';
|
|
3
|
+
/**
|
|
4
|
+
* 连接选择的线段
|
|
5
|
+
*/
|
|
6
|
+
export declare class IntersectionConnectionLine extends CommandFlowComponent<{}> {
|
|
7
|
+
static name: string;
|
|
8
|
+
shortcutKeys: string[];
|
|
9
|
+
static commandName: string;
|
|
10
|
+
onAddFromParent(parent: ComponentManager): 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 { CommandFlowComponent } from './CommandFlowComponent';
|
|
2
|
+
import { ComponentManager } from '../../../../../ComponentManager';
|
|
3
|
+
/**
|
|
4
|
+
* 合并同向线段
|
|
5
|
+
*/
|
|
6
|
+
export declare class MergeLine extends CommandFlowComponent<{}> {
|
|
7
|
+
static name: string;
|
|
8
|
+
shortcutKeys: string[];
|
|
9
|
+
static commandName: string;
|
|
10
|
+
onAddFromParent(parent: ComponentManager): void;
|
|
11
|
+
/**
|
|
12
|
+
* 进入命令约束
|
|
13
|
+
*/
|
|
14
|
+
private constraint;
|
|
15
|
+
/** 开始
|
|
16
|
+
* @param next
|
|
17
|
+
* @todo 合并所有
|
|
18
|
+
*/
|
|
19
|
+
private mergeLine;
|
|
20
|
+
/** 执行完成
|
|
21
|
+
* @param data
|
|
22
|
+
*/
|
|
23
|
+
private completed;
|
|
24
|
+
/** 回滚操作
|
|
25
|
+
* @param data
|
|
26
|
+
*/
|
|
27
|
+
private rollback;
|
|
28
|
+
/** 撤回回滚
|
|
29
|
+
* @param lines
|
|
30
|
+
* @returns
|
|
31
|
+
*/
|
|
32
|
+
private revokeRollback;
|
|
33
|
+
}
|
|
@@ -2,7 +2,11 @@ import { CommandFlowComponent } from './CommandFlowComponent';
|
|
|
2
2
|
import { LineSegment } from '../../../../../Quadtree/LineSegment';
|
|
3
3
|
import { ComponentManager } from '../../../../../ComponentManager';
|
|
4
4
|
import * as THREE from "three";
|
|
5
|
-
export declare class PointDrag extends CommandFlowComponent<{
|
|
5
|
+
export declare class PointDrag extends CommandFlowComponent<{
|
|
6
|
+
pointerMove: {
|
|
7
|
+
point: THREE.Vector3;
|
|
8
|
+
};
|
|
9
|
+
}> {
|
|
6
10
|
static name: string;
|
|
7
11
|
container: THREE.Group<THREE.Object3DEventMap>;
|
|
8
12
|
interruptKeys: string[];
|
|
@@ -25,4 +29,13 @@ export declare class PointDrag extends CommandFlowComponent<{}> {
|
|
|
25
29
|
/** 执行完成
|
|
26
30
|
*/
|
|
27
31
|
completed(data: any): void;
|
|
32
|
+
/** 回滚操作
|
|
33
|
+
* @param data
|
|
34
|
+
*/
|
|
35
|
+
private rollback;
|
|
36
|
+
/** 撤回回滚
|
|
37
|
+
* @param lines
|
|
38
|
+
* @returns
|
|
39
|
+
*/
|
|
40
|
+
private revokeRollback;
|
|
28
41
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { CommandFlowComponent } from './CommandFlowComponent';
|
|
2
|
+
import { ComponentManager } from '../../../../../ComponentManager';
|
|
3
|
+
import { LineSegment } from '../../../../../Quadtree/LineSegment';
|
|
4
|
+
import * as THREE from "three";
|
|
5
|
+
/**
|
|
6
|
+
* 选择全部命令
|
|
7
|
+
*/
|
|
8
|
+
export declare class SelectAll extends CommandFlowComponent<{}> {
|
|
9
|
+
static name: string;
|
|
10
|
+
container: THREE.Group<THREE.Object3DEventMap>;
|
|
11
|
+
shortcutKeys: string[];
|
|
12
|
+
static commandName: string;
|
|
13
|
+
onAddFromParent(parent: ComponentManager): 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
|
+
}
|