rm-graphical-computing-node 1.0.48 → 1.0.49
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/dist/index.mjs +31 -25
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -10844,12 +10844,13 @@ var getFlatSlabData = (lines, runDataList, pointCloudCluster = null) => {
|
|
|
10844
10844
|
// src/geometry/window.mjs
|
|
10845
10845
|
import * as THREE10 from "three";
|
|
10846
10846
|
import { mergeGeometries as mergeGeometries5 } from "three/examples/jsm/utils/BufferGeometryUtils.js";
|
|
10847
|
-
var getWindowData = (lines, pcdData) => {
|
|
10847
|
+
var getWindowData = (lines, pcdData, lineReader) => {
|
|
10848
10848
|
if (lines.length <= 0 || !pcdData)
|
|
10849
10849
|
return lines;
|
|
10850
10850
|
if (!pcdData) pcdData = [];
|
|
10851
10851
|
for (let line2 of lines) {
|
|
10852
10852
|
let allRegion = [];
|
|
10853
|
+
line2.checkResults = lineReader.getLineCheckReultsById(line2.id);
|
|
10853
10854
|
if (!line2.checkResults || line2.checkResults.length <= 0)
|
|
10854
10855
|
continue;
|
|
10855
10856
|
for (let r = 0; r < line2.checkResults.length; r++) {
|
|
@@ -10934,6 +10935,7 @@ var getWindowData = (lines, pcdData) => {
|
|
|
10934
10935
|
}
|
|
10935
10936
|
allRegion.push(...val);
|
|
10936
10937
|
}
|
|
10938
|
+
line2.checkResults = null;
|
|
10937
10939
|
line2.mergeCheckRegion = allRegion;
|
|
10938
10940
|
}
|
|
10939
10941
|
const windowDatas = [];
|
|
@@ -10980,10 +10982,12 @@ var getWindowData = (lines, pcdData) => {
|
|
|
10980
10982
|
let line2 = lines[index];
|
|
10981
10983
|
if (line2.length < 0.5) continue;
|
|
10982
10984
|
if (line2.noDetection) continue;
|
|
10983
|
-
|
|
10984
|
-
|
|
10985
|
-
if (!line2.
|
|
10986
|
-
line2.
|
|
10985
|
+
line2.originalPoints = lineReader.getOriginalPointsById(line2.id);
|
|
10986
|
+
line2.checkResults = lineReader.getLineCheckReultsById(line2.id);
|
|
10987
|
+
if (!line2.windowData)
|
|
10988
|
+
line2.windowData = [];
|
|
10989
|
+
if (!line2.windowIdToCheckResults)
|
|
10990
|
+
line2.windowIdToCheckResults = [];
|
|
10987
10991
|
if (!line2.mergeCheckRegion || line2.mergeCheckRegion.length == 0)
|
|
10988
10992
|
continue;
|
|
10989
10993
|
line2.completePointAreaPercentage = -1;
|
|
@@ -11359,11 +11363,11 @@ var getWindowData = (lines, pcdData) => {
|
|
|
11359
11363
|
pcbDoorIndexs,
|
|
11360
11364
|
groundClearance
|
|
11361
11365
|
};
|
|
11362
|
-
line2.
|
|
11363
|
-
line2.
|
|
11366
|
+
line2.windowIdToCheckResults.push([region.index, id]);
|
|
11367
|
+
line2.windowData.push(doorAndBeamDataObj);
|
|
11364
11368
|
doorBeamDataIndex.push({
|
|
11365
11369
|
linesIndex: index,
|
|
11366
|
-
doorIndex: line2.
|
|
11370
|
+
doorIndex: line2.windowData.length - 1
|
|
11367
11371
|
});
|
|
11368
11372
|
allDoorLines1.push({
|
|
11369
11373
|
start: doorTmpSt,
|
|
@@ -11380,26 +11384,28 @@ var getWindowData = (lines, pcdData) => {
|
|
|
11380
11384
|
}
|
|
11381
11385
|
let faceArea = line2.length * (line2.rooftopPz - line2.start.z);
|
|
11382
11386
|
line2.completePointAreaPercentage = totalArea / faceArea * 100;
|
|
11387
|
+
line2.checkResults = null;
|
|
11388
|
+
line2.originalPoints = null;
|
|
11383
11389
|
}
|
|
11384
11390
|
if (findDoorIndexs.length > 1) {
|
|
11385
11391
|
for (let j = 0; j < findDoorIndexs.length; j++) {
|
|
11386
11392
|
let savedata2 = [];
|
|
11387
|
-
for (let d = 0; d < lines[findDoorIndexs[j]].
|
|
11388
|
-
if (lines[findDoorIndexs[j]].
|
|
11393
|
+
for (let d = 0; d < lines[findDoorIndexs[j]].windowData.length; d++) {
|
|
11394
|
+
if (lines[findDoorIndexs[j]].windowData[d].type != "window")
|
|
11389
11395
|
continue;
|
|
11390
11396
|
let isDel = false;
|
|
11391
11397
|
if (!isDel) {
|
|
11392
|
-
let doorSt1 = lines[findDoorIndexs[j]].
|
|
11393
|
-
let doorEd1 = lines[findDoorIndexs[j]].
|
|
11398
|
+
let doorSt1 = lines[findDoorIndexs[j]].windowData[d].windowBottomSt.clone();
|
|
11399
|
+
let doorEd1 = lines[findDoorIndexs[j]].windowData[d].windowBottomEd.clone();
|
|
11394
11400
|
doorSt1.z = doorEd1.z = 0;
|
|
11395
11401
|
let doorLen1 = doorSt1.distanceTo(doorEd1);
|
|
11396
11402
|
for (let b = 0; b < findDoorIndexs.length; b++) {
|
|
11397
11403
|
if (j == b) continue;
|
|
11398
|
-
for (let r = 0; r < lines[findDoorIndexs[b]].
|
|
11399
|
-
if (lines[findDoorIndexs[b]].
|
|
11404
|
+
for (let r = 0; r < lines[findDoorIndexs[b]].windowData.length; r++) {
|
|
11405
|
+
if (lines[findDoorIndexs[b]].windowData[r].type != "window")
|
|
11400
11406
|
continue;
|
|
11401
|
-
let doorSt2 = lines[findDoorIndexs[b]].
|
|
11402
|
-
let doorEd2 = lines[findDoorIndexs[b]].
|
|
11407
|
+
let doorSt2 = lines[findDoorIndexs[b]].windowData[r].windowBottomSt.clone();
|
|
11408
|
+
let doorEd2 = lines[findDoorIndexs[b]].windowData[r].windowBottomEd.clone();
|
|
11403
11409
|
doorSt2.z = doorEd2.z = 0;
|
|
11404
11410
|
let doorLen2 = doorSt2.distanceTo(doorEd2);
|
|
11405
11411
|
let resultTmp = classifySegments(doorSt1, doorEd1, doorSt2, doorEd2);
|
|
@@ -11409,8 +11415,8 @@ var getWindowData = (lines, pcdData) => {
|
|
|
11409
11415
|
let ptClose = line3.closestPointToPoint(ptMid, true, new THREE10.Vector3());
|
|
11410
11416
|
let distTmp = ptMid.distanceTo(ptClose);
|
|
11411
11417
|
if (Math.abs(doorLen1 - resultTmp.overlap) < 0.1 && distTmp < 0.04) {
|
|
11412
|
-
if (lines[findDoorIndexs[b]].
|
|
11413
|
-
lines[findDoorIndexs[b]].
|
|
11418
|
+
if (lines[findDoorIndexs[b]].windowData[r].nearId == lines[findDoorIndexs[j]].windowData[d].id) {
|
|
11419
|
+
lines[findDoorIndexs[b]].windowData[r].nearId = -1;
|
|
11414
11420
|
}
|
|
11415
11421
|
isDel = true;
|
|
11416
11422
|
break;
|
|
@@ -11420,24 +11426,24 @@ var getWindowData = (lines, pcdData) => {
|
|
|
11420
11426
|
}
|
|
11421
11427
|
}
|
|
11422
11428
|
if (isDel) {
|
|
11423
|
-
for (let z = 0; z < lines[findDoorIndexs[j]].
|
|
11424
|
-
if (lines[findDoorIndexs[j]].
|
|
11425
|
-
lines[findDoorIndexs[j]].
|
|
11429
|
+
for (let z = 0; z < lines[findDoorIndexs[j]].windowIdToCheckResults.length; z++) {
|
|
11430
|
+
if (lines[findDoorIndexs[j]].windowIdToCheckResults[1] == lines[findDoorIndexs[j]].windowData[d].id) {
|
|
11431
|
+
lines[findDoorIndexs[j]].windowIdToCheckResults.splice(z, 1);
|
|
11426
11432
|
break;
|
|
11427
11433
|
}
|
|
11428
11434
|
}
|
|
11429
11435
|
}
|
|
11430
|
-
if (!isDel) savedata2.push(lines[findDoorIndexs[j]].
|
|
11436
|
+
if (!isDel) savedata2.push(lines[findDoorIndexs[j]].windowData[d]);
|
|
11431
11437
|
}
|
|
11432
|
-
if (savedata2.length != lines[findDoorIndexs[j]].
|
|
11433
|
-
lines[findDoorIndexs[j]].
|
|
11438
|
+
if (savedata2.length != lines[findDoorIndexs[j]].windowData.length)
|
|
11439
|
+
lines[findDoorIndexs[j]].windowData = savedata2;
|
|
11434
11440
|
}
|
|
11435
11441
|
}
|
|
11436
11442
|
let tmpLines = [];
|
|
11437
11443
|
for (let i = 0; i < lines.length; i++) {
|
|
11438
11444
|
if (!lines[i].isLine2)
|
|
11439
11445
|
tmpLines.push(lines[i]);
|
|
11440
|
-
if (lines[i].isLine2 && lines[i].
|
|
11446
|
+
if (lines[i].isLine2 && lines[i].windowData.length != 0)
|
|
11441
11447
|
tmpLines.push(lines[i]);
|
|
11442
11448
|
}
|
|
11443
11449
|
lines.length = 0;
|