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
package/package.json
CHANGED
package/src/build.js
CHANGED
|
@@ -4289,7 +4289,6 @@ class DxfDrawPlugin {
|
|
|
4289
4289
|
type: ["door"],
|
|
4290
4290
|
handler: ({ group: group2, drawArc, drawLine, setColor }) => {
|
|
4291
4291
|
group2.lines.forEach((lineSegment) => {
|
|
4292
|
-
if (lineSegment.length() < 0.4) return;
|
|
4293
4292
|
const line = lineSegment.clone();
|
|
4294
4293
|
const doorThickness = DEFAULT_WALL_WIDTH * 0.2;
|
|
4295
4294
|
const list = [];
|
|
@@ -5538,6 +5537,7 @@ function modify(reference, cell, opt, appendLines, grid) {
|
|
|
5538
5537
|
if (hasParallel) {
|
|
5539
5538
|
const newLine = createNewLine(cell, reference, opt, appendLines, grid);
|
|
5540
5539
|
if (hasSameDirection) newLine.userData = cloneUserData(cell[opt[1]].userData?.userData ?? {});
|
|
5540
|
+
newLine.userData.rooftopPz = cell[opt[1]]?.userData?.userData.rooftopPz ?? newLine.userData.rooftopPz;
|
|
5541
5541
|
return;
|
|
5542
5542
|
}
|
|
5543
5543
|
if (hasDifferentDirection) {
|
|
@@ -13946,6 +13946,7 @@ class SceneAutoGenerat {
|
|
|
13946
13946
|
const zStart = new THREE.Vector3().copy(rectangle[0].toJson(z)), zEnd = zStart.clone();
|
|
13947
13947
|
zEnd.z += height;
|
|
13948
13948
|
return {
|
|
13949
|
+
geometry,
|
|
13949
13950
|
box: lineSegments,
|
|
13950
13951
|
center,
|
|
13951
13952
|
category: item.category,
|
|
@@ -14471,6 +14472,7 @@ class CorrectionDxf extends Dxf {
|
|
|
14471
14472
|
const lines = parent.Dxf.getLineSegments(true);
|
|
14472
14473
|
this.set(lineDataToOriginalData(lines, parent.Dxf.originalZAverage), {
|
|
14473
14474
|
trajectory: e.options.trajectory,
|
|
14475
|
+
publicInfo: e.options.publicInfo,
|
|
14474
14476
|
onBoundExt: e.options.onBoundExt
|
|
14475
14477
|
});
|
|
14476
14478
|
this.clearPreProcessor();
|
|
@@ -14496,6 +14498,7 @@ class CorrectionDxf extends Dxf {
|
|
|
14496
14498
|
data = res.data;
|
|
14497
14499
|
this.lineSegments = res.lineSegments;
|
|
14498
14500
|
this.originalData = data;
|
|
14501
|
+
this.lineSegments = PRE_PROCESSOR.WallHeightHandle(this.lineSegments, options);
|
|
14499
14502
|
}
|
|
14500
14503
|
const zList = [];
|
|
14501
14504
|
data.forEach(({ start, end }) => zList.push(start.z ?? 0, end.z ?? 0));
|
|
@@ -14997,11 +15000,13 @@ const SelectLocalFile = Object.assign(selectLocalFileFun, {
|
|
|
14997
15000
|
});
|
|
14998
15001
|
class CommandFlow extends EventDispatcher {
|
|
14999
15002
|
list = [];
|
|
15003
|
+
dataList = [];
|
|
15000
15004
|
rollbacklist = [];
|
|
15001
15005
|
revokeRollbacklist = [];
|
|
15002
15006
|
// 是否写入操作记录
|
|
15003
15007
|
writeOperationList = true;
|
|
15004
15008
|
loop = false;
|
|
15009
|
+
currentIndex = 0;
|
|
15005
15010
|
setLoop(loop) {
|
|
15006
15011
|
this.loop = loop;
|
|
15007
15012
|
return this;
|
|
@@ -15011,8 +15016,9 @@ class CommandFlow extends EventDispatcher {
|
|
|
15011
15016
|
* @param operation
|
|
15012
15017
|
* @returns
|
|
15013
15018
|
*/
|
|
15014
|
-
add(operation) {
|
|
15019
|
+
add(operation, data = {}) {
|
|
15015
15020
|
this.list.push(operation);
|
|
15021
|
+
this.dataList.push(data);
|
|
15016
15022
|
return this;
|
|
15017
15023
|
}
|
|
15018
15024
|
/** 添加回滚回调列表
|
|
@@ -15030,6 +15036,9 @@ class CommandFlow extends EventDispatcher {
|
|
|
15030
15036
|
this.revokeRollbacklist.push(callBack);
|
|
15031
15037
|
return this;
|
|
15032
15038
|
}
|
|
15039
|
+
getData(index2) {
|
|
15040
|
+
return this.dataList[index2];
|
|
15041
|
+
}
|
|
15033
15042
|
}
|
|
15034
15043
|
class CommandManager extends EventDispatcher {
|
|
15035
15044
|
commandFlowMap = /* @__PURE__ */ new Map();
|
|
@@ -15063,6 +15072,13 @@ class CommandManager extends EventDispatcher {
|
|
|
15063
15072
|
this.commandFlowMap.set(name, commandFlow);
|
|
15064
15073
|
return commandFlow;
|
|
15065
15074
|
}
|
|
15075
|
+
/** 获取命令流
|
|
15076
|
+
* @param name
|
|
15077
|
+
* @returns
|
|
15078
|
+
*/
|
|
15079
|
+
getCommandFlow(name) {
|
|
15080
|
+
return this.commandFlowMap.get(name);
|
|
15081
|
+
}
|
|
15066
15082
|
executionPromise = null;
|
|
15067
15083
|
executionResolve = null;
|
|
15068
15084
|
/** 执行控制流
|
|
@@ -15093,6 +15109,7 @@ class CommandManager extends EventDispatcher {
|
|
|
15093
15109
|
try {
|
|
15094
15110
|
for (let i = step; i < commandFlow.list.length; i++) {
|
|
15095
15111
|
const operation = commandFlow.list[i];
|
|
15112
|
+
commandFlow.currentIndex = i;
|
|
15096
15113
|
commandFlow.dispatchEvent({ type: "executing", index: i });
|
|
15097
15114
|
this.dispatchEvent({ type: "executing", name, index: i });
|
|
15098
15115
|
data = await new Promise((resolve) => {
|
|
@@ -15114,6 +15131,7 @@ class CommandManager extends EventDispatcher {
|
|
|
15114
15131
|
} finally {
|
|
15115
15132
|
this.lock = false;
|
|
15116
15133
|
this.currentName = null;
|
|
15134
|
+
commandFlow.currentIndex = 0;
|
|
15117
15135
|
if (this.abortController && !this.abortController.signal.aborted) {
|
|
15118
15136
|
commandFlow.dispatchEvent({ type: "completed", data });
|
|
15119
15137
|
this.dispatchEvent({ type: "completed", name, data });
|
package/src/index.css
CHANGED
|
@@ -109,6 +109,10 @@
|
|
|
109
109
|
bottom: 10px;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
+
.bottom-\[20px\] {
|
|
113
|
+
bottom: 20px;
|
|
114
|
+
}
|
|
115
|
+
|
|
112
116
|
.left-0 {
|
|
113
117
|
left: calc(var(--spacing) * 0);
|
|
114
118
|
}
|
|
@@ -117,6 +121,14 @@
|
|
|
117
121
|
left: 10px;
|
|
118
122
|
}
|
|
119
123
|
|
|
124
|
+
.left-\[20px\] {
|
|
125
|
+
left: 20px;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.z-100 {
|
|
129
|
+
z-index: 100;
|
|
130
|
+
}
|
|
131
|
+
|
|
120
132
|
.z-\[11\] {
|
|
121
133
|
z-index: 11;
|
|
122
134
|
}
|
|
@@ -424,6 +436,16 @@
|
|
|
424
436
|
background-color: var(--color-white);
|
|
425
437
|
}
|
|
426
438
|
|
|
439
|
+
.bg-white\/15 {
|
|
440
|
+
background-color: #ffffff26;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
444
|
+
.bg-white\/15 {
|
|
445
|
+
background-color: color-mix(in oklab, var(--color-white) 15%, transparent);
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
|
|
427
449
|
.p-\[0px_5px\] {
|
|
428
450
|
padding: 0 5px;
|
|
429
451
|
}
|
|
@@ -680,7 +702,7 @@
|
|
|
680
702
|
inherits: false
|
|
681
703
|
}
|
|
682
704
|
|
|
683
|
-
[data-v-
|
|
705
|
+
[data-v-492c138f] {
|
|
684
706
|
font-family: 宋体;
|
|
685
707
|
}
|
|
686
708
|
|