rm-graphical-computing-node 1.0.83 → 1.0.85
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 +24 -5
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -5812,8 +5812,26 @@ var getColLine = async (lines, runDataList, collectDataPath, pointCloudCluster =
|
|
|
5812
5812
|
y: p.y
|
|
5813
5813
|
})
|
|
5814
5814
|
});
|
|
5815
|
+
function lineSkip(line2) {
|
|
5816
|
+
if (!line2 || line2.isDoor || line2.doorAndBeamData && line2.doorAndBeamData.length > 0 || line2.drawWindow && line2.drawWindow.length > 0 || line2.isHoleWindow)
|
|
5817
|
+
return true;
|
|
5818
|
+
return false;
|
|
5819
|
+
}
|
|
5815
5820
|
for (let i = 0; i < result.length; i++) {
|
|
5816
|
-
|
|
5821
|
+
result[i].isSkip = false;
|
|
5822
|
+
if (result[i].uuids.length < 4 || result[i].area < minArea || result[i].area > maxArea) {
|
|
5823
|
+
result[i].isSkip = true;
|
|
5824
|
+
continue;
|
|
5825
|
+
}
|
|
5826
|
+
for (let j = 0; j < result[i].lineIndexes.length; j++) {
|
|
5827
|
+
if (lineSkip(lines[result[i].lineIndexes[j]])) {
|
|
5828
|
+
result[i].isSkip = true;
|
|
5829
|
+
break;
|
|
5830
|
+
}
|
|
5831
|
+
}
|
|
5832
|
+
}
|
|
5833
|
+
for (let i = 0; i < result.length; i++) {
|
|
5834
|
+
if (result[i].isSkip)
|
|
5817
5835
|
continue;
|
|
5818
5836
|
let isRect = false;
|
|
5819
5837
|
let overlapWallLines = [];
|
|
@@ -6134,7 +6152,7 @@ var getColLine = async (lines, runDataList, collectDataPath, pointCloudCluster =
|
|
|
6134
6152
|
if (tmpLineData.checkResults.length != 1) continue;
|
|
6135
6153
|
lines2.push(tmpLineData);
|
|
6136
6154
|
}
|
|
6137
|
-
await penetratingTask(lines2, trajectoryObj, collectDataPath, 0.
|
|
6155
|
+
await penetratingTask(lines2, trajectoryObj, collectDataPath, 0.3);
|
|
6138
6156
|
for (let i = 0; i < lines2.length; i++) {
|
|
6139
6157
|
let len = lines2[i].checkResults[0].allCenterPoints.length;
|
|
6140
6158
|
const allCenterPoints = lines2[i].allCenterPoints;
|
|
@@ -12487,6 +12505,7 @@ import { randomUUID as randomUUID2 } from "crypto";
|
|
|
12487
12505
|
var getDoorPcdData = (lines, pcdData) => {
|
|
12488
12506
|
if (!lines || !lines.length || !pcdData || !pcdData.length)
|
|
12489
12507
|
return lines;
|
|
12508
|
+
const pcdToLineDist = 0.1;
|
|
12490
12509
|
for (let i = 0; i < pcdData.length; i++) {
|
|
12491
12510
|
const pcd = pcdData[i];
|
|
12492
12511
|
if (pcd.category != "door" || pcd.isFindBeam)
|
|
@@ -12524,7 +12543,7 @@ var getDoorPcdData = (lines, pcdData) => {
|
|
|
12524
12543
|
let ptEnd2 = getPt3(line3.end);
|
|
12525
12544
|
ptStart2.z = ptEnd2.z = ptMid1.z;
|
|
12526
12545
|
let classify = classifySegments(ptMid1, ptMid2, ptStart2, ptEnd2);
|
|
12527
|
-
if (classify.type == "collinear_overlap" && classify.maxPerpendicularDistance <
|
|
12546
|
+
if (classify.type == "collinear_overlap" && classify.maxPerpendicularDistance < pcdToLineDist) {
|
|
12528
12547
|
eligibilityLines.push(line3);
|
|
12529
12548
|
eligibilityLinesIndexs.push(j);
|
|
12530
12549
|
}
|
|
@@ -12556,8 +12575,8 @@ var getDoorPcdData = (lines, pcdData) => {
|
|
|
12556
12575
|
const line2 = tmpLines[maxIndex];
|
|
12557
12576
|
let ptStart = getPt3(line2.start);
|
|
12558
12577
|
let ptEnd = getPt3(line2.end);
|
|
12559
|
-
let intersect1 = segmentsIntersect2D(ptStart, ptEnd, ptShortSt1, ptShortEd1,
|
|
12560
|
-
let intersect2 = segmentsIntersect2D(ptStart, ptEnd, ptShortSt2, ptShortEd2,
|
|
12578
|
+
let intersect1 = segmentsIntersect2D(ptStart, ptEnd, ptShortSt1, ptShortEd1, pcdToLineDist);
|
|
12579
|
+
let intersect2 = segmentsIntersect2D(ptStart, ptEnd, ptShortSt2, ptShortEd2, pcdToLineDist);
|
|
12561
12580
|
if (intersect1 != null && intersect2 != null) {
|
|
12562
12581
|
if (line2.mergeIndexs) {
|
|
12563
12582
|
let tmpIndex = [];
|