rm-graphical-computing-node 1.0.63 → 1.0.65
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 +55 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -11120,7 +11120,7 @@ var getObliqueSlabData = (lines, runDataList, pointCloudCluster = null) => {
|
|
|
11120
11120
|
mapSortPoint = new Map(
|
|
11121
11121
|
[...mapSortPoint.entries()].sort((a, b) => a[0] - b[0])
|
|
11122
11122
|
);
|
|
11123
|
-
let numMax = newPoints[x].length /
|
|
11123
|
+
let numMax = newPoints[x].length / 1e3;
|
|
11124
11124
|
let minZ = 0;
|
|
11125
11125
|
let maxZ = 0;
|
|
11126
11126
|
for (const [z, item] of mapSortPoint) {
|
|
@@ -11844,6 +11844,59 @@ var getWindowData = (lines, pcdData, lineReader) => {
|
|
|
11844
11844
|
lines.push(...tmpLines);
|
|
11845
11845
|
return { lines, pcdData };
|
|
11846
11846
|
};
|
|
11847
|
+
var checkWindowAndDoorIsTrue = async (lines, runDataList, collectDataPath, pointCloudCluster = null) => {
|
|
11848
|
+
if (!lines.length)
|
|
11849
|
+
return;
|
|
11850
|
+
const windowLines = [];
|
|
11851
|
+
for (let i = 0; i < lines.length; i++) {
|
|
11852
|
+
const line2 = lines[i];
|
|
11853
|
+
if (line2.drawWindow && line2.drawWindow.length || line2.drawDoorData && line2.drawDoorData.start) {
|
|
11854
|
+
line2.saveExistSegments = true;
|
|
11855
|
+
getOneLineCheckResults(line2, false);
|
|
11856
|
+
line2.checkResults = line2.existSegments;
|
|
11857
|
+
windowLines.push(line2);
|
|
11858
|
+
}
|
|
11859
|
+
}
|
|
11860
|
+
let trajectoryObj = {};
|
|
11861
|
+
for (let r = 0; r < runDataList.length; r++) {
|
|
11862
|
+
trajectoryObj[r] = runDataList[r];
|
|
11863
|
+
}
|
|
11864
|
+
await penetratingTask(windowLines, trajectoryObj, collectDataPath, 1);
|
|
11865
|
+
for (let i = 0; i < windowLines.length; i++) {
|
|
11866
|
+
let len = 0;
|
|
11867
|
+
for (let u4 = 0; u4 < windowLines[i].checkResults.length; u4++)
|
|
11868
|
+
len = windowLines[i].checkResults[u4].allCenterPoints.length;
|
|
11869
|
+
const allCenterPoints = windowLines[i].allCenterPoints;
|
|
11870
|
+
let newPoints = [];
|
|
11871
|
+
if (pointCloudCluster != null) {
|
|
11872
|
+
let clusterResult = pointCloudCluster([allCenterPoints], {
|
|
11873
|
+
tolerance: 0.2,
|
|
11874
|
+
minClusterSize: 30,
|
|
11875
|
+
maxClusterSize: 1e7,
|
|
11876
|
+
threadCount: 1
|
|
11877
|
+
});
|
|
11878
|
+
if (clusterResult.length > 0) {
|
|
11879
|
+
let maxNum = 0;
|
|
11880
|
+
for (const cluster of clusterResult[0]) {
|
|
11881
|
+
if (cluster.length < 50) continue;
|
|
11882
|
+
const newOriginalPoints = cluster.map((i2) => allCenterPoints[i2]);
|
|
11883
|
+
if (maxNum < newOriginalPoints.length) {
|
|
11884
|
+
maxNum = newOriginalPoints.length;
|
|
11885
|
+
newPoints = newOriginalPoints;
|
|
11886
|
+
}
|
|
11887
|
+
}
|
|
11888
|
+
} else
|
|
11889
|
+
newPoints = allCenterPoints;
|
|
11890
|
+
} else
|
|
11891
|
+
newPoints = allCenterPoints;
|
|
11892
|
+
let retNum = newPoints.length;
|
|
11893
|
+
let ps = retNum / len * 100;
|
|
11894
|
+
if (ps < 60) {
|
|
11895
|
+
windowLines[i].isRebuild = true;
|
|
11896
|
+
}
|
|
11897
|
+
}
|
|
11898
|
+
return lines;
|
|
11899
|
+
};
|
|
11847
11900
|
|
|
11848
11901
|
// src/wall-window-matcher/utils.ts
|
|
11849
11902
|
function dist2D(a, b) {
|
|
@@ -18026,6 +18079,7 @@ export {
|
|
|
18026
18079
|
attachWindows,
|
|
18027
18080
|
calcAngle3 as calcAngle,
|
|
18028
18081
|
checkBeamIsReasonable,
|
|
18082
|
+
checkWindowAndDoorIsTrue,
|
|
18029
18083
|
classifyWallByPointCloudPCA,
|
|
18030
18084
|
processPipeline2 as classifyWallShapes,
|
|
18031
18085
|
computeContour2 as computeContour,
|