build-dxf 0.0.21 → 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/package.json +1 -1
- package/src/build.js +29 -2
- package/src/index2.js +10 -10
- package/src/index3.js +601 -525
- package/src/utils/DxfSystem/components/AngleCorrectionDxf.d.ts +4 -1
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/CommandFlowComponent.d.ts +11 -0
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/Default.d.ts +2 -6
- package/src/utils/Quadtree/LineSegment.d.ts +0 -1
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/VerticalCorrection copy.d.ts +0 -82
|
@@ -3,8 +3,11 @@ import { Dxf } from './Dxf';
|
|
|
3
3
|
/**
|
|
4
4
|
* 角度修正过后的DXF格式数据
|
|
5
5
|
*/
|
|
6
|
-
export declare class AngleCorrectionDxf extends Dxf<{
|
|
6
|
+
export declare class AngleCorrectionDxf extends Dxf<{
|
|
7
|
+
updateData: {};
|
|
8
|
+
}> {
|
|
7
9
|
static name: string;
|
|
10
|
+
angle: number;
|
|
8
11
|
onAddFromParent(parent: ComponentManager): void;
|
|
9
12
|
update(): Promise<void>;
|
|
10
13
|
}
|
|
@@ -4,6 +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 '../../../../../Quadtree/LineSegment';
|
|
8
|
+
import { Point } from '../../../../../Quadtree/Point';
|
|
7
9
|
export declare class CommandFlowComponent<TEventMap extends {} = {}> extends Component<TEventMap> {
|
|
8
10
|
private _renderer?;
|
|
9
11
|
get renderer(): Renderer;
|
|
@@ -43,4 +45,13 @@ export declare class CommandFlowComponent<TEventMap extends {} = {}> extends Com
|
|
|
43
45
|
* @returns
|
|
44
46
|
*/
|
|
45
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
|
+
};
|
|
46
57
|
}
|
|
@@ -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>[];
|
|
@@ -6,7 +6,6 @@ import { Rectangle } from './Rectangle';
|
|
|
6
6
|
export declare class LineSegment<T = Record<string, any>> {
|
|
7
7
|
points: Point[];
|
|
8
8
|
userData: T;
|
|
9
|
-
line: any;
|
|
10
9
|
get center(): Point<Record<string, any>>;
|
|
11
10
|
get start(): Point<Record<string, any>>;
|
|
12
11
|
get end(): Point<Record<string, any>>;
|
package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/VerticalCorrection copy.d.ts
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { CommandFlowComponent } from './CommandFlowComponent';
|
|
2
|
-
import { ComponentManager } from '../../../../../ComponentManager';
|
|
3
|
-
import { LineSegment } from '../../../../../Quadtree/LineSegment';
|
|
4
|
-
import { Point } from '../../../../../Quadtree/Point';
|
|
5
|
-
import * as THREE from "three";
|
|
6
|
-
/**
|
|
7
|
-
* 垂直纠正
|
|
8
|
-
*/
|
|
9
|
-
export declare class VerticalCorrection extends CommandFlowComponent<{}> {
|
|
10
|
-
static name: string;
|
|
11
|
-
container: THREE.Group<THREE.Object3DEventMap>;
|
|
12
|
-
shortcutKeys: string[];
|
|
13
|
-
shortcutKeys2: string[];
|
|
14
|
-
static commandName: string;
|
|
15
|
-
recursion: boolean;
|
|
16
|
-
onAddFromParent(parent: ComponentManager): void;
|
|
17
|
-
/**
|
|
18
|
-
* 进入命令约束
|
|
19
|
-
*/
|
|
20
|
-
constraint(next: any, selectLines: LineSegment[]): void;
|
|
21
|
-
/**
|
|
22
|
-
* 线段是否为结尾线段
|
|
23
|
-
* @param line
|
|
24
|
-
*/
|
|
25
|
-
lineIsPathEnd(line: LineSegment): boolean;
|
|
26
|
-
/**
|
|
27
|
-
*
|
|
28
|
-
* @param line0
|
|
29
|
-
* @param line1
|
|
30
|
-
*/
|
|
31
|
-
isTowLineSegmentConnect(line0: LineSegment, line1: LineSegment): boolean;
|
|
32
|
-
/**
|
|
33
|
-
* 获取所有相同点的位置信息
|
|
34
|
-
* @param point
|
|
35
|
-
* @param point2
|
|
36
|
-
*/
|
|
37
|
-
getSamePointAll(point: Point, line: LineSegment): {
|
|
38
|
-
queryList: {
|
|
39
|
-
point: Point;
|
|
40
|
-
userData?: LineSegment<import('..').LineUserData> | undefined;
|
|
41
|
-
}[];
|
|
42
|
-
parallelList: {
|
|
43
|
-
point: Point;
|
|
44
|
-
userData?: LineSegment<import('..').LineUserData> | undefined;
|
|
45
|
-
}[];
|
|
46
|
-
};
|
|
47
|
-
/**
|
|
48
|
-
*
|
|
49
|
-
* @param line
|
|
50
|
-
* @param point
|
|
51
|
-
* @param newPoint
|
|
52
|
-
*/
|
|
53
|
-
setLinePoint(line: LineSegment, newStartPoint?: Point, newEndPoint?: Point, mode?: "start" | "end" | "all", record?: any[]): void;
|
|
54
|
-
/** 修正2
|
|
55
|
-
* 第一步:确定需要修复的线段
|
|
56
|
-
* 第二步:查找与该线段相交的其他线段
|
|
57
|
-
* 第三步:找出两端点相交的线段,其他为区间相交
|
|
58
|
-
* 第四步:修正相交的线段的另一个端点
|
|
59
|
-
* 第五步:判断是否有方向一致的线段,有就调整,调整方法:查找连续平行的线段,求点在线段方向的投影,直到不平行的线段结束
|
|
60
|
-
* 第六步: 中间线段采用投影修正
|
|
61
|
-
* @param targettLine
|
|
62
|
-
* @param vistedList
|
|
63
|
-
*/
|
|
64
|
-
correction(targettLine: LineSegment, entryPoint?: Point, resultList?: any[], vistedList?: Set<LineSegment | Point>): any[] | undefined;
|
|
65
|
-
/** 开始
|
|
66
|
-
* @param next
|
|
67
|
-
*/
|
|
68
|
-
verticalCorrection(next: any, selectLines: LineSegment[]): void;
|
|
69
|
-
/** 执行完成
|
|
70
|
-
* @param data
|
|
71
|
-
*/
|
|
72
|
-
private completed;
|
|
73
|
-
/** 回滚操作
|
|
74
|
-
* @param data
|
|
75
|
-
*/
|
|
76
|
-
private rollback;
|
|
77
|
-
/** 撤回回滚
|
|
78
|
-
* @param lines
|
|
79
|
-
* @returns
|
|
80
|
-
*/
|
|
81
|
-
private revokeRollback;
|
|
82
|
-
}
|