rm-graphical-computing-node 1.0.122 → 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 +28 -5
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -9645,14 +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
|
|
9648
|
+
let threePointsStr = [];
|
|
9649
9649
|
for (let u4 = 0; u4 < allProjectionResults[i].points.length; u4++) {
|
|
9650
9650
|
threePoints.push(new THREE8.Vector3(
|
|
9651
9651
|
allProjectionResults[i].points[u4].x,
|
|
9652
9652
|
allProjectionResults[i].points[u4].y,
|
|
9653
9653
|
allProjectionResults[i].points[u4].z
|
|
9654
9654
|
));
|
|
9655
|
-
|
|
9655
|
+
threePointsStr.push(`${allProjectionResults[i].points[u4].x},${allProjectionResults[i].points[u4].y},${allProjectionResults[i].points[u4].z}`);
|
|
9656
9656
|
}
|
|
9657
9657
|
if (wallLines && wallLines.length && wallVerifyType && wallVerifyType.length && wallVerifyType.includes(word)) {
|
|
9658
9658
|
threePoints = checkNearObjects(wallLines, threePoints);
|
|
@@ -9687,7 +9687,7 @@ var getMergeMeaning = (allProjectionResults, wallLines, wallVerifyType, averageP
|
|
|
9687
9687
|
let mapPosition = /* @__PURE__ */ new Map();
|
|
9688
9688
|
mapPosition.set(
|
|
9689
9689
|
`${allProjectionResults[i].position.x},${allProjectionResults[i].position.y},${allProjectionResults[i].position.z}`,
|
|
9690
|
-
|
|
9690
|
+
threePointsStr
|
|
9691
9691
|
);
|
|
9692
9692
|
const data = {
|
|
9693
9693
|
points: threePoints,
|
|
@@ -9871,14 +9871,16 @@ var getMergeMeaning = (allProjectionResults, wallLines, wallVerifyType, averageP
|
|
|
9871
9871
|
delData.add(k);
|
|
9872
9872
|
let nowIndex = cloneData.points.length;
|
|
9873
9873
|
let threePoints = [];
|
|
9874
|
+
let threePointsStr = [];
|
|
9874
9875
|
for (let m = 0; m < array[k].points.length; m++) {
|
|
9875
9876
|
if (array[k].points[m].z > averagePz2 && array[k].points[m].z - averagePz2 > 0.1 || cloneData.type == "floor" || cloneData.type == "Staircase") {
|
|
9876
9877
|
cloneData.points.push(array[k].points[m]);
|
|
9877
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}`);
|
|
9878
9880
|
}
|
|
9879
9881
|
}
|
|
9880
9882
|
if (cloneData.type != "floor") {
|
|
9881
|
-
cloneData.mapPosition.set(`${array[k].positionArr[0].x},${array[k].positionArr[0].y},${array[k].positionArr[0].z}`,
|
|
9883
|
+
cloneData.mapPosition.set(`${array[k].positionArr[0].x},${array[k].positionArr[0].y},${array[k].positionArr[0].z}`, threePointsStr);
|
|
9882
9884
|
}
|
|
9883
9885
|
let tmpPoints = cloneData.points.map((p) => [p.x, p.y]);
|
|
9884
9886
|
if (cloneData.type == "floor") {
|
|
@@ -10329,6 +10331,27 @@ var getMergeMeaning = (allProjectionResults, wallLines, wallVerifyType, averageP
|
|
|
10329
10331
|
for (let i = 0; i < pcdPointsArr.length; i++) {
|
|
10330
10332
|
const array = pcdPointsArr[i].array;
|
|
10331
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
|
+
}
|
|
10332
10355
|
retPcdPointArr.push({
|
|
10333
10356
|
obbBox: array[j].obb,
|
|
10334
10357
|
box: new THREE8.Box3().setFromPoints(array[j].points),
|
|
@@ -10339,7 +10362,7 @@ var getMergeMeaning = (allProjectionResults, wallLines, wallVerifyType, averageP
|
|
|
10339
10362
|
pcdPoints: array[j].points,
|
|
10340
10363
|
positionArr: array[j].positionArr,
|
|
10341
10364
|
isStaircaseBalconyRailing: array[j].isStaircaseBalconyRailing,
|
|
10342
|
-
mapPosition:
|
|
10365
|
+
mapPosition: mapTmp
|
|
10343
10366
|
});
|
|
10344
10367
|
}
|
|
10345
10368
|
}
|