build-dxf 0.1.19 → 0.1.21
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 +20 -2
- package/src/index.css +23 -1
- package/src/index3.js +1427 -374
- package/src/utils/CommandManager/CommandFlow.d.ts +4 -1
- package/src/utils/CommandManager/CommandManager.d.ts +5 -0
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/CommandFlowComponent.d.ts +1 -0
- package/src/utils/DxfSystem/plugin/Editor/pages/EditorTool.vue.d.ts +1 -1
- package/src/utils/DxfSystem/utils/BoundExt.d.ts +4 -0
- package/src/utils/DxfSystem/utils/SceneAutoGenerat.d.ts +1 -0
- package/src/utils/PointCloud.d.ts +83 -0
- package/src/utils/PointCloudCode.d.ts +7 -0
- package/src/utils/download.d.ts +1 -0
- package/src/utils/CloudPoint.d.ts +0 -1
- package/src/utils/GpuComputed.d.ts +0 -48
|
@@ -18,17 +18,19 @@ export declare class CommandFlow extends EventDispatcher<{
|
|
|
18
18
|
finally: {};
|
|
19
19
|
}> {
|
|
20
20
|
list: CommandFlowCallBack[];
|
|
21
|
+
dataList: Record<string, any>[];
|
|
21
22
|
rollbacklist: ((data?: any) => void)[];
|
|
22
23
|
revokeRollbacklist: ((data?: any) => void)[];
|
|
23
24
|
writeOperationList: boolean;
|
|
24
25
|
loop: boolean;
|
|
26
|
+
currentIndex: number;
|
|
25
27
|
setLoop(loop: boolean): this;
|
|
26
28
|
/**
|
|
27
29
|
*
|
|
28
30
|
* @param operation
|
|
29
31
|
* @returns
|
|
30
32
|
*/
|
|
31
|
-
add(operation: CommandFlowCallBack): this;
|
|
33
|
+
add(operation: CommandFlowCallBack, data?: Record<string, any>): this;
|
|
32
34
|
/** 添加回滚回调列表
|
|
33
35
|
* @param callBack
|
|
34
36
|
*/
|
|
@@ -38,5 +40,6 @@ export declare class CommandFlow extends EventDispatcher<{
|
|
|
38
40
|
* @returns
|
|
39
41
|
*/
|
|
40
42
|
addRevokeRollback(callBack: (data?: any) => void): this;
|
|
43
|
+
getData(index: number): Record<string, any>;
|
|
41
44
|
}
|
|
42
45
|
export {};
|
|
@@ -61,6 +61,11 @@ export declare class CommandManager extends EventDispatcher<{
|
|
|
61
61
|
* @returns
|
|
62
62
|
*/
|
|
63
63
|
addCommandFlow(name: string): CommandFlow;
|
|
64
|
+
/** 获取命令流
|
|
65
|
+
* @param name
|
|
66
|
+
* @returns
|
|
67
|
+
*/
|
|
68
|
+
getCommandFlow(name: string): CommandFlow | undefined;
|
|
64
69
|
private executionPromise;
|
|
65
70
|
private executionResolve;
|
|
66
71
|
/** 执行控制流
|
|
@@ -6,5 +6,5 @@ type __VLS_Props = {
|
|
|
6
6
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
7
7
|
elRef: HTMLDivElement;
|
|
8
8
|
toolBarRef: HTMLDivElement;
|
|
9
|
-
},
|
|
9
|
+
}, any>;
|
|
10
10
|
export default _default;
|
|
@@ -15,6 +15,10 @@ interface IByTrajAnOriginData {
|
|
|
15
15
|
updateDoubleWallGroup?: boolean;
|
|
16
16
|
findCallBack?: (lines: LineSegment[], trajectory: Point[]) => void;
|
|
17
17
|
}
|
|
18
|
+
/** 执行纠正更加全面
|
|
19
|
+
* @param line
|
|
20
|
+
* @param grid
|
|
21
|
+
*/
|
|
18
22
|
export declare class BoundExt {
|
|
19
23
|
/** 通过轨迹点查找外墙
|
|
20
24
|
* @param lines
|
|
@@ -25,6 +25,7 @@ export declare class SceneAutoGenerat {
|
|
|
25
25
|
*/
|
|
26
26
|
buildItem(): Promise<void>;
|
|
27
27
|
static itemParse(item: any): {
|
|
28
|
+
geometry: THREE.ExtrudeGeometry;
|
|
28
29
|
box: THREE.LineSegments<THREE.EdgesGeometry<THREE.ExtrudeGeometry>, THREE.LineBasicMaterial, THREE.Object3DEventMap>;
|
|
29
30
|
center: THREE.Vector3;
|
|
30
31
|
category: any;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { Octant, PointData } from 'sparse-octree';
|
|
2
|
+
import { OBB } from 'three/addons/math/OBB.js';
|
|
3
|
+
import * as THREE from 'three';
|
|
4
|
+
/** 查询点是否在obb内,通过gpu计算
|
|
5
|
+
* @param points
|
|
6
|
+
* @param obbs
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare function pointInOBBByGpu(points: THREE.Vector3[], obbs: OBBBox[]): Promise<number[]>;
|
|
10
|
+
export declare class OBBBox extends OBB {
|
|
11
|
+
getBoxMesh(): THREE.Mesh<THREE.BoxGeometry, THREE.Material | THREE.Material[], THREE.Object3DEventMap>;
|
|
12
|
+
getBoxEdge(color?: number): THREE.LineSegments<THREE.EdgesGeometry<THREE.BoxGeometry>, THREE.LineBasicMaterial, THREE.Object3DEventMap>;
|
|
13
|
+
toJson(): {
|
|
14
|
+
size: THREE.Vector3Tuple;
|
|
15
|
+
center: THREE.Vector3Tuple;
|
|
16
|
+
quaternion: THREE.QuaternionTuple;
|
|
17
|
+
};
|
|
18
|
+
static fromByBox(box: THREE.Vector3, position: THREE.Vector3, rotation: THREE.Euler | THREE.Quaternion, obb?: OBBBox): OBBBox;
|
|
19
|
+
static fromByPath2D(path: {
|
|
20
|
+
x: number;
|
|
21
|
+
y: number;
|
|
22
|
+
}[], origin: THREE.Vector3, height: number, obb_?: OBBBox): OBBBox;
|
|
23
|
+
}
|
|
24
|
+
export declare class PCSparseOctree<T> {
|
|
25
|
+
private octree;
|
|
26
|
+
bound: THREE.Box3;
|
|
27
|
+
constructor(bound: THREE.Box3);
|
|
28
|
+
/** 插入点 + 数据
|
|
29
|
+
* @param point
|
|
30
|
+
* @param data
|
|
31
|
+
*/
|
|
32
|
+
insert(point: THREE.Vector3, data: T): void;
|
|
33
|
+
/** 批量插入(推荐大批量时用)
|
|
34
|
+
* @param points
|
|
35
|
+
* @param datas
|
|
36
|
+
*/
|
|
37
|
+
insertBatch(points: THREE.Vector3[], datas: T[]): void;
|
|
38
|
+
/** 查找所有在 oBB 内的盒子
|
|
39
|
+
* @param queryOBB
|
|
40
|
+
* @returns
|
|
41
|
+
*/
|
|
42
|
+
findNodeInOBB(queryOBB: OBB): Octant<PointData<T>>[];
|
|
43
|
+
/** 查找所有在 oBB 内的点(带数据)
|
|
44
|
+
* @param queryOBB
|
|
45
|
+
* @returns
|
|
46
|
+
*/
|
|
47
|
+
findPointsInOBB(queryOBB: OBB): Array<{
|
|
48
|
+
point: THREE.Vector3;
|
|
49
|
+
data: T;
|
|
50
|
+
}>;
|
|
51
|
+
/** 通过半径查找
|
|
52
|
+
* @param position
|
|
53
|
+
* @param radius
|
|
54
|
+
* @param skipSelf
|
|
55
|
+
* @returns
|
|
56
|
+
*/
|
|
57
|
+
findPointsByCircle(position: THREE.Vector3, radius: number, skipSelf?: boolean): import('sparse-octree').PointContainer<T>[];
|
|
58
|
+
/** 查找最近的点
|
|
59
|
+
* @param position
|
|
60
|
+
* @param maxDistance
|
|
61
|
+
* @param skipSelf
|
|
62
|
+
* @returns
|
|
63
|
+
*/
|
|
64
|
+
findNearestPoint(position: THREE.Vector3, maxDistance: number, skipSelf?: boolean): import('sparse-octree').PointContainer<T> | null;
|
|
65
|
+
/** 批量查询
|
|
66
|
+
* @param obbList
|
|
67
|
+
* @returns
|
|
68
|
+
*/
|
|
69
|
+
findPointsInOBBBatch(obbList: OBBBox[]): {
|
|
70
|
+
point: THREE.Vector3;
|
|
71
|
+
data: T;
|
|
72
|
+
}[][];
|
|
73
|
+
/**
|
|
74
|
+
* @param obbList
|
|
75
|
+
*/
|
|
76
|
+
findPointsByGpu(obbList: OBBBox[]): Promise<{
|
|
77
|
+
point: THREE.Vector3;
|
|
78
|
+
data: T;
|
|
79
|
+
}[][]>;
|
|
80
|
+
static fromPoints(points: THREE.Vector3[]): PCSparseOctree<{
|
|
81
|
+
index: number;
|
|
82
|
+
}>;
|
|
83
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
export declare function encode(points: THREE.Vector3[], colors: number[]): ArrayBuffer;
|
|
3
|
+
export declare function decode(buffer: ArrayBuffer | Blob): Promise<{
|
|
4
|
+
points: Float32Array;
|
|
5
|
+
colors: Float32Array;
|
|
6
|
+
pointCount: number;
|
|
7
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function download(path: string, file: any): Promise<void>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
type ValueType = "f32" | "vec2" | "vec3" | "vec4" | "mat3x3" | "mat4x4";
|
|
2
|
-
type OptionType = {
|
|
3
|
-
workgroup_size?: [number, number, number];
|
|
4
|
-
workgroupCount: [number, number?, number?];
|
|
5
|
-
globalInvocationIdName?: string;
|
|
6
|
-
workgroupIndexName?: string;
|
|
7
|
-
synchronize?: string[];
|
|
8
|
-
};
|
|
9
|
-
type BufferType = {
|
|
10
|
-
buffer: number[];
|
|
11
|
-
stride: number;
|
|
12
|
-
layout: {
|
|
13
|
-
name: string;
|
|
14
|
-
type: ValueType;
|
|
15
|
-
offset: number;
|
|
16
|
-
size: number;
|
|
17
|
-
}[];
|
|
18
|
-
count: number;
|
|
19
|
-
};
|
|
20
|
-
export declare class GpuComputed {
|
|
21
|
-
constructor();
|
|
22
|
-
getDevice(): Promise<{
|
|
23
|
-
adapter: GPUAdapter | null;
|
|
24
|
-
device: GPUDevice;
|
|
25
|
-
}>;
|
|
26
|
-
createPipleline(code: string, buffers: Record<string, BufferType>): Promise<{
|
|
27
|
-
pipeline: GPUComputePipeline;
|
|
28
|
-
group: GPUBindGroup;
|
|
29
|
-
device: GPUDevice;
|
|
30
|
-
bufferInfoList: {
|
|
31
|
-
name: string;
|
|
32
|
-
buffer: GPUBuffer;
|
|
33
|
-
float32Array: Float32Array<ArrayBuffer>;
|
|
34
|
-
groupLayoutItem: GPUBindGroupLayoutEntry;
|
|
35
|
-
groupItem: {
|
|
36
|
-
binding: number;
|
|
37
|
-
resource: {
|
|
38
|
-
buffer: GPUBuffer;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
}[];
|
|
42
|
-
}>;
|
|
43
|
-
private buildBuffer;
|
|
44
|
-
capitalize(str: string): string;
|
|
45
|
-
private buildCode;
|
|
46
|
-
computed(code: string, data: Record<string, any[]>, option: OptionType): Promise<number[][]>;
|
|
47
|
-
}
|
|
48
|
-
export {};
|