rm-graphical-computing-node 1.0.135 → 1.0.137

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 +30 -11
  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") {
@@ -10084,6 +10087,19 @@ var getMergeMeaning = (allProjectionResults, wallLines, wallVerifyType, averageP
10084
10087
  const f2 = calculateClosePointWithOBB(array1[e].points, obb2);
10085
10088
  const isMaxBox = compareBoxVolume(obb1, obb2);
10086
10089
  if (type1 !== "wall" && type1 !== "floor" && type1 !== "roof" && type1 != "door frame" && type2 != "door frame") {
10090
+ if (type1 == "metal framing of interior glass partitions") {
10091
+ let f = calculateClosePointWithOBB(array1[e].points, array2[k].obb, 1);
10092
+ if (f > 0.8) {
10093
+ array1[e].isDel = true;
10094
+ break;
10095
+ }
10096
+ } else if (type2 == "metal framing of interior glass partitions") {
10097
+ let f = calculateClosePointWithOBB(array2[k].points, array1[e].obb, 1);
10098
+ if (f > 0.8) {
10099
+ array2[k].isDel = true;
10100
+ continue;
10101
+ }
10102
+ }
10087
10103
  if (type1 === "window") {
10088
10104
  const size1 = new THREE8.Vector3();
10089
10105
  obb1.getSize(size1);
@@ -11924,7 +11940,7 @@ function obbContainsPoint(obb, point2, epsilon3 = 1e-6) {
11924
11940
  const z = v2.dot(zAxis);
11925
11941
  return Math.abs(x) <= h.x + epsilon3 && Math.abs(y) <= h.y + epsilon3 && Math.abs(z) <= h.z + epsilon3;
11926
11942
  }
11927
- var checkNearObjects = (lines, objPoints) => {
11943
+ var checkNearObjects = (lines, objPoints, delWallPoints = false) => {
11928
11944
  const CELL = 0.1;
11929
11945
  const grid = /* @__PURE__ */ new Map();
11930
11946
  const THRESHOLD_SQ = 0.03 * 0.03;
@@ -11968,13 +11984,16 @@ var checkNearObjects = (lines, objPoints) => {
11968
11984
  _pcdPoints.push(p);
11969
11985
  }
11970
11986
  }
11971
- let __pcdPoints = [];
11972
- for (const p of _pcdPoints) {
11973
- if (!pointInRectRegion(p, rectRegions, 0.03)) {
11974
- __pcdPoints.push(p);
11987
+ if (delWallPoints) {
11988
+ let __pcdPoints = [];
11989
+ for (const p of _pcdPoints) {
11990
+ if (!pointInRectRegion(p, rectRegions, 0.03)) {
11991
+ __pcdPoints.push(p);
11992
+ }
11975
11993
  }
11994
+ return __pcdPoints;
11976
11995
  }
11977
- return __pcdPoints;
11996
+ return _pcdPoints;
11978
11997
  };
11979
11998
 
11980
11999
  // src/utils/clusert.mjs
@@ -15384,12 +15403,10 @@ var getWindowData = (lines, pcdData, lineReader) => {
15384
15403
  let isOverlap = false;
15385
15404
  for (let m = 0; m < allDoorLines1.length; m++) {
15386
15405
  let result = classifySegments(allDoorLines1[m].start, allDoorLines1[m].end, doorTmpSt, doorTmpEd);
15387
- console.log(result);
15388
15406
  if (result && result.type == "collinear_overlap" && result.maxPerpendicularDistance < 0.07) {
15389
15407
  isOverlap = true;
15390
15408
  }
15391
15409
  }
15392
- console.log("isOverlap", isOverlap);
15393
15410
  if (isOverlap) {
15394
15411
  if (findDoorDataIndex != -1) {
15395
15412
  if (!beforePcdDoorisFindWindow) {
@@ -15970,7 +15987,9 @@ var getDoorPcdData = (lines, pcdData, needFindOtherDoor = true) => {
15970
15987
  let ptStart2 = getPt3(line3.start);
15971
15988
  let ptEnd2 = getPt3(line3.end);
15972
15989
  ptStart2.z = ptEnd2.z = ptMid1.z;
15973
- let classify = classifySegments(ptMid1, ptMid2, ptStart2, ptEnd2);
15990
+ let classify = classifySegments(ptMid1, ptMid2, ptStart2, ptEnd2, {
15991
+ collinearAngleMax: THREE11.MathUtils.degToRad(10)
15992
+ });
15974
15993
  if (classify.type == "collinear_overlap" && classify.maxPerpendicularDistance < pcdToLineDist) {
15975
15994
  eligibilityLines.push(line3);
15976
15995
  eligibilityLinesIndexs.push(j);
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.137",
4
4
  "description": "墙体/梁线/点云语义计算库(依赖 Python 与 three.js)",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",