rm-graphical-computing-node 1.0.94 → 1.0.96
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 +56 -29
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -9268,6 +9268,9 @@ var getMergeMeaning = (allProjectionResults, averagePz2, pointCloudCluster = nul
|
|
|
9268
9268
|
if (type2 === "window sill" && containsObbPoints(obb2, array1[e].points)) {
|
|
9269
9269
|
continue;
|
|
9270
9270
|
}
|
|
9271
|
+
if (type2 === "window sill" && obb1.intersectsOBB(obb2)) {
|
|
9272
|
+
continue;
|
|
9273
|
+
}
|
|
9271
9274
|
} else if (type1 === "door") {
|
|
9272
9275
|
if (type2 === "window") {
|
|
9273
9276
|
if (type2 === "window" && containsObbPoints(obb1, array2[k].points)) {
|
|
@@ -9300,19 +9303,6 @@ var getMergeMeaning = (allProjectionResults, averagePz2, pointCloudCluster = nul
|
|
|
9300
9303
|
continue;
|
|
9301
9304
|
}
|
|
9302
9305
|
}
|
|
9303
|
-
} else if (type2 === "door") {
|
|
9304
|
-
if (containsObbPoints(obb1, array2[k].points)) {
|
|
9305
|
-
array1[e].isDel = true;
|
|
9306
|
-
break;
|
|
9307
|
-
}
|
|
9308
|
-
if (containsObbPoints(obb2, array1[e].points)) {
|
|
9309
|
-
array1[e].isDel = true;
|
|
9310
|
-
break;
|
|
9311
|
-
}
|
|
9312
|
-
if (obb1.intersectsOBB(obb2)) {
|
|
9313
|
-
array1[e].isDel = true;
|
|
9314
|
-
break;
|
|
9315
|
-
}
|
|
9316
9306
|
} else if (type1 === "window sill") {
|
|
9317
9307
|
if (type2 === "window")
|
|
9318
9308
|
continue;
|
|
@@ -9334,6 +9324,9 @@ var getMergeMeaning = (allProjectionResults, averagePz2, pointCloudCluster = nul
|
|
|
9334
9324
|
if (type2 === "balcony railing" && containsObbPoints(obb2, array1[e].points)) {
|
|
9335
9325
|
continue;
|
|
9336
9326
|
}
|
|
9327
|
+
if (type2 === "balcony railing" && obb1.intersectsOBB(obb2)) {
|
|
9328
|
+
continue;
|
|
9329
|
+
}
|
|
9337
9330
|
if (type2 === "pipe" && containsObbPoints(obb1, array2[k].points)) {
|
|
9338
9331
|
continue;
|
|
9339
9332
|
}
|
|
@@ -9363,6 +9356,19 @@ var getMergeMeaning = (allProjectionResults, averagePz2, pointCloudCluster = nul
|
|
|
9363
9356
|
if (type2 === "window sill" && obb1.intersectsOBB(obb2)) {
|
|
9364
9357
|
continue;
|
|
9365
9358
|
}
|
|
9359
|
+
} else if (type2 === "door") {
|
|
9360
|
+
if (containsObbPoints(obb1, array2[k].points)) {
|
|
9361
|
+
array1[e].isDel = true;
|
|
9362
|
+
break;
|
|
9363
|
+
}
|
|
9364
|
+
if (containsObbPoints(obb2, array1[e].points)) {
|
|
9365
|
+
array1[e].isDel = true;
|
|
9366
|
+
break;
|
|
9367
|
+
}
|
|
9368
|
+
if (obb1.intersectsOBB(obb2)) {
|
|
9369
|
+
array1[e].isDel = true;
|
|
9370
|
+
break;
|
|
9371
|
+
}
|
|
9366
9372
|
}
|
|
9367
9373
|
let isMax = false;
|
|
9368
9374
|
let majorPoints = [];
|
|
@@ -11195,6 +11201,7 @@ var getFlatSlabData = (lines, runDataList, pointCloudCluster = null) => {
|
|
|
11195
11201
|
contour: path3,
|
|
11196
11202
|
averagePz: averagePz2,
|
|
11197
11203
|
points: newPoints[u4]
|
|
11204
|
+
// points: retPoints,
|
|
11198
11205
|
};
|
|
11199
11206
|
if (newPoints[u4].length > maxPointsNum) {
|
|
11200
11207
|
maxPointsNum = newPoints[u4].length;
|
|
@@ -11213,22 +11220,33 @@ var getFlatSlabData = (lines, runDataList, pointCloudCluster = null) => {
|
|
|
11213
11220
|
for (let j = 0; j < newSlabDatas.length; j++) {
|
|
11214
11221
|
if (delIndex.has(j)) continue;
|
|
11215
11222
|
const slabData1 = newSlabDatas[j];
|
|
11223
|
+
let mergeSlabArray = [slabData1];
|
|
11216
11224
|
for (let k = 0; k < newSlabDatas.length; k++) {
|
|
11217
11225
|
if (j == k || delIndex.has(k))
|
|
11218
11226
|
continue;
|
|
11219
11227
|
const slabData2 = newSlabDatas[k];
|
|
11220
|
-
|
|
11221
|
-
|
|
11222
|
-
|
|
11228
|
+
for (let c = 0; c < mergeSlabArray.length; c++) {
|
|
11229
|
+
const slabData3 = mergeSlabArray[c];
|
|
11230
|
+
if (Math.abs(slabData3.averagePz - slabData2.averagePz) > 0.05) continue;
|
|
11231
|
+
const isIntersect = contoursIntersect(slabData3.contour, slabData2.contour, 1e-3);
|
|
11232
|
+
if (isIntersect) {
|
|
11233
|
+
mergeSlabArray.push(slabData2);
|
|
11234
|
+
delIndex.add(k);
|
|
11235
|
+
k = -1;
|
|
11236
|
+
break;
|
|
11237
|
+
}
|
|
11238
|
+
}
|
|
11239
|
+
}
|
|
11240
|
+
if (mergeSlabArray.length > 1) {
|
|
11241
|
+
for (let c = 1; c < mergeSlabArray.length; c++) {
|
|
11242
|
+
const slabData2 = mergeSlabArray[c];
|
|
11223
11243
|
for (let b = 0; b < slabData2.points.length; b++)
|
|
11224
11244
|
slabData1.points.push(slabData2.points[b]);
|
|
11225
|
-
let tmpPoints = slabData1.points.map((p) => [p.x, p.y]);
|
|
11226
|
-
tmpPoints = voxelDownsample2DForContour(tmpPoints, 0.1);
|
|
11227
|
-
let path3 = computeContour(tmpPoints);
|
|
11228
|
-
slabData1.contour = path3;
|
|
11229
|
-
delIndex.add(k);
|
|
11230
|
-
k = -1;
|
|
11231
11245
|
}
|
|
11246
|
+
let tmpPoints = slabData1.points.map((p) => [p.x, p.y]);
|
|
11247
|
+
tmpPoints = voxelDownsample2DForContour(tmpPoints, 0.2);
|
|
11248
|
+
let path3 = computeContour(tmpPoints);
|
|
11249
|
+
slabData1.contour = path3;
|
|
11232
11250
|
}
|
|
11233
11251
|
}
|
|
11234
11252
|
slabDatas = [];
|
|
@@ -11236,8 +11254,8 @@ var getFlatSlabData = (lines, runDataList, pointCloudCluster = null) => {
|
|
|
11236
11254
|
if (!delIndex.has(j))
|
|
11237
11255
|
slabDatas.push({
|
|
11238
11256
|
contour: newSlabDatas[j].contour,
|
|
11239
|
-
averagePz: newSlabDatas[j].averagePz
|
|
11240
|
-
|
|
11257
|
+
averagePz: newSlabDatas[j].averagePz,
|
|
11258
|
+
points: newSlabDatas[j].points
|
|
11241
11259
|
});
|
|
11242
11260
|
}
|
|
11243
11261
|
return slabDatas;
|
|
@@ -11752,7 +11770,8 @@ var getWindowData = (lines, pcdData, lineReader) => {
|
|
|
11752
11770
|
inWall: false,
|
|
11753
11771
|
//是否在墙内
|
|
11754
11772
|
name: window.name,
|
|
11755
|
-
rectPts: window.coordinatesByArea.coordinates
|
|
11773
|
+
rectPts: window.coordinatesByArea.coordinates,
|
|
11774
|
+
obj_id: window.obj_id
|
|
11756
11775
|
});
|
|
11757
11776
|
}
|
|
11758
11777
|
}
|
|
@@ -11863,6 +11882,7 @@ var getWindowData = (lines, pcdData, lineReader) => {
|
|
|
11863
11882
|
continue;
|
|
11864
11883
|
let addData = false;
|
|
11865
11884
|
let isWindow = false;
|
|
11885
|
+
let windowObj_id = "";
|
|
11866
11886
|
let beforePcdDoorisFindWindow = false;
|
|
11867
11887
|
let doorOpenVector = new THREE10.Vector3(0, 0, 0);
|
|
11868
11888
|
let pcbDoorIndexs = [];
|
|
@@ -11922,6 +11942,7 @@ var getWindowData = (lines, pcdData, lineReader) => {
|
|
|
11922
11942
|
isWindow = true;
|
|
11923
11943
|
pcbDoorIndexs.push(windowDatas[n].index);
|
|
11924
11944
|
windowDatas[n].isFind = true;
|
|
11945
|
+
windowObj_id = windowDatas[n].obj_id;
|
|
11925
11946
|
findDoorDataIndex = n;
|
|
11926
11947
|
beforePcdDoorisFindWindow = pcdData[windowDatas[n].index].isFindWindow;
|
|
11927
11948
|
pcdData[windowDatas[n].index].isFindWindow = true;
|
|
@@ -11954,6 +11975,7 @@ var getWindowData = (lines, pcdData, lineReader) => {
|
|
|
11954
11975
|
beforePcdDoorisFindWindow = pcdData[windowDatas[n].index].isFindWindow;
|
|
11955
11976
|
pcdData[windowDatas[n].index].isFindWindow = true;
|
|
11956
11977
|
findDoorDataIndex = n;
|
|
11978
|
+
windowObj_id = windowDatas[n].obj_id;
|
|
11957
11979
|
}
|
|
11958
11980
|
}
|
|
11959
11981
|
}
|
|
@@ -11990,6 +12012,7 @@ var getWindowData = (lines, pcdData, lineReader) => {
|
|
|
11990
12012
|
isWindow = true;
|
|
11991
12013
|
windowDatas[n].isFind = true;
|
|
11992
12014
|
findDoorDataIndex = n;
|
|
12015
|
+
windowObj_id = windowDatas[n].obj_id;
|
|
11993
12016
|
}
|
|
11994
12017
|
}
|
|
11995
12018
|
}
|
|
@@ -12225,7 +12248,8 @@ var getWindowData = (lines, pcdData, lineReader) => {
|
|
|
12225
12248
|
type: "window",
|
|
12226
12249
|
isWindow,
|
|
12227
12250
|
pcbDoorIndexs,
|
|
12228
|
-
groundClearance
|
|
12251
|
+
groundClearance,
|
|
12252
|
+
obj_id: windowObj_id
|
|
12229
12253
|
};
|
|
12230
12254
|
line2.windowIdToCheckResults.push([region.index, id]);
|
|
12231
12255
|
line2.windowData.push(doorAndBeamDataObj);
|
|
@@ -12501,7 +12525,8 @@ var getWindowPcdData = (lines, pcdData) => {
|
|
|
12501
12525
|
full: false,
|
|
12502
12526
|
groundClearance,
|
|
12503
12527
|
height,
|
|
12504
|
-
width: ptWindowSt.distanceTo(ptWindowEd)
|
|
12528
|
+
width: ptWindowSt.distanceTo(ptWindowEd),
|
|
12529
|
+
pcd_id: pcd.obj_id
|
|
12505
12530
|
});
|
|
12506
12531
|
line2.isWindow = true;
|
|
12507
12532
|
pcd.isWindowDoor = true;
|
|
@@ -12542,7 +12567,8 @@ var getWindowPcdData = (lines, pcdData) => {
|
|
|
12542
12567
|
full: false,
|
|
12543
12568
|
groundClearance,
|
|
12544
12569
|
height,
|
|
12545
|
-
width: ptWindowSt.distanceTo(ptWindowEd)
|
|
12570
|
+
width: ptWindowSt.distanceTo(ptWindowEd),
|
|
12571
|
+
pcd_id: pcd.obj_id
|
|
12546
12572
|
});
|
|
12547
12573
|
line2.isWindow = true;
|
|
12548
12574
|
pcd.isWindowDoor = true;
|
|
@@ -12588,7 +12614,8 @@ var getWindowPcdData = (lines, pcdData) => {
|
|
|
12588
12614
|
full: false,
|
|
12589
12615
|
groundClearance,
|
|
12590
12616
|
height,
|
|
12591
|
-
width: ptWindowSt.distanceTo(ptWindowEd)
|
|
12617
|
+
width: ptWindowSt.distanceTo(ptWindowEd),
|
|
12618
|
+
pcd_id: pcd.obj_id
|
|
12592
12619
|
});
|
|
12593
12620
|
line2.isWindow = true;
|
|
12594
12621
|
pcd.isWindowDoor = true;
|