rm-graphical-computing-node 1.0.121 → 1.0.123
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 +42 -3
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -9645,12 +9645,14 @@ var getMergeMeaning = (allProjectionResults, wallLines, wallVerifyType, averageP
|
|
|
9645
9645
|
if (word === "wall" || word === "stair guardrail")
|
|
9646
9646
|
continue;
|
|
9647
9647
|
let threePoints = [];
|
|
9648
|
+
let threePointsStr = [];
|
|
9648
9649
|
for (let u4 = 0; u4 < allProjectionResults[i].points.length; u4++) {
|
|
9649
9650
|
threePoints.push(new THREE8.Vector3(
|
|
9650
9651
|
allProjectionResults[i].points[u4].x,
|
|
9651
9652
|
allProjectionResults[i].points[u4].y,
|
|
9652
9653
|
allProjectionResults[i].points[u4].z
|
|
9653
9654
|
));
|
|
9655
|
+
threePointsStr.push(`${allProjectionResults[i].points[u4].x},${allProjectionResults[i].points[u4].y},${allProjectionResults[i].points[u4].z}`);
|
|
9654
9656
|
}
|
|
9655
9657
|
if (wallLines && wallLines.length && wallVerifyType && wallVerifyType.length && wallVerifyType.includes(word)) {
|
|
9656
9658
|
threePoints = checkNearObjects(wallLines, threePoints);
|
|
@@ -9682,6 +9684,11 @@ var getMergeMeaning = (allProjectionResults, wallLines, wallVerifyType, averageP
|
|
|
9682
9684
|
if (threePoints.length === 0)
|
|
9683
9685
|
continue;
|
|
9684
9686
|
const centerData = getCenterAndPointHeight(threePoints);
|
|
9687
|
+
let mapPosition = /* @__PURE__ */ new Map();
|
|
9688
|
+
mapPosition.set(
|
|
9689
|
+
`${allProjectionResults[i].position.x},${allProjectionResults[i].position.y},${allProjectionResults[i].position.z}`,
|
|
9690
|
+
threePointsStr
|
|
9691
|
+
);
|
|
9685
9692
|
const data = {
|
|
9686
9693
|
points: threePoints,
|
|
9687
9694
|
path: computeContour(points),
|
|
@@ -9696,7 +9703,8 @@ var getMergeMeaning = (allProjectionResults, wallLines, wallVerifyType, averageP
|
|
|
9696
9703
|
isDel: false,
|
|
9697
9704
|
obj_id,
|
|
9698
9705
|
positionArr: [allProjectionResults[i].position],
|
|
9699
|
-
isStaircaseBalconyRailing: false
|
|
9706
|
+
isStaircaseBalconyRailing: false,
|
|
9707
|
+
mapPosition
|
|
9700
9708
|
// isObliqueCeiling,
|
|
9701
9709
|
// pointPercent,
|
|
9702
9710
|
// pointsNormal
|
|
@@ -9861,9 +9869,18 @@ var getMergeMeaning = (allProjectionResults, wallLines, wallVerifyType, averageP
|
|
|
9861
9869
|
}
|
|
9862
9870
|
if (isMerge) {
|
|
9863
9871
|
delData.add(k);
|
|
9872
|
+
let nowIndex = cloneData.points.length;
|
|
9873
|
+
let threePoints = [];
|
|
9874
|
+
let threePointsStr = [];
|
|
9864
9875
|
for (let m = 0; m < array[k].points.length; m++) {
|
|
9865
|
-
if (array[k].points[m].z > averagePz2 && array[k].points[m].z - averagePz2 > 0.1 || cloneData.type == "floor" || cloneData.type == "Staircase")
|
|
9876
|
+
if (array[k].points[m].z > averagePz2 && array[k].points[m].z - averagePz2 > 0.1 || cloneData.type == "floor" || cloneData.type == "Staircase") {
|
|
9866
9877
|
cloneData.points.push(array[k].points[m]);
|
|
9878
|
+
threePoints.push(array[k].points[m]);
|
|
9879
|
+
threePointsStr.push(`${array[k].points[m].x},${array[k].points[m].y},${array[k].points[m].z}`);
|
|
9880
|
+
}
|
|
9881
|
+
}
|
|
9882
|
+
if (cloneData.type != "floor") {
|
|
9883
|
+
cloneData.mapPosition.set(`${array[k].positionArr[0].x},${array[k].positionArr[0].y},${array[k].positionArr[0].z}`, threePointsStr);
|
|
9867
9884
|
}
|
|
9868
9885
|
let tmpPoints = cloneData.points.map((p) => [p.x, p.y]);
|
|
9869
9886
|
if (cloneData.type == "floor") {
|
|
@@ -10314,6 +10331,27 @@ var getMergeMeaning = (allProjectionResults, wallLines, wallVerifyType, averageP
|
|
|
10314
10331
|
for (let i = 0; i < pcdPointsArr.length; i++) {
|
|
10315
10332
|
const array = pcdPointsArr[i].array;
|
|
10316
10333
|
for (let j = 0; j < array.length; j++) {
|
|
10334
|
+
const allPtIndexMap = /* @__PURE__ */ new Map();
|
|
10335
|
+
array[j].points.forEach((item, index) => {
|
|
10336
|
+
const ptStr = `${item.x},${item.y},${item.z}`;
|
|
10337
|
+
if (!allPtIndexMap.has(ptStr)) {
|
|
10338
|
+
allPtIndexMap.set(ptStr, index);
|
|
10339
|
+
}
|
|
10340
|
+
});
|
|
10341
|
+
const mapTmp = /* @__PURE__ */ new Map();
|
|
10342
|
+
if (array[j].mapPosition) {
|
|
10343
|
+
for (const [key, value] of array[j].mapPosition) {
|
|
10344
|
+
const indexes = value.reduce((result, item) => {
|
|
10345
|
+
if (allPtIndexMap.has(item)) {
|
|
10346
|
+
result.push(allPtIndexMap.get(item));
|
|
10347
|
+
}
|
|
10348
|
+
return result;
|
|
10349
|
+
}, []);
|
|
10350
|
+
if (indexes.length > 0) {
|
|
10351
|
+
mapTmp.set(key, indexes);
|
|
10352
|
+
}
|
|
10353
|
+
}
|
|
10354
|
+
}
|
|
10317
10355
|
retPcdPointArr.push({
|
|
10318
10356
|
obbBox: array[j].obb,
|
|
10319
10357
|
box: new THREE8.Box3().setFromPoints(array[j].points),
|
|
@@ -10323,7 +10361,8 @@ var getMergeMeaning = (allProjectionResults, wallLines, wallVerifyType, averageP
|
|
|
10323
10361
|
obj_id: array[j].obj_id,
|
|
10324
10362
|
pcdPoints: array[j].points,
|
|
10325
10363
|
positionArr: array[j].positionArr,
|
|
10326
|
-
isStaircaseBalconyRailing: array[j].isStaircaseBalconyRailing
|
|
10364
|
+
isStaircaseBalconyRailing: array[j].isStaircaseBalconyRailing,
|
|
10365
|
+
mapPosition: mapTmp
|
|
10327
10366
|
});
|
|
10328
10367
|
}
|
|
10329
10368
|
}
|