rm-graphical-computing-node 1.0.141 → 1.0.143

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.
Files changed (2) hide show
  1. package/dist/index.mjs +19 -7
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -4590,7 +4590,7 @@ var getBeamLine = async (lines, runDataList, pcdData, lineReader, lineEditor, on
4590
4590
  const doorAndDoorFrameDatas = [...doorDatas];
4591
4591
  doorAndDoorFrameDatas.push(...doorFrame);
4592
4592
  if (!line2.isLine2) {
4593
- if (length2 < 3.5) {
4593
+ if (length2 < 2.5) {
4594
4594
  for (let n = 0; n < doorAndDoorFrameDatas.length; n++) {
4595
4595
  let doorSt = new THREE5.Vector3(doorAndDoorFrameDatas[n].doorStartPt.x, doorAndDoorFrameDatas[n].doorStartPt.y, 0);
4596
4596
  let doorEd = new THREE5.Vector3(doorAndDoorFrameDatas[n].doorEndPt.x, doorAndDoorFrameDatas[n].doorEndPt.y, 0);
@@ -4675,7 +4675,7 @@ var getBeamLine = async (lines, runDataList, pcdData, lineReader, lineEditor, on
4675
4675
  doorTmpSt.z = doorTmpEd.z = tmpRegion.facePoints[0].z;
4676
4676
  }
4677
4677
  }
4678
- if (length2 > 1.5) {
4678
+ if (length2 > 1.3) {
4679
4679
  if (doorAndDoorFrameDatas[n].category === "door frame") {
4680
4680
  findDoorFrame = true;
4681
4681
  continue;
@@ -5104,6 +5104,8 @@ var getBeamLine = async (lines, runDataList, pcdData, lineReader, lineEditor, on
5104
5104
  if (tmpDoorBeamData.isDoor || doorAndBeamDataObj.isDoor) {
5105
5105
  tmpDoorBeamData.isDoor = true;
5106
5106
  doorAndBeamDataObj.isDoor = true;
5107
+ tmpDoorBeamData.type = "door";
5108
+ doorAndBeamDataObj.type = "door";
5107
5109
  }
5108
5110
  if (tmpDoorBeamData.doorType != "")
5109
5111
  doorAndBeamDataObj.doorType = tmpDoorBeamData.doorType;
@@ -10079,10 +10081,20 @@ var getMergeMeaning = (allProjectionResults, wallLines, wallVerifyType, averageP
10079
10081
  for (let j = 0; j < targetData.array.length; j++) {
10080
10082
  const targetItem = targetData.array[j];
10081
10083
  if (targetItem.obb == null) continue;
10082
- if (targetType == "window" && sourceType == "balcony railing" && !targetItem.isHasTie) {
10083
- continue;
10084
+ if (targetType == "window" && sourceType == "balcony railing") {
10085
+ if (!targetItem.isHasTie)
10086
+ continue;
10087
+ const size1 = new THREE8.Vector3();
10088
+ sourceItem.obb.getSize(size1);
10089
+ let maxLen1 = size1.x > size1.y ? size1.x : size1.y;
10090
+ const size2 = new THREE8.Vector3();
10091
+ targetItem.obb.getSize(size2);
10092
+ let maxLen2 = size2.x > size2.y ? size2.x : size2.y;
10093
+ if (Math.abs(maxLen1 - maxLen2) > 0.5 || maxLen1 > maxLen2) {
10094
+ continue;
10095
+ }
10084
10096
  }
10085
- if (targetType == "window" && sourceType == "metal framing of interior glass partitions") {
10097
+ if (targetType == "window" && sourceType == "metal framing of interior glass partitions" || targetType == "window" && sourceType == "balcony railing") {
10086
10098
  let tol = 0.5;
10087
10099
  let f = calculateClosePointWithOBB(sourceItem.points, targetItem.obb);
10088
10100
  let boxVecJ = getObbLongSideDirection(targetItem.obb);
@@ -14663,7 +14675,7 @@ var getFlatSlabData = (lines, runDataList, pointCloudCluster = null) => {
14663
14675
  maxHeightTrajectoryPt.set(runDataList[i].x, runDataList[i].y, runDataList[i].z);
14664
14676
  }
14665
14677
  }
14666
- const averageZ = totalZ / (runDataList.length - 1) + 0.5;
14678
+ const averageZ = totalZ / (runDataList.length - 1);
14667
14679
  let maxPointsNum = 0;
14668
14680
  let maxPointsZ = 0;
14669
14681
  for (const line2 of lines) {
@@ -14726,7 +14738,7 @@ var getFlatSlabData = (lines, runDataList, pointCloudCluster = null) => {
14726
14738
  }
14727
14739
  const newSlabDatas = [];
14728
14740
  for (const slabData of slabDatas) {
14729
- if (slabData.averagePz >= maxPointsZ || slabData.averagePz >= averageZ - 0.5) {
14741
+ if (slabData.averagePz >= maxPointsZ || slabData.averagePz >= averageZ) {
14730
14742
  newSlabDatas.push(slabData);
14731
14743
  }
14732
14744
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rm-graphical-computing-node",
3
- "version": "1.0.141",
3
+ "version": "1.0.143",
4
4
  "description": "墙体/梁线/点云语义计算库(依赖 Python 与 three.js)",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",