build-dxf 0.0.48 → 0.0.50
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 +50 -1
- package/package.json +1 -1
- package/src/build.js +1652 -1223
- package/src/index.css +1 -1
- package/src/index3.js +975 -927
- package/src/utils/CommandManager/CommandFlow.d.ts +2 -0
- package/src/utils/DxfSystem/components/DoorsAnalysis.d.ts +1 -1
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/CommandFlowComponent.d.ts +1 -1
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/DrawLine.d.ts +7 -0
- package/src/utils/DxfSystem/type.d.ts +9 -1
- package/src/utils/DxfSystem/utils/DoubleWallHelper.d.ts +0 -1
- package/src/utils/DxfSystem/utils/LineGroupType.d.ts +81 -0
- package/src/utils/DxfSystem/utils/findClosedPolygons01.d.ts +4 -17
- package/src/utils/DxfSystem/utils/findDiscretePointLine.d.ts +1 -1
- package/src/utils/DxfSystem/utils/findLargestCircle.d.ts +14 -0
- package/src/utils/DxfSystem/utils/index.d.ts +11 -0
- package/src/utils/DxfSystem/utils/mergeSmallestCircle.d.ts +14 -0
- package/src/utils/DxfSystem/utils/recomputedWindow.d.ts +5 -0
- package/src/utils/DxfSystem/utils/smallestCircle.d.ts +6 -0
- package/src/utils/LineIndexGenerator.d.ts +3 -1
- package/src/utils/LineSegment.d.ts +16 -1
- package/src/utils/Map.d.ts +3 -0
- package/src/utils/Point.d.ts +1 -0
- package/src/utils/PointVirtualGrid/index.d.ts +5 -4
- package/src/utils/Polygon.d.ts +26 -0
- package/src/utils/UndirectedGraph.d.ts +39 -9
- package/src/utils/index.d.ts +17 -0
- package/src/utils/DxfSystem/utils/BoundExtOld.d.ts +0 -16
- package/src/utils/DxfSystem/utils/TrajectoryHelper.d.ts +0 -29
- package/src/utils/DxfSystem/utils/findClosedPolygons.d.ts +0 -22
- package/src/utils/Path.d.ts +0 -6
|
@@ -21,6 +21,8 @@ export declare class CommandFlow extends EventDispatcher<{
|
|
|
21
21
|
rollbacklist: ((data?: any) => void)[];
|
|
22
22
|
revokeRollbacklist: ((data?: any) => void)[];
|
|
23
23
|
writeOperationList: boolean;
|
|
24
|
+
loop: boolean;
|
|
25
|
+
setLoop(loop: boolean): this;
|
|
24
26
|
/**
|
|
25
27
|
*
|
|
26
28
|
* @param operation
|
|
@@ -33,7 +33,7 @@ declare class DoorsAnalysis {
|
|
|
33
33
|
doors: LineSegment[];
|
|
34
34
|
lineAnalysis: LineAnalysis;
|
|
35
35
|
continueFind: boolean;
|
|
36
|
-
constructor(lineAnalysis: LineAnalysis);
|
|
36
|
+
constructor(lineAnalysis: LineAnalysis, skipFindDoor: boolean);
|
|
37
37
|
private handle;
|
|
38
38
|
/** 查找
|
|
39
39
|
* @param doorPoints
|
|
@@ -6,7 +6,7 @@ import { RenderManager } from '../RenderManager';
|
|
|
6
6
|
import { Default } from './Default';
|
|
7
7
|
import { LineSegment } from '../../../../../LineSegment';
|
|
8
8
|
import { Point } from '../../../../../Point';
|
|
9
|
-
export declare class CommandFlowComponent<TEventMap extends {} = {}> extends Component<TEventMap> {
|
|
9
|
+
export declare class CommandFlowComponent<TEventMap extends {} = {}> extends Component<TEventMap & {}> {
|
|
10
10
|
private _renderer?;
|
|
11
11
|
get renderer(): Renderer;
|
|
12
12
|
private _domElement?;
|
|
@@ -5,6 +5,13 @@ export declare class DrawLine extends CommandFlowComponent<{
|
|
|
5
5
|
pointerMove: {
|
|
6
6
|
point: THREE.Vector3;
|
|
7
7
|
};
|
|
8
|
+
appendLine: {
|
|
9
|
+
points: THREE.Vector3[];
|
|
10
|
+
};
|
|
11
|
+
revoke: {
|
|
12
|
+
points: THREE.Vector3[];
|
|
13
|
+
};
|
|
14
|
+
start: {};
|
|
8
15
|
}> {
|
|
9
16
|
static name: string;
|
|
10
17
|
container: THREE.Group<THREE.Object3DEventMap>;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { QuadtreeNode } from '../Quadtree';
|
|
2
2
|
import { Point } from '../Point';
|
|
3
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";
|
|
4
|
+
export interface GroupItem {
|
|
5
|
+
id: string;
|
|
6
|
+
type?: string;
|
|
7
|
+
}
|
|
4
8
|
export interface OriginalDataItem {
|
|
5
9
|
start: {
|
|
6
10
|
x: number;
|
|
@@ -23,6 +27,7 @@ export interface OriginalDataItem {
|
|
|
23
27
|
length: number;
|
|
24
28
|
isDoor?: boolean;
|
|
25
29
|
doorDirectConnection?: boolean;
|
|
30
|
+
doorAutomaticFind?: boolean;
|
|
26
31
|
drawDoorData?: {
|
|
27
32
|
start: {
|
|
28
33
|
x: number;
|
|
@@ -37,6 +42,7 @@ export interface OriginalDataItem {
|
|
|
37
42
|
};
|
|
38
43
|
wallWidth?: number;
|
|
39
44
|
isWindow?: boolean;
|
|
45
|
+
isBayWindow?: boolean;
|
|
40
46
|
rooftopPz?: number;
|
|
41
47
|
isVerticalReferenceLine?: boolean;
|
|
42
48
|
groupId?: string;
|
|
@@ -59,6 +65,9 @@ export type LineUserData = {
|
|
|
59
65
|
rooftopPz?: number;
|
|
60
66
|
groupId?: string;
|
|
61
67
|
groupType?: string;
|
|
68
|
+
groups?: GroupItem[];
|
|
69
|
+
doorAutomaticFind?: boolean;
|
|
70
|
+
isBayWindow?: boolean;
|
|
62
71
|
drawWindow?: {
|
|
63
72
|
p: {
|
|
64
73
|
x: number;
|
|
@@ -121,7 +130,6 @@ export type AxisAlignmentCorrectionOption = {
|
|
|
121
130
|
* 吸附方式, 默认 adsorption
|
|
122
131
|
*/
|
|
123
132
|
adsorptionMethod?: "originalInterPoint" | "adsorption";
|
|
124
|
-
removeClosedLine?: boolean;
|
|
125
133
|
wallGroup?: boolean;
|
|
126
134
|
};
|
|
127
135
|
/**
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { LineSegment } from '../../LineSegment';
|
|
2
|
+
import { LineUserData } from '../type';
|
|
3
|
+
export declare class LineGroupType {
|
|
4
|
+
/**
|
|
5
|
+
* 获取线段的所有分组信息
|
|
6
|
+
* @param line
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
static get(line: LineSegment<LineUserData>): {
|
|
10
|
+
id: string;
|
|
11
|
+
type?: string;
|
|
12
|
+
}[];
|
|
13
|
+
/**
|
|
14
|
+
* 为线段添加新的分组
|
|
15
|
+
* @param line
|
|
16
|
+
* @param id
|
|
17
|
+
* @param type
|
|
18
|
+
* @returns
|
|
19
|
+
*/
|
|
20
|
+
static set(line: LineSegment<LineUserData>, id: string, type: string): void;
|
|
21
|
+
/**
|
|
22
|
+
* 替换线段中的分组信息
|
|
23
|
+
* @param line
|
|
24
|
+
* @param id
|
|
25
|
+
* @param type
|
|
26
|
+
* @returns
|
|
27
|
+
*/
|
|
28
|
+
static replace(line: LineSegment<LineUserData>, id: string, type: string): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* 检查线段是否包含指定的分组ID
|
|
31
|
+
* @param line
|
|
32
|
+
* @param id
|
|
33
|
+
* @returns
|
|
34
|
+
*/
|
|
35
|
+
static hasId(line: LineSegment<LineUserData>, id: string): boolean | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* 检查线段是否包含指定的分组类型
|
|
38
|
+
* @param line
|
|
39
|
+
* @param type
|
|
40
|
+
* @returns
|
|
41
|
+
*/
|
|
42
|
+
static hasType(line: LineSegment<LineUserData>, type: string): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* 检查线段是否包含所有指定的分组类型
|
|
45
|
+
* @param line
|
|
46
|
+
* @param types
|
|
47
|
+
* @returns
|
|
48
|
+
*/
|
|
49
|
+
static hasTypes(line: LineSegment<LineUserData>, types: string[]): boolean;
|
|
50
|
+
/**
|
|
51
|
+
* 检查线段是否包含所有指定的分组类型
|
|
52
|
+
* @param lines
|
|
53
|
+
* @param type
|
|
54
|
+
* @returns
|
|
55
|
+
*/
|
|
56
|
+
static everyType(lines: LineSegment<LineUserData>[], type: string): boolean;
|
|
57
|
+
/**
|
|
58
|
+
* 获取所有线段的交集类型(所有线段都包含的类型)
|
|
59
|
+
* @param lines
|
|
60
|
+
* @returns
|
|
61
|
+
*/
|
|
62
|
+
static getIntersectionTypes(lines: LineSegment<LineUserData>[]): string[];
|
|
63
|
+
/**
|
|
64
|
+
* 获取所有线段的交集类型(所有线段都包含的类型)
|
|
65
|
+
* @param lines
|
|
66
|
+
* @returns
|
|
67
|
+
*/
|
|
68
|
+
static getUnionTypes(lines: LineSegment<LineUserData>[]): string[];
|
|
69
|
+
/**
|
|
70
|
+
* 获取所有线段的交集类型(所有线段都包含的类型)
|
|
71
|
+
* @param line
|
|
72
|
+
* @param id
|
|
73
|
+
* @returns
|
|
74
|
+
*/
|
|
75
|
+
static remove(line: LineSegment<LineUserData>, id: string): boolean;
|
|
76
|
+
/**
|
|
77
|
+
* 清空线段的所有分组信息
|
|
78
|
+
* @param line
|
|
79
|
+
*/
|
|
80
|
+
static clear(line: LineSegment<LineUserData>): void;
|
|
81
|
+
}
|
|
@@ -1,27 +1,14 @@
|
|
|
1
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
2
|
/** 通过并查集,查找为环的一部分边
|
|
3
|
+
* @description
|
|
8
4
|
* @param lines
|
|
9
5
|
*/
|
|
10
6
|
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
7
|
/**
|
|
20
8
|
* 从线段集合中提取所有闭合多边形
|
|
21
9
|
*/
|
|
22
10
|
export declare function findClosedPolygons(lines: LineSegment[]): {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
ringLines: LineSegment<Record<string, any>>[];
|
|
11
|
+
newLines: LineSegment<Record<string, any>>[];
|
|
12
|
+
rings: LineSegment<Record<string, any>>[][];
|
|
13
|
+
internalEdges: LineSegment<Record<string, any>>[];
|
|
27
14
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LineSegment } from '../../LineSegment';
|
|
2
|
+
/** 通过并查集,查找为环的一部分边
|
|
3
|
+
* @description
|
|
4
|
+
* @param lines
|
|
5
|
+
*/
|
|
6
|
+
export declare function findCircleEdges(lines: LineSegment[]): LineSegment<Record<string, any>>[];
|
|
7
|
+
/**
|
|
8
|
+
* 从线段集合中提取所有闭合多边形
|
|
9
|
+
*/
|
|
10
|
+
export declare function findLargestCircle(lines: LineSegment[]): {
|
|
11
|
+
newLines: LineSegment<Record<string, any>>[];
|
|
12
|
+
rings: LineSegment<Record<string, any>>[][];
|
|
13
|
+
internalEdges: LineSegment<Record<string, any>>[];
|
|
14
|
+
};
|
|
@@ -2,4 +2,15 @@ export * from './AxisAlignCorr';
|
|
|
2
2
|
export * from './BoundExt';
|
|
3
3
|
export * from './lineDataToOriginalData';
|
|
4
4
|
export * from './lineSegmentClipping';
|
|
5
|
+
export * from './DoubleWallHelper';
|
|
6
|
+
export * from './clippingDoubleWall';
|
|
7
|
+
export * from './clippingLineUserData';
|
|
8
|
+
export * from './closedPathArea';
|
|
9
|
+
export * from './createPointVirtualGrid';
|
|
10
|
+
export * from './findLargestCircle';
|
|
11
|
+
export * from './findDiscretePointLine';
|
|
12
|
+
export * from './findVerticalReference';
|
|
13
|
+
export * from './lineDataToOriginalData';
|
|
14
|
+
export * from './mergeLineUserData';
|
|
15
|
+
export * from './originalDataToLineData';
|
|
5
16
|
export * from './recomputedWindow';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LineSegment } from '../../LineSegment';
|
|
2
|
+
/** 环去重
|
|
3
|
+
* @param rings
|
|
4
|
+
*/
|
|
5
|
+
export declare function ringsDeduplication(rings: LineSegment[][]): LineSegment<Record<string, any>>[][];
|
|
6
|
+
/** 合并最小环、只留下外围环线
|
|
7
|
+
* @description
|
|
8
|
+
* @param lines
|
|
9
|
+
* @param ringEdges
|
|
10
|
+
*/
|
|
11
|
+
export declare function mergeSmallestCircle(rings: LineSegment[][]): {
|
|
12
|
+
internalEdges: LineSegment<Record<string, any>>[];
|
|
13
|
+
rings: LineSegment<Record<string, any>>[][];
|
|
14
|
+
};
|
|
@@ -5,3 +5,8 @@ import { LineUserData } from '../type';
|
|
|
5
5
|
* @param windowLines
|
|
6
6
|
*/
|
|
7
7
|
export declare function recomputedWindow(...windowLines: LineSegment<LineUserData>[]): void;
|
|
8
|
+
/**
|
|
9
|
+
* 重新计算窗户位置
|
|
10
|
+
* @param windowLines
|
|
11
|
+
*/
|
|
12
|
+
export declare function recomputedWindowCenter(...windowLines: LineSegment<LineUserData>[]): void;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { LineSegment } from './LineSegment';
|
|
2
2
|
export declare class LineIndexGenerator {
|
|
3
3
|
private index;
|
|
4
|
-
|
|
4
|
+
get size(): number;
|
|
5
|
+
constructor(lines?: LineSegment[]);
|
|
6
|
+
private next;
|
|
5
7
|
reset(): void;
|
|
6
8
|
map: Map<LineSegment<Record<string, any>>, number>;
|
|
7
9
|
lineMap: Map<number, LineSegment<Record<string, any>>>;
|
|
@@ -10,7 +10,6 @@ export declare class LineSegment<T = Record<string, any>> {
|
|
|
10
10
|
get center(): Point<Record<string, any>>;
|
|
11
11
|
get start(): Point<Record<string, any>>;
|
|
12
12
|
get end(): Point<Record<string, any>>;
|
|
13
|
-
id: number;
|
|
14
13
|
constructor(p1?: Point, p2?: Point);
|
|
15
14
|
set(p1: Point, p2: Point): this;
|
|
16
15
|
getAnotherPoint(point: Point): Point<Record<string, any>>;
|
|
@@ -69,6 +68,12 @@ export declare class LineSegment<T = Record<string, any>> {
|
|
|
69
68
|
* @param angle 弧度
|
|
70
69
|
*/
|
|
71
70
|
rotate(angle: number): this;
|
|
71
|
+
/** 镜像线段
|
|
72
|
+
*/
|
|
73
|
+
mirror(): void;
|
|
74
|
+
/** 交换两个端点
|
|
75
|
+
*/
|
|
76
|
+
swap(): void;
|
|
72
77
|
/** 膨胀为矩形
|
|
73
78
|
*
|
|
74
79
|
* @param width
|
|
@@ -208,6 +213,16 @@ export declare class LineSegment<T = Record<string, any>> {
|
|
|
208
213
|
* @returns
|
|
209
214
|
*/
|
|
210
215
|
static groupByPosition(lines: LineSegment[], line: LineSegment): LineSegment<Record<string, any>>[][];
|
|
216
|
+
/** 通过路径,给线段分组
|
|
217
|
+
* @param lines
|
|
218
|
+
* @returns
|
|
219
|
+
*/
|
|
220
|
+
static groupByPath(lines: LineSegment[]): LineSegment<Record<string, any>>[][];
|
|
221
|
+
/** 分组,通过点
|
|
222
|
+
* @param lines
|
|
223
|
+
* @returns
|
|
224
|
+
*/
|
|
225
|
+
static groupByPoint(lines: LineSegment[]): LineSegment<Record<string, any>>[][];
|
|
211
226
|
/** 合并线段到最长线段
|
|
212
227
|
* @param lines
|
|
213
228
|
* @returns
|
package/src/utils/Map.d.ts
CHANGED
package/src/utils/Point.d.ts
CHANGED
|
@@ -6,7 +6,8 @@ type Target<T> = {
|
|
|
6
6
|
userData?: T;
|
|
7
7
|
};
|
|
8
8
|
type NodeSet<T> = Set<Target<T>>;
|
|
9
|
-
export
|
|
9
|
+
export type PvgTarget<T> = Target<T>;
|
|
10
|
+
export declare class PvgList<T = any> extends Array<Target<T>> {
|
|
10
11
|
userDataList(): (T | undefined)[];
|
|
11
12
|
points(): Point<Record<string, any>>[];
|
|
12
13
|
}
|
|
@@ -20,7 +21,7 @@ export declare class PointVirtualGrid<T = Record<string, any>> {
|
|
|
20
21
|
* @param point
|
|
21
22
|
* @param userData
|
|
22
23
|
*/
|
|
23
|
-
insert(point: Point, userData?: T):
|
|
24
|
+
insert(point: Point, userData?: T): this;
|
|
24
25
|
/**
|
|
25
26
|
* 批量加入
|
|
26
27
|
* @param points
|
|
@@ -32,7 +33,7 @@ export declare class PointVirtualGrid<T = Record<string, any>> {
|
|
|
32
33
|
/** 移除点
|
|
33
34
|
* @param point
|
|
34
35
|
*/
|
|
35
|
-
remove(point: Point):
|
|
36
|
+
remove(point: Point): this;
|
|
36
37
|
update(point: Point): boolean;
|
|
37
38
|
/**
|
|
38
39
|
* 获取通过坐标,获取唯一网格索引
|
|
@@ -79,7 +80,7 @@ export declare class PointVirtualGrid<T = Record<string, any>> {
|
|
|
79
80
|
* 查找相同点
|
|
80
81
|
* @param point
|
|
81
82
|
*/
|
|
82
|
-
queryPoint(point: Point, excludeOneself?: boolean):
|
|
83
|
+
queryPoint(point: Point, excludeOneself?: boolean): PvgList<T>;
|
|
83
84
|
/**
|
|
84
85
|
* 查找点自己
|
|
85
86
|
* @param point
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { LineSegment } from './LineSegment';
|
|
2
|
+
import { Point } from './Point';
|
|
3
|
+
export declare class Polygon<T = any> extends Array<Point<T>> {
|
|
4
|
+
constructor(points?: Point<T>[]);
|
|
5
|
+
/**
|
|
6
|
+
* 获取点相对于多边形的位置
|
|
7
|
+
* @param point
|
|
8
|
+
* @returns 'on' 边上,'inside' 内部,'outside' 外部
|
|
9
|
+
*/
|
|
10
|
+
pointPosition(point: Point): "on" | "outside" | "inside";
|
|
11
|
+
/** 点在多边形上:包括路径和内部
|
|
12
|
+
* @param point
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
15
|
+
pointIn(point: Point): boolean;
|
|
16
|
+
/** 点在多边形内部,不包括路径上
|
|
17
|
+
* @param point
|
|
18
|
+
* @returns
|
|
19
|
+
*/
|
|
20
|
+
pointWithin(point: Point): boolean;
|
|
21
|
+
/** 通过线段创建
|
|
22
|
+
* @param lines
|
|
23
|
+
* @returns
|
|
24
|
+
*/
|
|
25
|
+
static fromByLines(lines: LineSegment[]): Polygon<Record<string, any>>;
|
|
26
|
+
}
|
|
@@ -16,13 +16,43 @@ export declare class UndirectedGraph {
|
|
|
16
16
|
forEach(callbackFun: (node: number, neighbors: Set<number>) => void): void;
|
|
17
17
|
}
|
|
18
18
|
export declare class LineSegmentUndirectedGraph extends UndirectedGraph {
|
|
19
|
-
|
|
20
|
-
private
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
private
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
private readonly lineMap;
|
|
20
|
+
private readonly pointToIndex;
|
|
21
|
+
private readonly indexToPoint;
|
|
22
|
+
private nextIndex;
|
|
23
|
+
constructor(lines?: readonly LineSegment[]);
|
|
24
|
+
private buildFromLines;
|
|
25
|
+
/**
|
|
26
|
+
* 获取两点之间的线段(无向)
|
|
27
|
+
*/
|
|
28
|
+
getLine(a: number, b: number): LineSegment | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* 获取或创建点的索引
|
|
31
|
+
*/
|
|
32
|
+
private getOrCreateIndex;
|
|
33
|
+
/**
|
|
34
|
+
* 安全获取点索引(已存在才返回)
|
|
35
|
+
*/
|
|
36
|
+
getIndex(point: Point): number | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* @param index
|
|
39
|
+
* @returns
|
|
40
|
+
*/
|
|
41
|
+
getPoint(index: number): Point | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* 获取所有点(只读数组,懒计算或缓存可进一步优化)
|
|
44
|
+
*/
|
|
45
|
+
get points(): readonly Point[];
|
|
46
|
+
/**
|
|
47
|
+
* 获取所有线段
|
|
48
|
+
*/
|
|
49
|
+
get lines(): readonly LineSegment[];
|
|
50
|
+
/**
|
|
51
|
+
* 批量添加线段(比逐条 addLine 更快)
|
|
52
|
+
*/
|
|
53
|
+
addLines(lines: readonly LineSegment[]): this;
|
|
54
|
+
/**
|
|
55
|
+
* 清空图
|
|
56
|
+
*/
|
|
57
|
+
clear(): void;
|
|
28
58
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export * from './Box2';
|
|
2
|
+
export * from './LineIndexGenerator';
|
|
3
|
+
export * from './LineSegment';
|
|
4
|
+
export * from './Lines';
|
|
5
|
+
export * from './Map';
|
|
6
|
+
export * from './Point';
|
|
7
|
+
export * from './Polygon';
|
|
8
|
+
export * from './Quadtree';
|
|
9
|
+
export * from './Rectangle';
|
|
10
|
+
export * from './UndirectedGraph';
|
|
11
|
+
export * from './UnionFindSet';
|
|
12
|
+
export * from './cloneUserData';
|
|
13
|
+
export * from './selectLocalFile';
|
|
14
|
+
export * from './PointVirtualGrid';
|
|
15
|
+
export * as dxfSystem from './DxfSystem';
|
|
16
|
+
export * as commandManager from './CommandManager';
|
|
17
|
+
export * as componentManager from './ComponentManager';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { LineSegment } from '../../LineSegment';
|
|
2
|
-
import { Point } from '../../Point';
|
|
3
|
-
import { OriginalDataItem } from '../type';
|
|
4
|
-
export declare class BoundExt {
|
|
5
|
-
/** 通过轨迹点查找外墙
|
|
6
|
-
* @param lines
|
|
7
|
-
* @param trajectoryPoints
|
|
8
|
-
* @returns
|
|
9
|
-
*/
|
|
10
|
-
static findExtWallByTraj(lines: LineSegment[], trajectoryPoints: Point[], minWidth?: number): LineSegment<Record<string, any>>[];
|
|
11
|
-
/** 通过轨迹点外扩边线
|
|
12
|
-
* @param lines
|
|
13
|
-
* @param trajectoryPoints
|
|
14
|
-
*/
|
|
15
|
-
static boundExtbyTraj(data: OriginalDataItem[], trajectory: any, wallWidth?: number, findCallBack?: (lines: LineSegment[], trajectory: Point[]) => void): OriginalDataItem[];
|
|
16
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { LineSegment } from '../../LineSegment';
|
|
2
|
-
import { Point } from '../../Point';
|
|
3
|
-
export declare class TrajectoryHelper {
|
|
4
|
-
mainAxis: LineSegment;
|
|
5
|
-
verticalAxis: LineSegment;
|
|
6
|
-
verticalAxisValue: {
|
|
7
|
-
value: number;
|
|
8
|
-
target: LineSegment | Point;
|
|
9
|
-
}[];
|
|
10
|
-
mainAxisValue: {
|
|
11
|
-
value: number;
|
|
12
|
-
target: LineSegment | Point;
|
|
13
|
-
}[];
|
|
14
|
-
constructor(points: Point[], lines: LineSegment[]);
|
|
15
|
-
/** 添加到主轴
|
|
16
|
-
* @param trajectoryPoints
|
|
17
|
-
*/
|
|
18
|
-
private addMainAxis;
|
|
19
|
-
/** 添加到垂直轴
|
|
20
|
-
* @param trajectoryPoints
|
|
21
|
-
*/
|
|
22
|
-
private addVerticalAxis;
|
|
23
|
-
/** 排序投影
|
|
24
|
-
*/
|
|
25
|
-
private sortProjections;
|
|
26
|
-
/** 查找
|
|
27
|
-
*/
|
|
28
|
-
find(): void;
|
|
29
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
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[]): 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
|
-
};
|