build-dxf 0.0.40 → 0.0.42
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 +26 -24
- package/package.json +1 -1
- package/src/build.js +678 -589
- package/src/index.js +1 -1
- package/src/index3.js +503 -499
- package/src/utils/CommandManager/CommandManager.d.ts +1 -0
- package/src/utils/DxfSystem/components/Dxf.d.ts +11 -2
- package/src/utils/DxfSystem/components/LineAnalysis.d.ts +14 -1
- package/src/utils/DxfSystem/utils/originalDataToLineData.d.ts +7 -0
- package/src/utils/Quadtree/Point.d.ts +5 -0
|
@@ -35,6 +35,7 @@ export declare class Dxf<TEventMap extends {} = {}> extends Component<{
|
|
|
35
35
|
wallsGroup: Point[][];
|
|
36
36
|
doors: DataItem[];
|
|
37
37
|
doorLineSegment: LineSegment[];
|
|
38
|
+
verticalReferenceLine?: LineSegment<LineUserData>;
|
|
38
39
|
lineSegments: LineSegment<LineUserData>[];
|
|
39
40
|
originalZAverage: number;
|
|
40
41
|
static EndType: {
|
|
@@ -59,7 +60,7 @@ export declare class Dxf<TEventMap extends {} = {}> extends Component<{
|
|
|
59
60
|
* 预处理数据
|
|
60
61
|
* @param data
|
|
61
62
|
*/
|
|
62
|
-
preprocessing(data: OriginalDataItem[]
|
|
63
|
+
preprocessing(data: OriginalDataItem[]): {
|
|
63
64
|
lineSegments: LineSegment<LineUserData>[];
|
|
64
65
|
data: OriginalDataItem[];
|
|
65
66
|
};
|
|
@@ -71,7 +72,7 @@ export declare class Dxf<TEventMap extends {} = {}> extends Component<{
|
|
|
71
72
|
* @param option
|
|
72
73
|
* @returns
|
|
73
74
|
*/
|
|
74
|
-
set(data: OriginalDataItem[] | string, width?: number, scale?: number
|
|
75
|
+
set(data: OriginalDataItem[] | string, width?: number, scale?: number): Promise<any>;
|
|
75
76
|
/** 创建分组
|
|
76
77
|
* @description 根据相交数组insetionArr, 把相交的线段,划分到一组内,方便后续路径查找合并使用
|
|
77
78
|
* @returns
|
|
@@ -113,6 +114,14 @@ export declare class Dxf<TEventMap extends {} = {}> extends Component<{
|
|
|
113
114
|
* @description 使用 ClipperLib 对每个点组进行线偏移处理,生成具有指定宽度的墙体路径
|
|
114
115
|
*/
|
|
115
116
|
lineOffset(endType?: number, joinType?: number, scale?: number): Point<Record<string, any>>[][];
|
|
117
|
+
/** 垂直纠正
|
|
118
|
+
* @param option
|
|
119
|
+
*/
|
|
120
|
+
axisAlignCorr(option?: AxisAlignmentCorrectionOption): void;
|
|
121
|
+
/** 完整线段数据
|
|
122
|
+
* @returns
|
|
123
|
+
*/
|
|
124
|
+
getLineSegments(clone?: boolean): LineSegment<LineUserData>[];
|
|
116
125
|
/**
|
|
117
126
|
* 将点云结构转换为Float32Array
|
|
118
127
|
*/
|
|
@@ -22,6 +22,7 @@ type DoorPoint = {
|
|
|
22
22
|
declare class DoorsAnalysis {
|
|
23
23
|
possibleDoorPoints: DoorPoint[];
|
|
24
24
|
doorPoint: DoorPoint[];
|
|
25
|
+
calculatedDoorPoint: DoorPoint[];
|
|
25
26
|
dxf: Dxf;
|
|
26
27
|
pointVirtualGrid: PointVirtualGrid<LineSegment<Record<string, any>>>;
|
|
27
28
|
findPointVirtualGrid: PointVirtualGrid<LineSegment>;
|
|
@@ -35,6 +36,14 @@ declare class DoorsAnalysis {
|
|
|
35
36
|
continueFind: boolean;
|
|
36
37
|
constructor(lineAnalysis: LineAnalysis);
|
|
37
38
|
private handle;
|
|
39
|
+
/** 查找
|
|
40
|
+
* @param doorPoints
|
|
41
|
+
* @param possibleDoorPoints
|
|
42
|
+
* @param minDoorWidth
|
|
43
|
+
* @param doorSearchDistance
|
|
44
|
+
* @param doorSearchNearAngle
|
|
45
|
+
* @returns
|
|
46
|
+
*/
|
|
38
47
|
private search;
|
|
39
48
|
/** 添加可查找点的过滤规则
|
|
40
49
|
* @param rule
|
|
@@ -48,7 +57,10 @@ declare class DoorsAnalysis {
|
|
|
48
57
|
/**
|
|
49
58
|
* 查找已知为门的点位
|
|
50
59
|
*/
|
|
51
|
-
getDoorPoint():
|
|
60
|
+
getDoorPoint(): {
|
|
61
|
+
doorPoints: DoorPoint[];
|
|
62
|
+
calculatedDoorPoint: DoorPoint[];
|
|
63
|
+
};
|
|
52
64
|
/**
|
|
53
65
|
* 查找双线墙的点位
|
|
54
66
|
* @returns
|
|
@@ -153,6 +165,7 @@ export declare class LineAnalysis extends Component<{
|
|
|
153
165
|
doorSearchDistance: number;
|
|
154
166
|
doors: LineSegment[];
|
|
155
167
|
DoorsAnalysis?: DoorsAnalysis;
|
|
168
|
+
skipFindDoor: boolean;
|
|
156
169
|
doorsAnalysis(): void;
|
|
157
170
|
}
|
|
158
171
|
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { LineSegment } from '../../Quadtree/LineSegment';
|
|
2
|
+
import { LineUserData, OriginalDataItem } from '../type';
|
|
3
|
+
export declare function originalDataToLineData(data: OriginalDataItem[]): {
|
|
4
|
+
originalZAverage: number;
|
|
5
|
+
lineSegments: LineSegment<LineUserData>[];
|
|
6
|
+
verticalReferenceIndex: number;
|
|
7
|
+
};
|
|
@@ -116,6 +116,11 @@ export declare class Point<T = Record<string, any>> {
|
|
|
116
116
|
* @returns
|
|
117
117
|
*/
|
|
118
118
|
angleBetween(point: Point, type?: 'radian' | 'cos' | 'angle', angle?: "180" | "360"): number;
|
|
119
|
+
/**
|
|
120
|
+
* @param point
|
|
121
|
+
* @returns
|
|
122
|
+
*/
|
|
123
|
+
angleBetween2(point: Point): number;
|
|
119
124
|
/** 获取向量长度
|
|
120
125
|
*/
|
|
121
126
|
length(): number;
|