build-dxf 0.1.124 → 0.1.125
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/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
|