build-dxf 0.1.6 → 0.1.7
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 +2 -2
- package/src/build.js +951 -1392
- package/src/index.css +42 -0
- package/src/pages/DxfPreview.vue.d.ts +9 -0
- package/src/pages/ImagePreview.vue.d.ts +9 -0
- package/src/pages/Setting.vue.d.ts +6 -0
- package/src/utils/DxfSystem/components/Dxf.d.ts +1 -2
- package/src/utils/DxfSystem/utils/AxisAlignCorr02.d.ts +8 -0
- package/src/utils/DxfSystem/utils/index.d.ts +0 -1
- package/src/utils/LineSegment.d.ts +20 -5
- package/src/utils/modelScenario/SceneAutoGenerat.d.ts +7 -16
- package/src/utils/modelScenario/scenario.d.ts +1 -1
package/src/index.css
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
@layer properties {
|
|
3
3
|
@supports (((-webkit-hyphens: none)) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {
|
|
4
4
|
*, :before, :after, ::backdrop {
|
|
5
|
+
--tw-rotate-x: initial;
|
|
6
|
+
--tw-rotate-y: initial;
|
|
7
|
+
--tw-rotate-z: initial;
|
|
8
|
+
--tw-skew-x: initial;
|
|
9
|
+
--tw-skew-y: initial;
|
|
5
10
|
--tw-border-style: solid;
|
|
6
11
|
--tw-leading: initial;
|
|
7
12
|
--tw-font-weight: initial;
|
|
@@ -188,6 +193,10 @@
|
|
|
188
193
|
margin-left: 1.4em;
|
|
189
194
|
}
|
|
190
195
|
|
|
196
|
+
.ml-\[5px\] {
|
|
197
|
+
margin-left: 5px;
|
|
198
|
+
}
|
|
199
|
+
|
|
191
200
|
.ml-\[10px\] {
|
|
192
201
|
margin-left: 10px;
|
|
193
202
|
}
|
|
@@ -288,10 +297,18 @@
|
|
|
288
297
|
min-width: 150px;
|
|
289
298
|
}
|
|
290
299
|
|
|
300
|
+
.flex-shrink {
|
|
301
|
+
flex-shrink: 1;
|
|
302
|
+
}
|
|
303
|
+
|
|
291
304
|
.rotate-90 {
|
|
292
305
|
rotate: 90deg;
|
|
293
306
|
}
|
|
294
307
|
|
|
308
|
+
.transform {
|
|
309
|
+
transform: var(--tw-rotate-x, ) var(--tw-rotate-y, ) var(--tw-rotate-z, ) var(--tw-skew-x, ) var(--tw-skew-y, );
|
|
310
|
+
}
|
|
311
|
+
|
|
295
312
|
.\!cursor-no-drop {
|
|
296
313
|
cursor: no-drop !important;
|
|
297
314
|
}
|
|
@@ -603,6 +620,31 @@
|
|
|
603
620
|
scale: .8;
|
|
604
621
|
}
|
|
605
622
|
|
|
623
|
+
@property --tw-rotate-x {
|
|
624
|
+
syntax: "*";
|
|
625
|
+
inherits: false
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
@property --tw-rotate-y {
|
|
629
|
+
syntax: "*";
|
|
630
|
+
inherits: false
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
@property --tw-rotate-z {
|
|
634
|
+
syntax: "*";
|
|
635
|
+
inherits: false
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
@property --tw-skew-x {
|
|
639
|
+
syntax: "*";
|
|
640
|
+
inherits: false
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
@property --tw-skew-y {
|
|
644
|
+
syntax: "*";
|
|
645
|
+
inherits: false
|
|
646
|
+
}
|
|
647
|
+
|
|
606
648
|
@property --tw-border-style {
|
|
607
649
|
syntax: "*";
|
|
608
650
|
inherits: false;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {
|
|
2
|
+
src: string;
|
|
3
|
+
$props: {
|
|
4
|
+
readonly src?: string | undefined;
|
|
5
|
+
};
|
|
6
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
7
|
+
container: HTMLDivElement;
|
|
8
|
+
}, HTMLDivElement>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {
|
|
2
|
+
src?: string | undefined;
|
|
3
|
+
$props: {
|
|
4
|
+
readonly src?: string | undefined;
|
|
5
|
+
};
|
|
6
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
7
|
+
imageRef: HTMLImageElement;
|
|
8
|
+
}, HTMLDivElement>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TabPageEventPanel } from 'split-window';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
eventPanel: TabPageEventPanel;
|
|
4
|
+
};
|
|
5
|
+
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, {}, HTMLDivElement>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LineSegment } from '../../LineSegment';
|
|
2
|
+
import { SetDataOption, LineUserData } from '../type';
|
|
3
|
+
/**
|
|
4
|
+
* 轴对齐垂直纠正类
|
|
5
|
+
*/
|
|
6
|
+
export declare class AxisAlignCorr {
|
|
7
|
+
static correction(lines: LineSegment<LineUserData>[], targettLine: LineSegment<LineUserData>, option?: SetDataOption): LineSegment<LineUserData>[];
|
|
8
|
+
}
|
|
@@ -6,7 +6,6 @@ export * from './DoubleWallHelper';
|
|
|
6
6
|
export * from './clippingDoubleWall';
|
|
7
7
|
export * from './clippingLineUserData';
|
|
8
8
|
export * from './closedPathArea';
|
|
9
|
-
export * from './tools';
|
|
10
9
|
export * from './findLargestCircle';
|
|
11
10
|
export * from './findDiscretePointLine';
|
|
12
11
|
export * from './findVerticalReference';
|
|
@@ -200,7 +200,7 @@ export declare class LineSegment<T = Record<string, any>> {
|
|
|
200
200
|
/** 克隆
|
|
201
201
|
* @returns
|
|
202
202
|
*/
|
|
203
|
-
clone(): LineSegment<T>;
|
|
203
|
+
clone(userData?: boolean): LineSegment<T>;
|
|
204
204
|
/**
|
|
205
205
|
* 获取最长线段
|
|
206
206
|
* @param lines
|
|
@@ -221,20 +221,35 @@ export declare class LineSegment<T = Record<string, any>> {
|
|
|
221
221
|
* @returns
|
|
222
222
|
*/
|
|
223
223
|
static groupByPath(lines: LineSegment[]): LineSegment<Record<string, any>>[][];
|
|
224
|
-
/**
|
|
224
|
+
/** 分组,通过点
|
|
225
225
|
* @param lines
|
|
226
226
|
* @returns
|
|
227
227
|
*/
|
|
228
|
-
static
|
|
229
|
-
/**
|
|
228
|
+
static groupByPoint(lines: LineSegment[]): LineSegment<Record<string, any>>[][];
|
|
229
|
+
/** 通过最大叶子路径,给线段分组,每条路径没有分叉
|
|
230
230
|
* @param lines
|
|
231
231
|
* @returns
|
|
232
232
|
*/
|
|
233
|
-
static
|
|
233
|
+
static groupByLeafPath(lines: LineSegment[]): LineSegment<Record<string, any>>[][];
|
|
234
234
|
/** 分组,通过方向
|
|
235
235
|
* @param lines
|
|
236
236
|
*/
|
|
237
237
|
static groupByDirection(lines: LineSegment[], errAngle?: number): LineSegment<Record<string, any>>[][];
|
|
238
|
+
/** 通过轴,对线段进行分组
|
|
239
|
+
* @param lines
|
|
240
|
+
* @param axisLine
|
|
241
|
+
* @param errAngle
|
|
242
|
+
* @returns
|
|
243
|
+
*/
|
|
244
|
+
static groupByAxis(lines: LineSegment[], axisLine: LineSegment, errAngle?: number): LineSegment<Record<string, any>>[][];
|
|
245
|
+
/** 交叉轴分组
|
|
246
|
+
* @description 通过交叉轴分组, 前提是使用groupByAxis对线段进行过轴分组,确保所有线段近乎平行
|
|
247
|
+
* @param lines 需要分组的线段集合
|
|
248
|
+
* @param crossAxis 交叉轴线段
|
|
249
|
+
* @param distanceThreshold 交叉轴阈值
|
|
250
|
+
* @returns
|
|
251
|
+
*/
|
|
252
|
+
static groupByCrossAxis(lines: LineSegment[], crossAxis: LineSegment, distanceThreshold: number): LineSegment<Record<string, any>>[][];
|
|
238
253
|
/** 合并线段到最长线段
|
|
239
254
|
* @param lines
|
|
240
255
|
* @returns
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { Group } from 'three';
|
|
2
2
|
import { LineSegment } from '../LineSegment';
|
|
3
|
-
import { Polygon } from '../Polygon';
|
|
4
|
-
import { Octree } from 'three/examples/jsm/math/Octree.js';
|
|
5
3
|
import * as THREE from "three";
|
|
6
4
|
export declare class SceneAutoGenerat {
|
|
7
5
|
lines: LineSegment[];
|
|
@@ -12,29 +10,22 @@ export declare class SceneAutoGenerat {
|
|
|
12
10
|
angle: number;
|
|
13
11
|
constructor(lines: LineSegment[], itemList: any[], z: number, trajectory?: any);
|
|
14
12
|
init(): Promise<void>;
|
|
15
|
-
/**
|
|
16
|
-
* 获取包围矩形
|
|
17
|
-
*/
|
|
18
|
-
getSurroundRect(path: any[], angle?: number): Polygon<Record<string, any>>;
|
|
19
|
-
/** 构建平面
|
|
20
|
-
*/
|
|
21
|
-
buildPlane(): void;
|
|
22
13
|
wallGroup: Group | null;
|
|
23
14
|
/** 构建墙壁
|
|
24
15
|
*/
|
|
25
16
|
buildWall(): Promise<void>;
|
|
26
|
-
/** 吸附
|
|
27
|
-
* @param walls
|
|
28
|
-
* @param group
|
|
29
|
-
* @param proximityThreshold
|
|
30
|
-
*/
|
|
31
|
-
adsorption(octree: Octree, rectangle: Polygon, height: number, proximityThreshold?: number): void;
|
|
32
17
|
/** 获取模型
|
|
33
18
|
* @param item
|
|
34
19
|
* @param walls
|
|
35
20
|
*/
|
|
36
|
-
getModel(item: any
|
|
21
|
+
getModel(item: any): Promise<void>;
|
|
37
22
|
/** 构建物品模型
|
|
38
23
|
*/
|
|
39
24
|
buildItem(): Promise<void>;
|
|
25
|
+
static itemParse(item: any, z: number): {
|
|
26
|
+
box: THREE.LineSegments<THREE.EdgesGeometry<THREE.ExtrudeGeometry>, THREE.LineBasicMaterial, THREE.Object3DEventMap>;
|
|
27
|
+
center: THREE.Vector3;
|
|
28
|
+
category: any;
|
|
29
|
+
angle: number;
|
|
30
|
+
};
|
|
40
31
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
|
|
2
2
|
import { LineSegment } from '../LineSegment';
|
|
3
|
-
import { Point } from '..';
|
|
4
3
|
import { LineUserData } from '../DxfSystem/type';
|
|
5
4
|
import { Brush } from 'three-bvh-csg';
|
|
5
|
+
import { Point } from '../Point';
|
|
6
6
|
import * as THREE from 'three';
|
|
7
7
|
export declare const DEFAULT_WALL_HALF_WIDTH: number;
|
|
8
8
|
export default class Scenario {
|