rm-graphical-computing-node 1.0.99 → 1.0.100
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 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6237,7 +6237,7 @@ var getColLine = async (lines, runDataList, collectDataPath, pointCloudCluster =
|
|
|
6237
6237
|
if (tmpLineData.checkResults.length != 1) continue;
|
|
6238
6238
|
lines2.push(tmpLineData);
|
|
6239
6239
|
}
|
|
6240
|
-
await penetratingTask(lines2, trajectoryObj, collectDataPath, 0.
|
|
6240
|
+
await penetratingTask(lines2, trajectoryObj, collectDataPath, 0.2);
|
|
6241
6241
|
for (let i = 0; i < lines2.length; i++) {
|
|
6242
6242
|
let len = lines2[i].checkResults[0].allCenterPoints.length;
|
|
6243
6243
|
const allCenterPoints = lines2[i].allCenterPoints;
|
|
@@ -6272,7 +6272,7 @@ var getColLine = async (lines, runDataList, collectDataPath, pointCloudCluster =
|
|
|
6272
6272
|
}
|
|
6273
6273
|
colDatas.threeEdgeRect = colDatas.threeEdgeRect.filter((p) => !p.isDel);
|
|
6274
6274
|
}
|
|
6275
|
-
return colDatas;
|
|
6275
|
+
return { colDatas, lines };
|
|
6276
6276
|
};
|
|
6277
6277
|
var penetratingTask = async (finalLines, trajectoryObj, collectDataPath, offsetsNum = 0.5, type = "normal", diff = 0.01) => {
|
|
6278
6278
|
if (!finalLines.length) return finalLines;
|
|
@@ -9595,6 +9595,30 @@ var getMergeMeaning = (allProjectionResults, averagePz2, pointCloudCluster = nul
|
|
|
9595
9595
|
}
|
|
9596
9596
|
return retPcdPointArr;
|
|
9597
9597
|
};
|
|
9598
|
+
var checkSwitchSizeIsTrue = (retPcdPointArr) => {
|
|
9599
|
+
for (let i = 0; i < retPcdPointArr.length; i++) {
|
|
9600
|
+
const pcd = retPcdPointArr[i];
|
|
9601
|
+
if (!pcd.direction || !pcd.obj_id.includes("switch"))
|
|
9602
|
+
continue;
|
|
9603
|
+
let direction = getPt3(pcd.direction);
|
|
9604
|
+
const size = new THREE8.Vector3();
|
|
9605
|
+
pcd.obbBox.getSize(size);
|
|
9606
|
+
const e = pcd.obbBox.rotation.elements;
|
|
9607
|
+
const xAxis = new THREE8.Vector3(e[0], e[1], e[2]).multiplyScalar(size.x);
|
|
9608
|
+
const yAxis = new THREE8.Vector3(e[3], e[4], e[5]).multiplyScalar(size.y);
|
|
9609
|
+
console.log(xAxis, yAxis, size);
|
|
9610
|
+
let isPX = isParallel(xAxis, direction);
|
|
9611
|
+
let isPY = isParallel(yAxis, direction);
|
|
9612
|
+
if (isPX.parallel && (size.x > 0.06 || size.y < 0.05)) {
|
|
9613
|
+
pcd.isDel = true;
|
|
9614
|
+
} else if (isPY.parallel && (size.y > 0.06 || size.x < 0.05)) {
|
|
9615
|
+
pcd.isDel = true;
|
|
9616
|
+
}
|
|
9617
|
+
if (size.z > 0.3)
|
|
9618
|
+
pcd.isDel = true;
|
|
9619
|
+
}
|
|
9620
|
+
return retPcdPointArr.filter((item) => !item.isDel);
|
|
9621
|
+
};
|
|
9598
9622
|
var getMergeFloorMeaning = (allProjectionResults) => {
|
|
9599
9623
|
if (allProjectionResults.length == 0) return [];
|
|
9600
9624
|
const pcdPointsArr = [];
|
|
@@ -14454,6 +14478,7 @@ var getWindowPcdData = (lines, pcdData) => {
|
|
|
14454
14478
|
let eligibilityLinesIndexs = [];
|
|
14455
14479
|
for (let j = 0; j < lines.length; j++) {
|
|
14456
14480
|
const line3 = lines[j];
|
|
14481
|
+
if (line3.isRebuild) continue;
|
|
14457
14482
|
let ptStart2 = getPt3(line3.start);
|
|
14458
14483
|
let ptEnd2 = getPt3(line3.end);
|
|
14459
14484
|
ptStart2.z = ptEnd2.z = ptMid1.z;
|
|
@@ -21214,6 +21239,7 @@ export {
|
|
|
21214
21239
|
attachWindows,
|
|
21215
21240
|
calcAngle3 as calcAngle,
|
|
21216
21241
|
checkBeamIsReasonable,
|
|
21242
|
+
checkSwitchSizeIsTrue,
|
|
21217
21243
|
checkWindowAndDoorIsTrue,
|
|
21218
21244
|
classifyWallByPointCloudPCA,
|
|
21219
21245
|
processPipeline2 as classifyWallShapes,
|