rm-graphical-computing-node 1.0.60 → 1.0.62
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 +17 -14
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6014,7 +6014,7 @@ var getColLine = async (lines, runDataList, collectDataPath, pointCloudCluster =
|
|
|
6014
6014
|
if (tmpLineData.checkResults.length != 1) continue;
|
|
6015
6015
|
lines2.push(tmpLineData);
|
|
6016
6016
|
}
|
|
6017
|
-
await penetratingTask(lines2, trajectoryObj, collectDataPath);
|
|
6017
|
+
await penetratingTask(lines2, trajectoryObj, collectDataPath, 0.5);
|
|
6018
6018
|
for (let i = 0; i < lines2.length; i++) {
|
|
6019
6019
|
let len = lines2[i].checkResults[0].allCenterPoints.length;
|
|
6020
6020
|
const allCenterPoints = lines2[i].allCenterPoints;
|
|
@@ -6051,13 +6051,13 @@ var getColLine = async (lines, runDataList, collectDataPath, pointCloudCluster =
|
|
|
6051
6051
|
}
|
|
6052
6052
|
return colDatas;
|
|
6053
6053
|
};
|
|
6054
|
-
var penetratingTask = async (finalLines, trajectoryObj, collectDataPath, type = "normal", diff = 0.01) => {
|
|
6054
|
+
var penetratingTask = async (finalLines, trajectoryObj, collectDataPath, offsetsNum = 0.5, type = "normal", diff = 0.01) => {
|
|
6055
6055
|
if (!finalLines.length) return finalLines;
|
|
6056
6056
|
for (let v2 = 0; v2 < finalLines.length; v2++) {
|
|
6057
6057
|
for (let i = 0; i < finalLines[v2].checkResults.length; i++) {
|
|
6058
6058
|
const offsets = [];
|
|
6059
6059
|
for (let t2 = 0; t2 < finalLines[v2].checkResults[i].originalVertices.length; t2++)
|
|
6060
|
-
offsets.push(
|
|
6060
|
+
offsets.push(offsetsNum);
|
|
6061
6061
|
finalLines[v2].checkResults[i].offsets = offsets;
|
|
6062
6062
|
}
|
|
6063
6063
|
}
|
|
@@ -8781,7 +8781,7 @@ var getMergeMeaning = (allProjectionResults, averagePz2, pointCloudCluster = nul
|
|
|
8781
8781
|
}
|
|
8782
8782
|
}
|
|
8783
8783
|
let mostFrequentEntry = [...mapSortPoint.entries()].reduce(
|
|
8784
|
-
(
|
|
8784
|
+
(max2, cur) => cur[1].num > max2[1].num ? cur : max2
|
|
8785
8785
|
);
|
|
8786
8786
|
points = [];
|
|
8787
8787
|
points = mostFrequentEntry[1].points.map((p) => [p.x, p.y]);
|
|
@@ -9370,7 +9370,7 @@ var getMergeFloorMeaning = (allProjectionResults) => {
|
|
|
9370
9370
|
}
|
|
9371
9371
|
}
|
|
9372
9372
|
let mostFrequentEntry = [...mapSortPoint.entries()].reduce(
|
|
9373
|
-
(
|
|
9373
|
+
(max2, cur) => cur[1].num > max2[1].num ? cur : max2
|
|
9374
9374
|
);
|
|
9375
9375
|
points = [];
|
|
9376
9376
|
points = mostFrequentEntry[1].points.map((p) => [p.x, p.y]);
|
|
@@ -10862,7 +10862,7 @@ function computeContour2(points) {
|
|
|
10862
10862
|
|
|
10863
10863
|
// src/geometry/slabLine.mjs
|
|
10864
10864
|
import * as THREE9 from "three";
|
|
10865
|
-
import { min } from "three/tsl";
|
|
10865
|
+
import { max, min } from "three/tsl";
|
|
10866
10866
|
var getSlabData = (lines, runDataList, pointCloudCluster = null, getOblique = false) => {
|
|
10867
10867
|
const flatSlabPoints = [];
|
|
10868
10868
|
const obliqueSlabPoints = [];
|
|
@@ -10915,7 +10915,7 @@ var getFlatSlabData = (lines, runDataList, pointCloudCluster = null) => {
|
|
|
10915
10915
|
}
|
|
10916
10916
|
}
|
|
10917
10917
|
let mostFrequentEntry = [...mapSortPoint.entries()].reduce(
|
|
10918
|
-
(
|
|
10918
|
+
(max2, cur) => cur[1].num > max2[1].num ? cur : max2
|
|
10919
10919
|
);
|
|
10920
10920
|
points = mostFrequentEntry[1].points.map((p) => new THREE9.Vector3(p.x, p.y, p.z));
|
|
10921
10921
|
let newPoints = [];
|
|
@@ -11107,7 +11107,7 @@ var getObliqueSlabData = (lines, runDataList, pointCloudCluster = null) => {
|
|
|
11107
11107
|
let mapSortPoint = /* @__PURE__ */ new Map();
|
|
11108
11108
|
for (let c = 0; c < newPoints[x].length; c++) {
|
|
11109
11109
|
let z = newPoints[x][c].z;
|
|
11110
|
-
z = Math.floor(z *
|
|
11110
|
+
z = Math.floor(z * 1e3) / 1e3;
|
|
11111
11111
|
if (mapSortPoint.has(z)) {
|
|
11112
11112
|
const item = mapSortPoint.get(z);
|
|
11113
11113
|
item.num += 1;
|
|
@@ -11124,9 +11124,8 @@ var getObliqueSlabData = (lines, runDataList, pointCloudCluster = null) => {
|
|
|
11124
11124
|
let minZ = 0;
|
|
11125
11125
|
let maxZ = 0;
|
|
11126
11126
|
for (const [z, item] of mapSortPoint) {
|
|
11127
|
-
if (item.num > numMax || item.num >
|
|
11128
|
-
|
|
11129
|
-
minZ = ret.minZ;
|
|
11127
|
+
if (item.num > numMax || item.num > 100) {
|
|
11128
|
+
minZ = z;
|
|
11130
11129
|
break;
|
|
11131
11130
|
}
|
|
11132
11131
|
}
|
|
@@ -11134,12 +11133,16 @@ var getObliqueSlabData = (lines, runDataList, pointCloudCluster = null) => {
|
|
|
11134
11133
|
[...mapSortPoint].sort((a, b) => b[0] - a[0])
|
|
11135
11134
|
);
|
|
11136
11135
|
for (const [z, item] of mapSortPoint) {
|
|
11137
|
-
if (item.num > numMax || item.num >
|
|
11138
|
-
|
|
11139
|
-
maxZ = ret.maxZ;
|
|
11136
|
+
if (item.num > numMax || item.num > 100) {
|
|
11137
|
+
maxZ = z;
|
|
11140
11138
|
break;
|
|
11141
11139
|
}
|
|
11142
11140
|
}
|
|
11141
|
+
if (minZ == 0 || maxZ == 0) {
|
|
11142
|
+
const ret = getPointsMinAndMax(newPoints[x]);
|
|
11143
|
+
minZ = minZ == 0 ? ret.minZ : minZ;
|
|
11144
|
+
maxZ = maxZ == 0 ? ret.maxZ : maxZ;
|
|
11145
|
+
}
|
|
11143
11146
|
slabDatas.push({
|
|
11144
11147
|
// points: newPoints[x],
|
|
11145
11148
|
contour: path3,
|