rm-graphical-computing-node 1.0.106 → 1.0.107

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 +17 -0
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -3526,6 +3526,12 @@ var setPointsSameZ = (points, z) => {
3526
3526
  points[i].z = z;
3527
3527
  return points;
3528
3528
  };
3529
+ function getObbLongSideDirection(obb, retNormalize = false) {
3530
+ const e = obb.rotation.elements;
3531
+ const h = obb.halfSize;
3532
+ const axis = h.x >= h.y ? new THREE3.Vector3(e[0], e[1], e[2]) : new THREE3.Vector3(e[3], e[4], e[5]);
3533
+ return retNormalize ? axis.normalize() : axis;
3534
+ }
3529
3535
  var getPt3 = (pt) => {
3530
3536
  return new THREE3.Vector3(pt.x, pt.y, pt.z);
3531
3537
  };
@@ -9106,6 +9112,8 @@ var getMergeMeaning = (allProjectionResults, averagePz2, pointCloudCluster = nul
9106
9112
  pipeIsVerticalJ = false;
9107
9113
  }
9108
9114
  }
9115
+ let boxVecJ = null;
9116
+ boxVecJ = getObbLongSideDirection(cloneData.obb);
9109
9117
  for (let k = j + 1; k < array.length; k++) {
9110
9118
  if (array[k].obb == null || delData.has(k))
9111
9119
  continue;
@@ -9125,6 +9133,15 @@ var getMergeMeaning = (allProjectionResults, averagePz2, pointCloudCluster = nul
9125
9133
  if (cloneData.type == "pipe" && array[k].type == "pipe" && pipeIsVerticalJ != pipeIsVerticalK) {
9126
9134
  continue;
9127
9135
  }
9136
+ if (array[k].type == "door frame") {
9137
+ let boxVecK = getObbLongSideDirection(array[k].obb);
9138
+ if (boxVecJ.length() > 0.3 && boxVecK.length() > 0.3) {
9139
+ let isPPPP = isParallel(boxVecJ, boxVecK, 0.2);
9140
+ if (!isPPPP || !isPPPP.parallel) {
9141
+ continue;
9142
+ }
9143
+ }
9144
+ }
9128
9145
  let isMerge = false;
9129
9146
  if (cloneData.type == "pipe" && !pipeIsVerticalJ) {
9130
9147
  let f = calculateClosePointWithOBB(array[k].points, cloneData.obb);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rm-graphical-computing-node",
3
- "version": "1.0.106",
3
+ "version": "1.0.107",
4
4
  "description": "墙体/梁线/点云语义计算库(依赖 Python 与 three.js)",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",