build-dxf 0.1.124 → 0.1.126
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 +22 -23
- package/src/index.css +4 -4
- package/src/index3.js +13 -8
package/package.json
CHANGED
package/src/build.js
CHANGED
|
@@ -8690,7 +8690,7 @@ class PCSparseOctree {
|
|
|
8690
8690
|
}
|
|
8691
8691
|
}
|
|
8692
8692
|
const box3$1 = new THREE.Box3();
|
|
8693
|
-
const index$
|
|
8693
|
+
const index$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
8694
8694
|
__proto__: null,
|
|
8695
8695
|
ArrayMap,
|
|
8696
8696
|
Box2,
|
|
@@ -23361,7 +23361,7 @@ const components = {
|
|
|
23361
23361
|
Dxf,
|
|
23362
23362
|
CorrectionDxf
|
|
23363
23363
|
};
|
|
23364
|
-
const
|
|
23364
|
+
const index$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
23365
23365
|
__proto__: null,
|
|
23366
23366
|
BoundExt,
|
|
23367
23367
|
DoubleWallFinder,
|
|
@@ -23387,9 +23387,9 @@ function drawLines(lines, parameters, offset = 1e-3) {
|
|
|
23387
23387
|
});
|
|
23388
23388
|
}
|
|
23389
23389
|
if (lines instanceof LineSegment) return drawLines([lines], parameters, offset);
|
|
23390
|
-
const
|
|
23391
|
-
if (
|
|
23392
|
-
const renderer =
|
|
23390
|
+
const dxfSystem = DxfSystem.finalInstance;
|
|
23391
|
+
if (dxfSystem) {
|
|
23392
|
+
const renderer = dxfSystem.findComponentByName("Renderer");
|
|
23393
23393
|
if (renderer) {
|
|
23394
23394
|
if (lines.length === 0) return;
|
|
23395
23395
|
const obj3d = renderer.createLineSegments(lines, 0, parameters, renderer?.container2);
|
|
@@ -23399,9 +23399,9 @@ function drawLines(lines, parameters, offset = 1e-3) {
|
|
|
23399
23399
|
}
|
|
23400
23400
|
}
|
|
23401
23401
|
function drawPoint(point2, parameters, offset = 1e-3) {
|
|
23402
|
-
const
|
|
23403
|
-
if (
|
|
23404
|
-
const renderer =
|
|
23402
|
+
const dxfSystem = DxfSystem.finalInstance;
|
|
23403
|
+
if (dxfSystem) {
|
|
23404
|
+
const renderer = dxfSystem.findComponentByName("Renderer");
|
|
23405
23405
|
if (renderer) {
|
|
23406
23406
|
const obj3d = renderer.createCircle(point2, parameters, renderer?.container2);
|
|
23407
23407
|
obj3d.position.z = offset;
|
|
@@ -23410,10 +23410,10 @@ function drawPoint(point2, parameters, offset = 1e-3) {
|
|
|
23410
23410
|
}
|
|
23411
23411
|
}
|
|
23412
23412
|
function drawText$1(text, point2, style, offset = 1e-3) {
|
|
23413
|
-
const
|
|
23414
|
-
if (
|
|
23415
|
-
const renderer =
|
|
23416
|
-
const editor =
|
|
23413
|
+
const dxfSystem = DxfSystem.finalInstance;
|
|
23414
|
+
if (dxfSystem) {
|
|
23415
|
+
const renderer = dxfSystem.findComponentByName("Renderer");
|
|
23416
|
+
const editor = dxfSystem.findComponentByName("Editor");
|
|
23417
23417
|
if (renderer) {
|
|
23418
23418
|
const obj3d = renderer.createText(text, point2, style, editor?.container2);
|
|
23419
23419
|
obj3d.position.z = offset;
|
|
@@ -23449,17 +23449,17 @@ class WhiteModel extends Component {
|
|
|
23449
23449
|
});
|
|
23450
23450
|
}
|
|
23451
23451
|
async updateModel() {
|
|
23452
|
-
const
|
|
23452
|
+
const dxfSystem = this.parent;
|
|
23453
23453
|
this.Variable?.set("whiteModelVisible", false);
|
|
23454
23454
|
const dxf = this.Dxf;
|
|
23455
23455
|
this.whiteModelGroup.clear();
|
|
23456
23456
|
this.whiteModelLineGroup.clear();
|
|
23457
23457
|
this.whiteModelGroup.add(this.whiteModelLineGroup);
|
|
23458
23458
|
this.whiteModelGroup.position.z = dxf.originalZAverage;
|
|
23459
|
-
const lines =
|
|
23460
|
-
const sceneAutoGenerat = new SceneAutoGenerat(lines, this.itemList,
|
|
23459
|
+
const lines = dxfSystem.CorrectionDxf.getLineSegments(true);
|
|
23460
|
+
const sceneAutoGenerat = new SceneAutoGenerat(lines, this.itemList, dxfSystem.Dxf.originalZAverage, dxfSystem.Dxf.options.trajectory);
|
|
23461
23461
|
await sceneAutoGenerat.init();
|
|
23462
|
-
sceneAutoGenerat.buildPlane(
|
|
23462
|
+
sceneAutoGenerat.buildPlane(dxfSystem.Dxf.getLineSegments());
|
|
23463
23463
|
const group2 = sceneAutoGenerat.scene;
|
|
23464
23464
|
if (group2) {
|
|
23465
23465
|
this.whiteModelLineGroup.add(group2.clone(true));
|
|
@@ -23602,17 +23602,17 @@ const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
|
|
|
23602
23602
|
DxfLineModel,
|
|
23603
23603
|
WhiteModel
|
|
23604
23604
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
23605
|
-
function Model3dPlugin_(
|
|
23605
|
+
function Model3dPlugin_(dxfSystem, option = {}) {
|
|
23606
23606
|
const {
|
|
23607
23607
|
whiteModel = true,
|
|
23608
23608
|
dxfLineModel = true
|
|
23609
23609
|
} = option;
|
|
23610
|
-
dxfLineModel &&
|
|
23611
|
-
whiteModel &&
|
|
23610
|
+
dxfLineModel && dxfSystem.addComponent(new DxfLineModel());
|
|
23611
|
+
whiteModel && dxfSystem.addComponent(new WhiteModel());
|
|
23612
23612
|
}
|
|
23613
23613
|
const ModelDataPlugin = Object.assign(Model3dPlugin_, {
|
|
23614
23614
|
create(option = {}) {
|
|
23615
|
-
return (
|
|
23615
|
+
return (dxfSystem) => Model3dPlugin_(dxfSystem, option);
|
|
23616
23616
|
}
|
|
23617
23617
|
});
|
|
23618
23618
|
const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -23620,7 +23620,6 @@ const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
|
|
|
23620
23620
|
ModelDataPlugin,
|
|
23621
23621
|
components: index$1
|
|
23622
23622
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
23623
|
-
console.log(dxfSystem);
|
|
23624
23623
|
function loadRenderPlugin() {
|
|
23625
23624
|
return import("./index2.js");
|
|
23626
23625
|
}
|
|
@@ -23823,7 +23822,7 @@ export {
|
|
|
23823
23822
|
Component as C,
|
|
23824
23823
|
DEFAULT_WALL_WIDTH as D,
|
|
23825
23824
|
hasCircle as E,
|
|
23826
|
-
index$
|
|
23825
|
+
index$3 as F,
|
|
23827
23826
|
HeightQuery as H,
|
|
23828
23827
|
LineSegment as L,
|
|
23829
23828
|
MiniCircles as M,
|
|
@@ -23856,7 +23855,7 @@ export {
|
|
|
23856
23855
|
buildJson as t,
|
|
23857
23856
|
uuid as u,
|
|
23858
23857
|
createEditor as v,
|
|
23859
|
-
|
|
23858
|
+
index$2 as w,
|
|
23860
23859
|
getFileAll as x,
|
|
23861
23860
|
getGlobalDxfSystem as y,
|
|
23862
23861
|
getModels as z
|
package/src/index.css
CHANGED
|
@@ -1248,17 +1248,17 @@ button[data-v-7a78abcb]:active {
|
|
|
1248
1248
|
}
|
|
1249
1249
|
}
|
|
1250
1250
|
|
|
1251
|
-
[data-v-
|
|
1251
|
+
[data-v-48eb568f] {
|
|
1252
1252
|
font-family: 微软雅黑;
|
|
1253
1253
|
}
|
|
1254
|
-
.number[data-v-
|
|
1254
|
+
.number[data-v-48eb568f] {
|
|
1255
1255
|
color: #a7a7a7
|
|
1256
1256
|
}
|
|
1257
1257
|
|
|
1258
|
-
[data-v-
|
|
1258
|
+
[data-v-f7550a15] {
|
|
1259
1259
|
font-family: 宋体;
|
|
1260
1260
|
}
|
|
1261
|
-
.button[data-v-
|
|
1261
|
+
.button[data-v-f7550a15] {
|
|
1262
1262
|
padding: 5px 10px;
|
|
1263
1263
|
border: none;
|
|
1264
1264
|
background: var(--primary-color);
|
package/src/index3.js
CHANGED
|
@@ -18385,7 +18385,12 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
18385
18385
|
if (!map.has(line2.uuid)) map.set(line2.uuid, reactive(line2.userData));
|
|
18386
18386
|
return map.get(line2.uuid);
|
|
18387
18387
|
});
|
|
18388
|
-
})
|
|
18388
|
+
}), holeName = {
|
|
18389
|
+
door: "门",
|
|
18390
|
+
window: "窗",
|
|
18391
|
+
beam: "梁",
|
|
18392
|
+
hole: "垭口"
|
|
18393
|
+
};
|
|
18389
18394
|
return (_ctx, _cache) => {
|
|
18390
18395
|
return openBlock(), createBlock(_sfc_main$7, {
|
|
18391
18396
|
title: "属性",
|
|
@@ -18407,7 +18412,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
18407
18412
|
])) : createCommentVNode("", true),
|
|
18408
18413
|
createElementVNode("div", _hoisted_5$1, [
|
|
18409
18414
|
createElementVNode("div", null, [
|
|
18410
|
-
createElementVNode("h5", _hoisted_6$1, toDisplayString(line2.userData.isDoor ? "门线" : line2.userData.isSelectWindow ? "
|
|
18415
|
+
createElementVNode("h5", _hoisted_6$1, toDisplayString(line2.userData.isDoor ? "门线" : line2.userData.isSelectWindow ? `孔洞线( ${holeName[line2.userData.type ?? "hole"]} )` : line2.userData.isBayWindow ? "飘窗线" : "墙体线"), 1)
|
|
18411
18416
|
]),
|
|
18412
18417
|
createElementVNode("div", _hoisted_7$1, [
|
|
18413
18418
|
(openBlock(true), createElementBlock(Fragment, null, renderList(line2.points, (point, index) => {
|
|
@@ -18425,7 +18430,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
18425
18430
|
]),
|
|
18426
18431
|
createElementVNode("div", _hoisted_14$1, [
|
|
18427
18432
|
userDataList.value[i].isSelectWindow ? (openBlock(), createElementBlock("p", _hoisted_15$1, [
|
|
18428
|
-
_cache[9] || (_cache[9] = createElementVNode("span", { class: "mr-[5px] w-[50px]" }, "
|
|
18433
|
+
_cache[9] || (_cache[9] = createElementVNode("span", { class: "mr-[5px] w-[50px]" }, "孔洞宽度", -1)),
|
|
18429
18434
|
createVNode(_sfc_main$3, {
|
|
18430
18435
|
onBlur: _cache[0] || (_cache[0] = ($event) => emits("update")),
|
|
18431
18436
|
modelValue: userDataList.value[i].width,
|
|
@@ -18435,7 +18440,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
18435
18440
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
18436
18441
|
])) : createCommentVNode("", true),
|
|
18437
18442
|
createElementVNode("p", _hoisted_16$1, [
|
|
18438
|
-
createElementVNode("span", _hoisted_17$1, toDisplayString(line2.userData.isSelectWindow ? "
|
|
18443
|
+
createElementVNode("span", _hoisted_17$1, toDisplayString(line2.userData.isSelectWindow ? "孔洞" : "墙体") + "高度", 1),
|
|
18439
18444
|
createVNode(_sfc_main$3, {
|
|
18440
18445
|
onBlur: _cache[1] || (_cache[1] = ($event) => emits("update")),
|
|
18441
18446
|
modelValue: userDataList.value[i].height,
|
|
@@ -18453,7 +18458,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
18453
18458
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
18454
18459
|
])) : createCommentVNode("", true),
|
|
18455
18460
|
userDataList.value[i].isSelectWindow ? (openBlock(), createElementBlock("p", _hoisted_19$1, [
|
|
18456
|
-
_cache[11] || (_cache[11] = createElementVNode("span", { class: "mr-[5px] w-[50px]" }, "
|
|
18461
|
+
_cache[11] || (_cache[11] = createElementVNode("span", { class: "mr-[5px] w-[50px]" }, "孔洞高度", -1)),
|
|
18457
18462
|
createVNode(_sfc_main$3, {
|
|
18458
18463
|
onBlur: _cache[3] || (_cache[3] = ($event) => emits("update")),
|
|
18459
18464
|
modelValue: userDataList.value[i].groundClearance,
|
|
@@ -18474,7 +18479,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
18474
18479
|
};
|
|
18475
18480
|
}
|
|
18476
18481
|
});
|
|
18477
|
-
const PropertiesPanelView = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
18482
|
+
const PropertiesPanelView = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-48eb568f"]]);
|
|
18478
18483
|
class PropertiesPanel extends Command {
|
|
18479
18484
|
static name = "PropertiesPanel";
|
|
18480
18485
|
container = new THREE.Group();
|
|
@@ -18734,7 +18739,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
18734
18739
|
},
|
|
18735
18740
|
{
|
|
18736
18741
|
command: DrawHole.commandName,
|
|
18737
|
-
name: "
|
|
18742
|
+
name: "绘制垭口",
|
|
18738
18743
|
show: true,
|
|
18739
18744
|
src: images["../assets/images/垭口.svg"].default,
|
|
18740
18745
|
shortcut: DrawHole.shortcutKeys.join(" + ")
|
|
@@ -19326,7 +19331,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
19326
19331
|
};
|
|
19327
19332
|
}
|
|
19328
19333
|
});
|
|
19329
|
-
const EditorToolContent = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
19334
|
+
const EditorToolContent = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-f7550a15"]]);
|
|
19330
19335
|
class StorageHelper {
|
|
19331
19336
|
static get(key, defaultValue = void 0) {
|
|
19332
19337
|
const value = localStorage.getItem(key);
|