rm-graphical-computing-node 1.0.93 → 1.0.94
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 +21 -6
- package/package.json +1 -2
package/dist/index.mjs
CHANGED
|
@@ -11724,7 +11724,7 @@ var getWindowData = (lines, pcdData, lineReader) => {
|
|
|
11724
11724
|
for (let i = 0; i < pcdData.length; i++) {
|
|
11725
11725
|
const window = pcdData[i];
|
|
11726
11726
|
window.isFindWindow = false;
|
|
11727
|
-
if (window.category == "window" && !window.isBayWindowObj) {
|
|
11727
|
+
if (window.category == "window" && !window.isBayWindowObj && !window.isFilterWindow) {
|
|
11728
11728
|
let boxPoints = [];
|
|
11729
11729
|
window.coordinatesByArea.coordinates.forEach((p) => {
|
|
11730
11730
|
boxPoints.push(new THREE10.Vector3(p.x, p.y, p.z));
|
|
@@ -12368,7 +12368,7 @@ var getWindowPcdData = (lines, pcdData) => {
|
|
|
12368
12368
|
const pcdToLineDist = 0.3;
|
|
12369
12369
|
for (let i = 0; i < pcdData.length; i++) {
|
|
12370
12370
|
const pcd = pcdData[i];
|
|
12371
|
-
if (pcd.category != "window" || pcd.isBayWindowObj || pcd.isFindWindow)
|
|
12371
|
+
if (pcd.category != "window" || pcd.isBayWindowObj || pcd.isFindWindow || pcd.isFilterWindow)
|
|
12372
12372
|
continue;
|
|
12373
12373
|
let ptArray = pcd.coordinatesByArea.coordinates;
|
|
12374
12374
|
let minZ = pcd.coordinatesByArea.heightData.minZ;
|
|
@@ -12457,8 +12457,23 @@ var getWindowPcdData = (lines, pcdData) => {
|
|
|
12457
12457
|
let ptStart = getPt3(line2.start);
|
|
12458
12458
|
let ptEnd = getPt3(line2.end);
|
|
12459
12459
|
ptStart.z = ptEnd.z = ptShortEd1.z;
|
|
12460
|
-
let
|
|
12461
|
-
let
|
|
12460
|
+
let tmpptStart = ptStart.clone();
|
|
12461
|
+
let tmpptEnd = ptEnd.clone();
|
|
12462
|
+
let tmpptShortSt1 = ptShortSt1.clone();
|
|
12463
|
+
let tmpptShortEd1 = ptShortEd1.clone();
|
|
12464
|
+
let tmpptShortSt2 = ptShortSt2.clone();
|
|
12465
|
+
let tmpptShortEd2 = ptShortEd2.clone();
|
|
12466
|
+
let vec1 = getVector3(tmpptShortSt1, tmpptShortEd1);
|
|
12467
|
+
let vec2 = getVector3(tmpptShortSt2, tmpptShortEd2);
|
|
12468
|
+
let vec32 = getVector3(tmpptStart, tmpptEnd);
|
|
12469
|
+
tmpptStart = tmpptStart.addScaledVector(vec32, -0.1);
|
|
12470
|
+
tmpptEnd = tmpptEnd.addScaledVector(vec32, 0.1);
|
|
12471
|
+
tmpptShortSt1 = tmpptShortSt1.addScaledVector(vec1, -0.1);
|
|
12472
|
+
tmpptShortEd1 = tmpptShortEd1.addScaledVector(vec1, 0.1);
|
|
12473
|
+
tmpptShortSt2 = tmpptShortSt2.addScaledVector(vec2, -0.1);
|
|
12474
|
+
tmpptShortEd2 = tmpptShortEd2.addScaledVector(vec2, 0.1);
|
|
12475
|
+
let intersect1 = segmentsIntersect2D(tmpptStart, tmpptEnd, tmpptShortSt1, tmpptShortEd1, pcdToLineDist);
|
|
12476
|
+
let intersect2 = segmentsIntersect2D(tmpptStart, tmpptEnd, tmpptShortSt2, tmpptShortEd2, pcdToLineDist);
|
|
12462
12477
|
if (intersect1 != null && intersect2 != null) {
|
|
12463
12478
|
if (line2.mergeIndexs) {
|
|
12464
12479
|
let tmpIndex = [];
|
|
@@ -12513,9 +12528,9 @@ var getWindowPcdData = (lines, pcdData) => {
|
|
|
12513
12528
|
}
|
|
12514
12529
|
let line3 = new THREE10.Line3(ptStart, ptEnd);
|
|
12515
12530
|
let ptClose = line3.closestPointToPoint(pcdMid, false, new THREE10.Vector3());
|
|
12516
|
-
let
|
|
12531
|
+
let vec4 = getVector3(ptWindowSt, ptClose);
|
|
12517
12532
|
let width = ptMid1.distanceTo(ptMid2);
|
|
12518
|
-
let ptWindowEd = ptWindowSt.clone().addScaledVector(
|
|
12533
|
+
let ptWindowEd = ptWindowSt.clone().addScaledVector(vec4, width);
|
|
12519
12534
|
let groundClearance = minZ - line2.start.z;
|
|
12520
12535
|
groundClearance = groundClearance > 0.01 ? groundClearance : 0;
|
|
12521
12536
|
if (!line2.drawWindow)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rm-graphical-computing-node",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.94",
|
|
4
4
|
"description": "墙体/梁线/点云语义计算库(依赖 Python 与 three.js)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.mjs",
|
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
"geojson-minimum-bounding-rectangle": "^2.0.3",
|
|
23
23
|
"rm-gxf-computing-rusts": "^0.0.61",
|
|
24
24
|
"rm-point-cloud-calculation": "^1.0.4",
|
|
25
|
-
"rm-point-cloud-calculation-napi": "^1.0.15",
|
|
26
25
|
"three": "^0.184.0"
|
|
27
26
|
},
|
|
28
27
|
"devDependencies": {
|