build-dxf 0.0.20-2 → 0.0.20-20
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 +1 -1
- package/src/build.js +1377 -1916
- package/src/index.css +1 -629
- package/src/index.js +7 -7
- package/src/index2.js +327 -528
- package/src/index3.js +1809 -1715
- package/src/selectLocalFile.js +1955 -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 +9 -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/CommandFlowComponent.d.ts +4 -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 +0 -20
- 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 +24 -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 +82 -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/RenderManager.d.ts +4 -1
- package/src/utils/DxfSystem/plugin/Editor/components/index.d.ts +1 -0
- package/src/utils/Quadtree/LineSegment.d.ts +19 -0
- package/src/utils/Quadtree/Point.d.ts +9 -2
- package/src/utils/deepClone.d.ts +6 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CommandFlowComponent } from './CommandFlowComponent';
|
|
2
|
+
import { ComponentManager } from '../../../../../ComponentManager';
|
|
3
|
+
/**
|
|
4
|
+
* 设置垂直基准线段
|
|
5
|
+
*/
|
|
6
|
+
export declare class VerticalReferenceLine 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
|
+
*
|
|
17
|
+
* @param next
|
|
18
|
+
* @param selectLines
|
|
19
|
+
*/
|
|
20
|
+
private verticalReferenceLine;
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CommandFlowComponent } from './CommandFlowComponent';
|
|
2
|
+
import { ComponentManager } from '../../../../../ComponentManager';
|
|
3
|
+
/**
|
|
4
|
+
* 合并同向线段
|
|
5
|
+
*/
|
|
6
|
+
export declare class ViewAngle 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
|
+
*
|
|
17
|
+
* @param next
|
|
18
|
+
* @param selectLines
|
|
19
|
+
*/
|
|
20
|
+
private viewAngle;
|
|
21
|
+
}
|
|
@@ -12,11 +12,13 @@ export type LineUserData = {
|
|
|
12
12
|
doorDirectConnection?: boolean;
|
|
13
13
|
isDoor?: boolean;
|
|
14
14
|
isWindow?: boolean;
|
|
15
|
-
|
|
15
|
+
isVerticalReferenceLine?: boolean;
|
|
16
|
+
drawWindow?: {
|
|
16
17
|
p: THREE.Vector3;
|
|
17
18
|
width: number;
|
|
18
19
|
full: boolean;
|
|
19
20
|
}[];
|
|
21
|
+
drawDoorData?: any;
|
|
20
22
|
quadtreeNode?: QuadtreeNode;
|
|
21
23
|
};
|
|
22
24
|
export declare class RenderManager extends Component<{}> {
|
|
@@ -29,6 +31,7 @@ export declare class RenderManager extends Component<{}> {
|
|
|
29
31
|
type: "addLine" | "removeLine";
|
|
30
32
|
data: any;
|
|
31
33
|
}>;
|
|
34
|
+
verticalReferenceLineFlag: THREE.Mesh<THREE.PlaneGeometry, THREE.MeshBasicMaterial, THREE.Object3DEventMap>;
|
|
32
35
|
onAddFromParent(): void;
|
|
33
36
|
private updatedMode;
|
|
34
37
|
/** 重新设置数据
|
|
@@ -11,6 +11,25 @@ export declare class LineSegment<T = Record<string, any>> {
|
|
|
11
11
|
get start(): Point<Record<string, any>>;
|
|
12
12
|
get end(): Point<Record<string, any>>;
|
|
13
13
|
constructor(p1?: Point, p2?: Point);
|
|
14
|
+
set(p1: Point, p2: Point): this;
|
|
15
|
+
/**
|
|
16
|
+
* 是否有相同端点
|
|
17
|
+
* @param line
|
|
18
|
+
* @returns
|
|
19
|
+
*/
|
|
20
|
+
sameEndpoint(line: LineSegment): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* 相同端点是否为开始
|
|
23
|
+
* @param line
|
|
24
|
+
* @returns
|
|
25
|
+
*/
|
|
26
|
+
sameEndpointAsStart(line: LineSegment): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* 相同端点是否为结束
|
|
29
|
+
* @param line
|
|
30
|
+
* @returns
|
|
31
|
+
*/
|
|
32
|
+
sameEndpointAsEnd(line: LineSegment): boolean;
|
|
14
33
|
/** 膨胀
|
|
15
34
|
* @description 向线段的两个端点分别膨胀 width
|
|
16
35
|
* @param width
|
|
@@ -54,6 +54,12 @@ export declare class Point<T = Record<string, any>> {
|
|
|
54
54
|
* @returns
|
|
55
55
|
*/
|
|
56
56
|
add(point: Point): this;
|
|
57
|
+
/**
|
|
58
|
+
* 绕point旋转angle
|
|
59
|
+
* @param point
|
|
60
|
+
* @param angle 旋转角度,单位为弧度
|
|
61
|
+
*/
|
|
62
|
+
rotate(point: Point, angle: number): this;
|
|
57
63
|
/**
|
|
58
64
|
* 保留小数位数
|
|
59
65
|
* @param count
|
|
@@ -124,10 +130,11 @@ export declare class Point<T = Record<string, any>> {
|
|
|
124
130
|
copy(p: {
|
|
125
131
|
x: number;
|
|
126
132
|
y: number;
|
|
127
|
-
}):
|
|
128
|
-
toJson(): {
|
|
133
|
+
}): this;
|
|
134
|
+
toJson(z?: number): {
|
|
129
135
|
x: number;
|
|
130
136
|
y: number;
|
|
137
|
+
z: number;
|
|
131
138
|
};
|
|
132
139
|
static from(arr: any): Point<Record<string, any>>;
|
|
133
140
|
static zero(): Point<Record<string, any>>;
|