rm-graphical-computing-node 1.0.135 → 1.0.136

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 +14 -8
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -9673,8 +9673,11 @@ var getMergeMeaning = (allProjectionResults, wallLines, wallVerifyType, averageP
9673
9673
  ));
9674
9674
  threePointsStr.push(`${allProjectionResults[i].points[u4].x},${allProjectionResults[i].points[u4].y},${allProjectionResults[i].points[u4].z}`);
9675
9675
  }
9676
- if (wallLines && wallLines.length && wallVerifyType && wallVerifyType.length && wallVerifyType.includes(word)) {
9677
- threePoints = checkNearObjects(wallLines, threePoints);
9676
+ if (wallLines) {
9677
+ if (wallVerifyType.type1 && wallVerifyType.type1.length && wallVerifyType.type1.includes(word))
9678
+ threePoints = checkNearObjects(wallLines, threePoints);
9679
+ else if (wallVerifyType.type2 && wallVerifyType.type2.length && wallVerifyType.type2.includes(word))
9680
+ threePoints = checkNearObjects(wallLines, threePoints, true);
9678
9681
  }
9679
9682
  let floorZ = -99999;
9680
9683
  if (word === "floor") {
@@ -11924,7 +11927,7 @@ function obbContainsPoint(obb, point2, epsilon3 = 1e-6) {
11924
11927
  const z = v2.dot(zAxis);
11925
11928
  return Math.abs(x) <= h.x + epsilon3 && Math.abs(y) <= h.y + epsilon3 && Math.abs(z) <= h.z + epsilon3;
11926
11929
  }
11927
- var checkNearObjects = (lines, objPoints) => {
11930
+ var checkNearObjects = (lines, objPoints, delWallPoints = false) => {
11928
11931
  const CELL = 0.1;
11929
11932
  const grid = /* @__PURE__ */ new Map();
11930
11933
  const THRESHOLD_SQ = 0.03 * 0.03;
@@ -11968,13 +11971,16 @@ var checkNearObjects = (lines, objPoints) => {
11968
11971
  _pcdPoints.push(p);
11969
11972
  }
11970
11973
  }
11971
- let __pcdPoints = [];
11972
- for (const p of _pcdPoints) {
11973
- if (!pointInRectRegion(p, rectRegions, 0.03)) {
11974
- __pcdPoints.push(p);
11974
+ if (delWallPoints) {
11975
+ let __pcdPoints = [];
11976
+ for (const p of _pcdPoints) {
11977
+ if (!pointInRectRegion(p, rectRegions, 0.03)) {
11978
+ __pcdPoints.push(p);
11979
+ }
11975
11980
  }
11981
+ return __pcdPoints;
11976
11982
  }
11977
- return __pcdPoints;
11983
+ return _pcdPoints;
11978
11984
  };
11979
11985
 
11980
11986
  // src/utils/clusert.mjs
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rm-graphical-computing-node",
3
- "version": "1.0.135",
3
+ "version": "1.0.136",
4
4
  "description": "墙体/梁线/点云语义计算库(依赖 Python 与 three.js)",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",