rm-graphical-computing-node 1.0.133 → 1.0.135
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 +35 -24
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -9789,9 +9789,9 @@ var getMergeMeaning = (allProjectionResults, wallLines, wallVerifyType, averageP
|
|
|
9789
9789
|
let tol = 0.5;
|
|
9790
9790
|
let f = calculateClosePointWithOBB(sourceItem.points, targetItem.obb);
|
|
9791
9791
|
let boxVecJ = getObbLongSideDirection(targetItem.obb);
|
|
9792
|
-
if (boxVecJ.length > 0.
|
|
9792
|
+
if (boxVecJ.length > 0.2 && boxVecK.length > 0.2 || f > 0.3) {
|
|
9793
9793
|
let isPPPP = isParallel(boxVecJ.direction, boxVecK.direction, tol);
|
|
9794
|
-
if (!isPPPP || !isPPPP.parallel) {
|
|
9794
|
+
if ((!isPPPP || !isPPPP.parallel) && f < 0.8) {
|
|
9795
9795
|
continue;
|
|
9796
9796
|
}
|
|
9797
9797
|
}
|
|
@@ -9882,9 +9882,9 @@ var getMergeMeaning = (allProjectionResults, wallLines, wallVerifyType, averageP
|
|
|
9882
9882
|
let tol = array[k].type == "door frame" ? 0.5 : 0.5;
|
|
9883
9883
|
let boxVecK = getObbLongSideDirection(array[k].obb);
|
|
9884
9884
|
let f = calculateClosePointWithOBB(array[k].points, cloneData.obb, 1);
|
|
9885
|
-
if (boxVecJ.length > 0.
|
|
9885
|
+
if (boxVecJ.length > 0.2 && boxVecK.length > 0.2 || f > 0.3) {
|
|
9886
9886
|
let isPPPP = isParallel(boxVecJ.direction, boxVecK.direction, tol);
|
|
9887
|
-
if ((!isPPPP || !isPPPP.parallel) && f < 0.
|
|
9887
|
+
if ((!isPPPP || !isPPPP.parallel) && f < 0.8) {
|
|
9888
9888
|
continue;
|
|
9889
9889
|
}
|
|
9890
9890
|
}
|
|
@@ -15260,32 +15260,13 @@ var getWindowData = (lines, pcdData, lineReader) => {
|
|
|
15260
15260
|
height += addHeight;
|
|
15261
15261
|
}
|
|
15262
15262
|
}
|
|
15263
|
-
let isOverlap = false;
|
|
15264
|
-
for (let m = 0; m < allDoorLines1.length; m++) {
|
|
15265
|
-
let result = classifySegments(allDoorLines1[m].start, allDoorLines1[m].end, doorTmpSt, doorTmpEd);
|
|
15266
|
-
if (result && result.type == "collinear_overlap" && result.maxPerpendicularDistance < 0.07) {
|
|
15267
|
-
isOverlap = true;
|
|
15268
|
-
}
|
|
15269
|
-
}
|
|
15270
|
-
if (isOverlap) {
|
|
15271
|
-
if (findDoorDataIndex != -1) {
|
|
15272
|
-
if (!beforePcdDoorisFindWindow) {
|
|
15273
|
-
pcdData[windowDatas[findDoorDataIndex].index].isFindWindow = false;
|
|
15274
|
-
windowDatas[findDoorDataIndex].isFind = false;
|
|
15275
|
-
}
|
|
15276
|
-
}
|
|
15277
|
-
continue;
|
|
15278
|
-
}
|
|
15279
|
-
let afterDoorLen = doorTmpEd.distanceTo(doorTmpSt);
|
|
15280
|
-
if (afterDoorLen < 0.4 && !isWindow || afterDoorLen < 0.3 && isWindow)
|
|
15281
|
-
continue;
|
|
15282
15263
|
const windowPcd = windowDatas[findDoorDataIndex];
|
|
15283
15264
|
const windowPcdSt = windowPcd.windowStartPt.clone();
|
|
15284
15265
|
const windowPcdEd = windowPcd.windowEndPt.clone();
|
|
15285
15266
|
const windowPcdLen = windowPcdSt.distanceTo(windowPcdEd);
|
|
15286
15267
|
const windowPcdHeight = Math.abs(windowPcd.maxZ - windowPcd.minZ);
|
|
15287
15268
|
let windowHeight = beamTmpSt.z - doorTmpSt.z;
|
|
15288
|
-
|
|
15269
|
+
let windowLen = doorTmpSt.distanceTo(doorTmpEd);
|
|
15289
15270
|
let changeWindowSize = false;
|
|
15290
15271
|
let windowSizeThreshold = 0.3;
|
|
15291
15272
|
if ((Math.abs(windowPcdLen - windowLen) < windowSizeThreshold || windowPcdLen > windowLen) && (Math.abs(windowPcdHeight - windowHeight) < windowSizeThreshold || windowPcdHeight > windowHeight)) {
|
|
@@ -15394,6 +15375,36 @@ var getWindowData = (lines, pcdData, lineReader) => {
|
|
|
15394
15375
|
beamTmpEd = doorTmpEd.clone();
|
|
15395
15376
|
beamTmpSt.z = beamTmpEd.z = windowPcd.maxZ;
|
|
15396
15377
|
}
|
|
15378
|
+
windowLen = doorTmpSt.distanceTo(doorTmpEd);
|
|
15379
|
+
if (windowLen * 2 < windowPcdLen) {
|
|
15380
|
+
pcdData[windowDatas[findDoorDataIndex].index].isFindWindow = false;
|
|
15381
|
+
windowDatas[findDoorDataIndex].isFind = false;
|
|
15382
|
+
continue;
|
|
15383
|
+
}
|
|
15384
|
+
let isOverlap = false;
|
|
15385
|
+
for (let m = 0; m < allDoorLines1.length; m++) {
|
|
15386
|
+
let result = classifySegments(allDoorLines1[m].start, allDoorLines1[m].end, doorTmpSt, doorTmpEd);
|
|
15387
|
+
console.log(result);
|
|
15388
|
+
if (result && result.type == "collinear_overlap" && result.maxPerpendicularDistance < 0.07) {
|
|
15389
|
+
isOverlap = true;
|
|
15390
|
+
}
|
|
15391
|
+
}
|
|
15392
|
+
console.log("isOverlap", isOverlap);
|
|
15393
|
+
if (isOverlap) {
|
|
15394
|
+
if (findDoorDataIndex != -1) {
|
|
15395
|
+
if (!beforePcdDoorisFindWindow) {
|
|
15396
|
+
pcdData[windowDatas[findDoorDataIndex].index].isFindWindow = false;
|
|
15397
|
+
windowDatas[findDoorDataIndex].isFind = false;
|
|
15398
|
+
}
|
|
15399
|
+
}
|
|
15400
|
+
continue;
|
|
15401
|
+
}
|
|
15402
|
+
let afterDoorLen = doorTmpEd.distanceTo(doorTmpSt);
|
|
15403
|
+
if (afterDoorLen < 0.4 && !isWindow || afterDoorLen < 0.3 && isWindow) {
|
|
15404
|
+
pcdData[windowDatas[findDoorDataIndex].index].isFindWindow = false;
|
|
15405
|
+
windowDatas[findDoorDataIndex].isFind = false;
|
|
15406
|
+
continue;
|
|
15407
|
+
}
|
|
15397
15408
|
let doorType = "";
|
|
15398
15409
|
let groundClearance = doorTmpSt.z - line2.start.z > 1e-4 ? doorTmpSt.z - line2.start.z : 0;
|
|
15399
15410
|
windowHeight = beamTmpSt.z - doorTmpSt.z;
|