rm-graphical-computing-node 1.0.129 → 1.0.131
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 +46 -6
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -9959,9 +9959,40 @@ var getMergeMeaning = (allProjectionResults, wallLines, wallVerifyType, averageP
|
|
|
9959
9959
|
});
|
|
9960
9960
|
let beforeLength = newArray.length;
|
|
9961
9961
|
if (clusterResult.length > 0 && clusterResult[0].length > 1) {
|
|
9962
|
-
|
|
9963
|
-
|
|
9964
|
-
|
|
9962
|
+
if (type2 != "window") {
|
|
9963
|
+
for (const cluster of clusterResult[0]) {
|
|
9964
|
+
if (cluster.length < 50) continue;
|
|
9965
|
+
const newOriginalPoints = cluster.map((i2) => points[i2]);
|
|
9966
|
+
const centerData = getCenterAndPointHeight(newOriginalPoints);
|
|
9967
|
+
let pathPoints = newOriginalPoints.map((p) => [p.x, p.y]);
|
|
9968
|
+
const data = {
|
|
9969
|
+
points: newOriginalPoints,
|
|
9970
|
+
path: computeContour(pathPoints),
|
|
9971
|
+
h: centerData.h,
|
|
9972
|
+
minz: centerData.minz,
|
|
9973
|
+
maxz: centerData.maxz,
|
|
9974
|
+
center: { x: centerData.x, y: centerData.y, z: centerData.z },
|
|
9975
|
+
type: type2,
|
|
9976
|
+
averagePz: averagePz3,
|
|
9977
|
+
obb: null,
|
|
9978
|
+
obj_id,
|
|
9979
|
+
positionArr,
|
|
9980
|
+
isStaircaseBalconyRailing,
|
|
9981
|
+
mapPosition: array[j]?.mapPosition
|
|
9982
|
+
};
|
|
9983
|
+
data.obb = getObb(data.path, data.center, data.h, (data.maxz + data.minz) / 2);
|
|
9984
|
+
if (data.obb == null) continue;
|
|
9985
|
+
newArray.push(data);
|
|
9986
|
+
}
|
|
9987
|
+
} else {
|
|
9988
|
+
const newOriginalPoints = [];
|
|
9989
|
+
for (const cluster of clusterResult[0]) {
|
|
9990
|
+
if (cluster.length < 50) continue;
|
|
9991
|
+
let tmpPts = cluster.map((i2) => points[i2]);
|
|
9992
|
+
for (const p of tmpPts) {
|
|
9993
|
+
newOriginalPoints.push(p);
|
|
9994
|
+
}
|
|
9995
|
+
}
|
|
9965
9996
|
const centerData = getCenterAndPointHeight(newOriginalPoints);
|
|
9966
9997
|
let pathPoints = newOriginalPoints.map((p) => [p.x, p.y]);
|
|
9967
9998
|
const data = {
|
|
@@ -9976,7 +10007,8 @@ var getMergeMeaning = (allProjectionResults, wallLines, wallVerifyType, averageP
|
|
|
9976
10007
|
obb: null,
|
|
9977
10008
|
obj_id,
|
|
9978
10009
|
positionArr,
|
|
9979
|
-
isStaircaseBalconyRailing
|
|
10010
|
+
isStaircaseBalconyRailing,
|
|
10011
|
+
mapPosition: array[j]?.mapPosition
|
|
9980
10012
|
};
|
|
9981
10013
|
data.obb = getObb(data.path, data.center, data.h, (data.maxz + data.minz) / 2);
|
|
9982
10014
|
if (data.obb == null) continue;
|
|
@@ -15623,6 +15655,8 @@ var getWindowPcdData = (lines, pcdData) => {
|
|
|
15623
15655
|
if (maxIndex == -1)
|
|
15624
15656
|
continue;
|
|
15625
15657
|
const line2 = tmpLines[maxIndex];
|
|
15658
|
+
if (line2.length < 0.5)
|
|
15659
|
+
continue;
|
|
15626
15660
|
let ptStart = getPt3(line2.start);
|
|
15627
15661
|
let ptEnd = getPt3(line2.end);
|
|
15628
15662
|
ptStart.z = ptEnd.z = ptShortEd1.z;
|
|
@@ -15641,8 +15675,10 @@ var getWindowPcdData = (lines, pcdData) => {
|
|
|
15641
15675
|
tmpptShortEd1 = tmpptShortEd1.addScaledVector(vec1, 0.1);
|
|
15642
15676
|
tmpptShortSt2 = tmpptShortSt2.addScaledVector(vec2, -0.1);
|
|
15643
15677
|
tmpptShortEd2 = tmpptShortEd2.addScaledVector(vec2, 0.1);
|
|
15644
|
-
let
|
|
15645
|
-
let
|
|
15678
|
+
let pcdLen = ptLongSt1.distanceTo(ptLongEd1);
|
|
15679
|
+
let tmpTol = pcdLen > pcdToLineDist + 0.2 ? pcdToLineDist : 0.1;
|
|
15680
|
+
let intersect1 = segmentsIntersect2D(tmpptStart, tmpptEnd, tmpptShortSt1, tmpptShortEd1, tmpTol);
|
|
15681
|
+
let intersect2 = segmentsIntersect2D(tmpptStart, tmpptEnd, tmpptShortSt2, tmpptShortEd2, tmpTol);
|
|
15646
15682
|
let windowLocationIsTrue = true;
|
|
15647
15683
|
let windowData = {
|
|
15648
15684
|
p: null,
|
|
@@ -15703,6 +15739,10 @@ var getWindowPcdData = (lines, pcdData) => {
|
|
|
15703
15739
|
windowData.height = height;
|
|
15704
15740
|
windowData.width = ptWindowSt.distanceTo(ptWindowEd);
|
|
15705
15741
|
windowData.obj_id = pcd.obj_id;
|
|
15742
|
+
let lineMid = getMid(ptStart, ptEnd);
|
|
15743
|
+
let dist2 = lineMid.distanceTo(p);
|
|
15744
|
+
if (dist2 > line2.length / 2)
|
|
15745
|
+
continue;
|
|
15706
15746
|
if ((line2.isPassageEntrance || line2.inPassageEntranceDoor) && line2.passageEntrance && line2.passageEntrance.length == 1) {
|
|
15707
15747
|
const ret = checkWindowLocationIsTrue(windowData, line2.passageEntrance);
|
|
15708
15748
|
windowLocationIsTrue = ret.windowLocationIsTrue;
|