rm-graphical-computing-node 1.0.119 → 1.0.121
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 +10 -51
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -9786,13 +9786,9 @@ var getMergeMeaning = (allProjectionResults, wallLines, wallVerifyType, averageP
|
|
|
9786
9786
|
}
|
|
9787
9787
|
}
|
|
9788
9788
|
}
|
|
9789
|
-
console.time("appendPcdObj");
|
|
9790
|
-
appendPcdObj("window", "door frame");
|
|
9791
9789
|
appendPcdObj("window", "metal framing of interior glass partitions");
|
|
9792
9790
|
appendPcdObj("balcony railing", "metal framing of interior glass partitions");
|
|
9793
9791
|
appendPcdObj("window", "balcony railing");
|
|
9794
|
-
appendPcdObj("window", "door frame");
|
|
9795
|
-
console.timeEnd("appendPcdObj");
|
|
9796
9792
|
for (let i = 0; i < pcdPointsArr.length; i++) {
|
|
9797
9793
|
const array = pcdPointsArr[i].array;
|
|
9798
9794
|
const delData = /* @__PURE__ */ new Set();
|
|
@@ -9840,10 +9836,14 @@ var getMergeMeaning = (allProjectionResults, wallLines, wallVerifyType, averageP
|
|
|
9840
9836
|
if (cloneData.type == "pipe" && array[k].type == "pipe" && pipeIsVerticalJ != pipeIsVerticalK) {
|
|
9841
9837
|
continue;
|
|
9842
9838
|
}
|
|
9843
|
-
if (
|
|
9844
|
-
|
|
9839
|
+
if (
|
|
9840
|
+
/**array[k].type == 'door frame' || */
|
|
9841
|
+
array[k].type == "window"
|
|
9842
|
+
) {
|
|
9843
|
+
let tol = array[k].type == "door frame" ? 0.5 : 0.5;
|
|
9845
9844
|
let boxVecK = getObbLongSideDirection(array[k].obb);
|
|
9846
|
-
|
|
9845
|
+
let f = calculateClosePointWithOBB(array[k].points, cloneData.obb);
|
|
9846
|
+
if (boxVecJ.length() > 0.3 && boxVecK.length() > 0.3 && f < 0.3) {
|
|
9847
9847
|
let isPPPP = isParallel(boxVecJ, boxVecK, tol);
|
|
9848
9848
|
if (!isPPPP || !isPPPP.parallel) {
|
|
9849
9849
|
continue;
|
|
@@ -14649,48 +14649,7 @@ var getWindowData = (lines, pcdData, lineReader) => {
|
|
|
14649
14649
|
const totalInPlaneNum = region.totalInPlaneNum;
|
|
14650
14650
|
if (!facePoints || facePoints.length <= 0)
|
|
14651
14651
|
continue;
|
|
14652
|
-
let
|
|
14653
|
-
let regionHeight = facePoints[0].distanceTo(facePoints[3]);
|
|
14654
|
-
const centerHeight = region.gridHeight * (regionHeight / region.gridHeight / 3 * 2) + region.gridHeight / 2;
|
|
14655
|
-
let linePt1 = new THREE10.Vector3(facePoints[0].x, facePoints[0].y, facePoints[0].z + centerHeight);
|
|
14656
|
-
let linePt2 = new THREE10.Vector3(facePoints[1].x, facePoints[1].y, facePoints[1].z + centerHeight);
|
|
14657
|
-
const centerLine = new THREE10.Line3(linePt1, linePt2);
|
|
14658
|
-
const inLinePts = [];
|
|
14659
|
-
let tmpTargetPt = new THREE10.Vector3();
|
|
14660
|
-
region.points.forEach((pt) => {
|
|
14661
|
-
const tmpClosePt = centerLine.closestPointToPoint(pt, true, tmpTargetPt);
|
|
14662
|
-
if (tmpClosePt.distanceTo(pt) < region.gridHeight + 0.01) {
|
|
14663
|
-
inLinePts.push(pt);
|
|
14664
|
-
}
|
|
14665
|
-
});
|
|
14666
|
-
let lineGroup = [];
|
|
14667
|
-
let isFindPtIndex = [];
|
|
14668
|
-
while (true) {
|
|
14669
|
-
let tmpLine = [];
|
|
14670
|
-
for (let e = 0; e < inLinePts.length; e++) {
|
|
14671
|
-
if (isFindPtIndex.includes(e))
|
|
14672
|
-
continue;
|
|
14673
|
-
if (tmpLine.length == 0) {
|
|
14674
|
-
tmpLine.push(inLinePts[e]);
|
|
14675
|
-
isFindPtIndex.push(e);
|
|
14676
|
-
}
|
|
14677
|
-
}
|
|
14678
|
-
for (let c = 0; c < inLinePts.length; c++) {
|
|
14679
|
-
if (isFindPtIndex.includes(c))
|
|
14680
|
-
continue;
|
|
14681
|
-
for (let e = 0; e < tmpLine.length; e++) {
|
|
14682
|
-
if (inLinePts[c].distanceTo(tmpLine[e]) < region.gridWidth + 0.01) {
|
|
14683
|
-
tmpLine.push(inLinePts[c]);
|
|
14684
|
-
isFindPtIndex.push(c);
|
|
14685
|
-
c = -1;
|
|
14686
|
-
break;
|
|
14687
|
-
}
|
|
14688
|
-
}
|
|
14689
|
-
}
|
|
14690
|
-
if (tmpLine.length == 0)
|
|
14691
|
-
break;
|
|
14692
|
-
lineGroup.push(tmpLine);
|
|
14693
|
-
}
|
|
14652
|
+
let lineGroup = [[...region.points]];
|
|
14694
14653
|
const regionData = [];
|
|
14695
14654
|
for (let e = 0; e < lineGroup.length; e++) {
|
|
14696
14655
|
const obj = {
|
|
@@ -15101,7 +15060,7 @@ var getWindowData = (lines, pcdData, lineReader) => {
|
|
|
15101
15060
|
groundClearance,
|
|
15102
15061
|
obj_id: windowObj_id
|
|
15103
15062
|
};
|
|
15104
|
-
if (windowToWallAngle >
|
|
15063
|
+
if (windowToWallAngle > 50 && changeWindowSize) {
|
|
15105
15064
|
let rectPts = [doorAndBeamDataObj.windowBottomSt, doorAndBeamDataObj.windowBottomEd, doorAndBeamDataObj.windowTopEd, doorAndBeamDataObj.windowTopSt];
|
|
15106
15065
|
let checkResultsNum = region.centerPts ? region.centerPts.length : 0;
|
|
15107
15066
|
let inRectNum = 0;
|
|
@@ -15577,7 +15536,7 @@ function checkWindowLocationIsTrue(windowData, passageEntrance) {
|
|
|
15577
15536
|
let passP = getPt3(passage.p);
|
|
15578
15537
|
let distance2 = windowP.distanceTo(passP);
|
|
15579
15538
|
if (distance2 < passage.width / 2 + windowData.width / 2) {
|
|
15580
|
-
if (distance2 < 0.3 && Math.abs(windowData.width - passage.width) < 0.
|
|
15539
|
+
if (distance2 < 0.3 && Math.abs(windowData.width - passage.width) < 0.5 || passage.width < windowData.width) {
|
|
15581
15540
|
delDoorAndBemaData = true;
|
|
15582
15541
|
break;
|
|
15583
15542
|
} else {
|