build-dxf 0.1.27 → 0.1.29
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 +47 -19
- package/src/components/DragContainer.vue.d.ts +4 -0
- package/src/index.css +24 -2
- package/src/index.js +10 -10
- package/src/index3.js +1584 -578
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/CommandFlowComponent.d.ts +32 -7
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/DrawLine.d.ts +1 -4
- package/src/utils/DxfSystem/plugin/Editor/components/RenderManager.d.ts +18 -0
- package/src/utils/DxfSystem/plugin/Editor/pages/EditorTool/EditorTool.vue.d.ts +7 -0
- package/src/utils/DxfSystem/plugin/Editor/pages/{EditorTool.vue.d.ts → EditorTool/EditorToolContent.vue.d.ts} +1 -1
- package/src/utils/DxfSystem/utils/Lines.d.ts +10 -1
- package/src/utils/isMobile.d.ts +1 -0
package/package.json
CHANGED
package/src/build.js
CHANGED
|
@@ -5081,7 +5081,10 @@ function shortDistanceLink(lines, radius = 0.1) {
|
|
|
5081
5081
|
if (line.userData.isDoor) continue;
|
|
5082
5082
|
line.points.forEach((point2) => {
|
|
5083
5083
|
if (visited.has(point2)) return false;
|
|
5084
|
-
const list = pointVirtualGrid.queryCircle(point2, radius, true).map((item) => Object.assign({}, item)).
|
|
5084
|
+
const list = pointVirtualGrid.queryCircle(point2, radius, true).map((item) => Object.assign({}, item)).filter((item) => {
|
|
5085
|
+
const targetLine2 = item.userData, targetPoint2 = item.point, direct1 = line.getAnotherPoint(point2).direction(point2), direct2 = targetLine2.getAnotherPoint(targetPoint2).direction(targetPoint2), angle = direct1.angleBetween(direct2, "angle");
|
|
5086
|
+
return angle > 90;
|
|
5087
|
+
}).sort((a2, b4) => getWeight2(b4, point2, line) - getWeight2(a2, point2, line));
|
|
5085
5088
|
if (list.length === 0) return;
|
|
5086
5089
|
const { point: targetPoint } = list[0];
|
|
5087
5090
|
const targetLine = list[0].userData;
|
|
@@ -5984,7 +5987,7 @@ class Scenario {
|
|
|
5984
5987
|
this.closedArray = lines.filter((item) => {
|
|
5985
5988
|
return LineGroupType.hasType(item, "doubleWall");
|
|
5986
5989
|
});
|
|
5987
|
-
let groups =
|
|
5990
|
+
let groups = LineGroupType.getGroupsByType(this.closedArray, "doubleWall");
|
|
5988
5991
|
const set2 = new Set(this.closedArray);
|
|
5989
5992
|
let singleLineWall = lines.filter((line) => !set2.has(line) && !line.userData.isDoor && !line.userData.isBayWindow);
|
|
5990
5993
|
let menList = lines.filter((line) => line.userData.isDoor);
|
|
@@ -14373,7 +14376,6 @@ class SceneAutoGenerat {
|
|
|
14373
14376
|
this.angle = -vrLine.direction().angleBetween(new Point(0, 1), "angle", "360") * (Math.PI / 180);
|
|
14374
14377
|
}
|
|
14375
14378
|
async init() {
|
|
14376
|
-
await this.buildPlane(this.lines);
|
|
14377
14379
|
await this.buildWall();
|
|
14378
14380
|
globalScenario.scene.add(this.scene);
|
|
14379
14381
|
globalScenario.scene.traverse((child) => {
|
|
@@ -14617,8 +14619,8 @@ class DoorFind {
|
|
|
14617
14619
|
dock = { dockLine: endList[0].userData, dockPoint: endList[0].point, point: line.end, pointType: "end" };
|
|
14618
14620
|
}
|
|
14619
14621
|
const point2 = this.adsorpt(dock, line);
|
|
14620
|
-
line.userData.doorDirectConnection = true;
|
|
14621
14622
|
if (point2) {
|
|
14623
|
+
line.userData.doorDirectConnection = true;
|
|
14622
14624
|
line.userData.doorAutomaticFind = true;
|
|
14623
14625
|
line.getAnotherPoint(dock.point).copy(point2);
|
|
14624
14626
|
}
|
|
@@ -14834,7 +14836,7 @@ class BoundExt2 {
|
|
|
14834
14836
|
* @returns
|
|
14835
14837
|
*/
|
|
14836
14838
|
static boundExtbyTraj(opt) {
|
|
14837
|
-
let { lines, trajectory, wallWidth = 0.12, updateDoubleWallGroup =
|
|
14839
|
+
let { lines, trajectory, wallWidth = 0.12, updateDoubleWallGroup = true, findCallBack } = opt;
|
|
14838
14840
|
if (updateDoubleWallGroup) lines = DoubleWallHelper.buildGroup(lines);
|
|
14839
14841
|
const trajectoryPoints = Object.keys(trajectory).map((key) => Point.from(trajectory[key]));
|
|
14840
14842
|
const findLines = BoundExt2.findExtWallByTraj(lines, trajectoryPoints);
|
|
@@ -15446,6 +15448,7 @@ class WhiteModel extends Component {
|
|
|
15446
15448
|
const lines = dxfSystem.CorrectionDxf.getLineSegments(true);
|
|
15447
15449
|
const sceneAutoGenerat = new SceneAutoGenerat(lines, this.itemList, dxfSystem.Dxf.originalZAverage, dxfSystem.Dxf.options.trajectory);
|
|
15448
15450
|
await sceneAutoGenerat.init();
|
|
15451
|
+
sceneAutoGenerat.buildPlane(dxfSystem.Dxf.getLineSegments());
|
|
15449
15452
|
const group2 = sceneAutoGenerat.scene;
|
|
15450
15453
|
if (group2) {
|
|
15451
15454
|
this.whiteModelLineGroup.add(group2.clone(true));
|
|
@@ -15643,7 +15646,29 @@ class Lines extends THREE.LineSegments {
|
|
|
15643
15646
|
const position = new THREE.BufferAttribute(new Float32Array(array), 3);
|
|
15644
15647
|
this.geometry.setAttribute("position", position);
|
|
15645
15648
|
this._timer = null;
|
|
15649
|
+
this.dispatchEvent({ type: "updateGeometry" });
|
|
15650
|
+
});
|
|
15651
|
+
}
|
|
15652
|
+
}
|
|
15653
|
+
class LineDashed extends Lines {
|
|
15654
|
+
constructor(points, color, dashSize = 0.02, gapSize = 0.02) {
|
|
15655
|
+
super(points, color);
|
|
15656
|
+
this.material = new THREE.LineDashedMaterial({
|
|
15657
|
+
color,
|
|
15658
|
+
dashSize,
|
|
15659
|
+
gapSize
|
|
15646
15660
|
});
|
|
15661
|
+
this.addEventListener("updateGeometry", () => {
|
|
15662
|
+
this.computeLineDistances();
|
|
15663
|
+
});
|
|
15664
|
+
}
|
|
15665
|
+
setDashSize(dashSize) {
|
|
15666
|
+
this.material.dashSize = dashSize;
|
|
15667
|
+
this.computeLineDistances();
|
|
15668
|
+
}
|
|
15669
|
+
setGapSize(gapSize) {
|
|
15670
|
+
this.material.gapSize = gapSize;
|
|
15671
|
+
this.computeLineDistances();
|
|
15647
15672
|
}
|
|
15648
15673
|
}
|
|
15649
15674
|
function selectLocalFileFun() {
|
|
@@ -18864,6 +18889,7 @@ const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
|
|
|
18864
18889
|
DxfSystem,
|
|
18865
18890
|
EventDispatcher,
|
|
18866
18891
|
GltfInit,
|
|
18892
|
+
LineDashed,
|
|
18867
18893
|
LineGroupType,
|
|
18868
18894
|
LineIndexGenerator,
|
|
18869
18895
|
LineSegment,
|
|
@@ -19079,7 +19105,7 @@ export {
|
|
|
19079
19105
|
Component as C,
|
|
19080
19106
|
Dxf as D,
|
|
19081
19107
|
HeightQuery as H,
|
|
19082
|
-
|
|
19108
|
+
LineDashed as L,
|
|
19083
19109
|
PointVirtualGrid as P,
|
|
19084
19110
|
Quadtree as Q,
|
|
19085
19111
|
SelectLocalFile as S,
|
|
@@ -19087,20 +19113,22 @@ export {
|
|
|
19087
19113
|
Variable as V,
|
|
19088
19114
|
WhiteModel as W,
|
|
19089
19115
|
Point as a,
|
|
19090
|
-
|
|
19116
|
+
LineSegment as b,
|
|
19091
19117
|
cloneUserData as c,
|
|
19092
|
-
|
|
19093
|
-
|
|
19094
|
-
|
|
19095
|
-
|
|
19096
|
-
|
|
19097
|
-
|
|
19098
|
-
|
|
19099
|
-
|
|
19100
|
-
|
|
19101
|
-
|
|
19102
|
-
|
|
19103
|
-
|
|
19118
|
+
Lines as d,
|
|
19119
|
+
drawText$1 as e,
|
|
19120
|
+
PRE_PROCESSOR as f,
|
|
19121
|
+
getDefaultExportFromCjs as g,
|
|
19122
|
+
CommandManager as h,
|
|
19123
|
+
createEditor as i,
|
|
19124
|
+
getModels as j,
|
|
19125
|
+
buildJson as k,
|
|
19126
|
+
getFileAll as l,
|
|
19127
|
+
getGlobalDxfSystem as m,
|
|
19128
|
+
index$1 as n,
|
|
19129
|
+
index as o,
|
|
19130
|
+
DxfSystem as p,
|
|
19131
|
+
components as q,
|
|
19104
19132
|
recomputedWindow as r,
|
|
19105
19133
|
uuid as u
|
|
19106
19134
|
};
|
|
@@ -8,9 +8,11 @@ type __VLS_Props = {
|
|
|
8
8
|
};
|
|
9
9
|
declare const __VLS_defaults: {
|
|
10
10
|
showContent: boolean;
|
|
11
|
+
showTitle: boolean;
|
|
11
12
|
};
|
|
12
13
|
type __VLS_PublicProps = {
|
|
13
14
|
"showContent"?: typeof __VLS_defaults['showContent'];
|
|
15
|
+
"showTitle"?: typeof __VLS_defaults['showTitle'];
|
|
14
16
|
} & __VLS_Props;
|
|
15
17
|
declare function __VLS_template(): {
|
|
16
18
|
attrs: Partial<{}>;
|
|
@@ -28,9 +30,11 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
|
28
30
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
29
31
|
clickIcon: (...args: any[]) => void;
|
|
30
32
|
"update:showContent": (value: boolean) => void;
|
|
33
|
+
"update:showTitle": (value: boolean) => void;
|
|
31
34
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
32
35
|
onClickIcon?: ((...args: any[]) => any) | undefined;
|
|
33
36
|
"onUpdate:showContent"?: ((value: boolean) => any) | undefined;
|
|
37
|
+
"onUpdate:showTitle"?: ((value: boolean) => any) | undefined;
|
|
34
38
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
35
39
|
elRef: HTMLDivElement;
|
|
36
40
|
toolBarRef: HTMLDivElement;
|
package/src/index.css
CHANGED
|
@@ -105,14 +105,26 @@
|
|
|
105
105
|
right: 10px;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
+
.bottom-0 {
|
|
109
|
+
bottom: calc(var(--spacing) * 0);
|
|
110
|
+
}
|
|
111
|
+
|
|
108
112
|
.bottom-\[20px\] {
|
|
109
113
|
bottom: 20px;
|
|
110
114
|
}
|
|
111
115
|
|
|
116
|
+
.bottom-\[calc\(100\%\+5px\)\] {
|
|
117
|
+
bottom: calc(100% + 5px);
|
|
118
|
+
}
|
|
119
|
+
|
|
112
120
|
.left-0 {
|
|
113
121
|
left: calc(var(--spacing) * 0);
|
|
114
122
|
}
|
|
115
123
|
|
|
124
|
+
.left-\[0px\] {
|
|
125
|
+
left: 0;
|
|
126
|
+
}
|
|
127
|
+
|
|
116
128
|
.left-\[20px\] {
|
|
117
129
|
left: 20px;
|
|
118
130
|
}
|
|
@@ -240,6 +252,16 @@
|
|
|
240
252
|
height: 20px;
|
|
241
253
|
}
|
|
242
254
|
|
|
255
|
+
.size-\[28px\] {
|
|
256
|
+
width: 28px;
|
|
257
|
+
height: 28px;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.size-\[30px\] {
|
|
261
|
+
width: 30px;
|
|
262
|
+
height: 30px;
|
|
263
|
+
}
|
|
264
|
+
|
|
243
265
|
.h-\[20px\] {
|
|
244
266
|
height: 20px;
|
|
245
267
|
}
|
|
@@ -475,7 +497,7 @@
|
|
|
475
497
|
}
|
|
476
498
|
}
|
|
477
499
|
|
|
478
|
-
.p-\[0px_5px\] {
|
|
500
|
+
.p-\[0_5px\], .p-\[0px_5px\] {
|
|
479
501
|
padding: 0 5px;
|
|
480
502
|
}
|
|
481
503
|
|
|
@@ -745,7 +767,7 @@
|
|
|
745
767
|
color: #a7a7a7
|
|
746
768
|
}
|
|
747
769
|
|
|
748
|
-
[data-v-
|
|
770
|
+
[data-v-35b58696] {
|
|
749
771
|
font-family: 宋体;
|
|
750
772
|
}
|
|
751
773
|
|
package/src/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import "three";
|
|
2
|
-
import { D,
|
|
2
|
+
import { D, p, n, k, q, i, l, m, j, o } from "./build.js";
|
|
3
3
|
import "clipper-lib";
|
|
4
4
|
export {
|
|
5
5
|
D as Dxf,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
p as DxfSystem,
|
|
7
|
+
n as ModelDataPlugin,
|
|
8
|
+
k as buildJson,
|
|
9
|
+
q as components,
|
|
10
|
+
i as createEditor,
|
|
11
|
+
l as getFileAll,
|
|
12
|
+
m as getGlobalDxfSystem,
|
|
13
|
+
j as getModels,
|
|
14
|
+
o as utils
|
|
15
15
|
};
|