rm-graphical-computing-node 1.0.134 → 1.0.135

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 +15 -6
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -9789,9 +9789,9 @@ var getMergeMeaning = (allProjectionResults, wallLines, wallVerifyType, averageP
9789
9789
  let tol = 0.5;
9790
9790
  let f = calculateClosePointWithOBB(sourceItem.points, targetItem.obb);
9791
9791
  let boxVecJ = getObbLongSideDirection(targetItem.obb);
9792
- if (boxVecJ.length > 0.3 && boxVecK.length > 0.3 || f > 0.3) {
9792
+ if (boxVecJ.length > 0.2 && boxVecK.length > 0.2 || f > 0.3) {
9793
9793
  let isPPPP = isParallel(boxVecJ.direction, boxVecK.direction, tol);
9794
- if (!isPPPP || !isPPPP.parallel) {
9794
+ if ((!isPPPP || !isPPPP.parallel) && f < 0.8) {
9795
9795
  continue;
9796
9796
  }
9797
9797
  }
@@ -9882,9 +9882,9 @@ var getMergeMeaning = (allProjectionResults, wallLines, wallVerifyType, averageP
9882
9882
  let tol = array[k].type == "door frame" ? 0.5 : 0.5;
9883
9883
  let boxVecK = getObbLongSideDirection(array[k].obb);
9884
9884
  let f = calculateClosePointWithOBB(array[k].points, cloneData.obb, 1);
9885
- if (boxVecJ.length > 0.3 && boxVecK.length > 0.3 || f > 0.3) {
9885
+ if (boxVecJ.length > 0.2 && boxVecK.length > 0.2 || f > 0.3) {
9886
9886
  let isPPPP = isParallel(boxVecJ.direction, boxVecK.direction, tol);
9887
- if ((!isPPPP || !isPPPP.parallel) && f < 0.65) {
9887
+ if ((!isPPPP || !isPPPP.parallel) && f < 0.8) {
9888
9888
  continue;
9889
9889
  }
9890
9890
  }
@@ -15266,7 +15266,7 @@ var getWindowData = (lines, pcdData, lineReader) => {
15266
15266
  const windowPcdLen = windowPcdSt.distanceTo(windowPcdEd);
15267
15267
  const windowPcdHeight = Math.abs(windowPcd.maxZ - windowPcd.minZ);
15268
15268
  let windowHeight = beamTmpSt.z - doorTmpSt.z;
15269
- const windowLen = doorTmpSt.distanceTo(doorTmpEd);
15269
+ let windowLen = doorTmpSt.distanceTo(doorTmpEd);
15270
15270
  let changeWindowSize = false;
15271
15271
  let windowSizeThreshold = 0.3;
15272
15272
  if ((Math.abs(windowPcdLen - windowLen) < windowSizeThreshold || windowPcdLen > windowLen) && (Math.abs(windowPcdHeight - windowHeight) < windowSizeThreshold || windowPcdHeight > windowHeight)) {
@@ -15375,6 +15375,12 @@ var getWindowData = (lines, pcdData, lineReader) => {
15375
15375
  beamTmpEd = doorTmpEd.clone();
15376
15376
  beamTmpSt.z = beamTmpEd.z = windowPcd.maxZ;
15377
15377
  }
15378
+ windowLen = doorTmpSt.distanceTo(doorTmpEd);
15379
+ if (windowLen * 2 < windowPcdLen) {
15380
+ pcdData[windowDatas[findDoorDataIndex].index].isFindWindow = false;
15381
+ windowDatas[findDoorDataIndex].isFind = false;
15382
+ continue;
15383
+ }
15378
15384
  let isOverlap = false;
15379
15385
  for (let m = 0; m < allDoorLines1.length; m++) {
15380
15386
  let result = classifySegments(allDoorLines1[m].start, allDoorLines1[m].end, doorTmpSt, doorTmpEd);
@@ -15394,8 +15400,11 @@ var getWindowData = (lines, pcdData, lineReader) => {
15394
15400
  continue;
15395
15401
  }
15396
15402
  let afterDoorLen = doorTmpEd.distanceTo(doorTmpSt);
15397
- if (afterDoorLen < 0.4 && !isWindow || afterDoorLen < 0.3 && isWindow)
15403
+ if (afterDoorLen < 0.4 && !isWindow || afterDoorLen < 0.3 && isWindow) {
15404
+ pcdData[windowDatas[findDoorDataIndex].index].isFindWindow = false;
15405
+ windowDatas[findDoorDataIndex].isFind = false;
15398
15406
  continue;
15407
+ }
15399
15408
  let doorType = "";
15400
15409
  let groundClearance = doorTmpSt.z - line2.start.z > 1e-4 ? doorTmpSt.z - line2.start.z : 0;
15401
15410
  windowHeight = beamTmpSt.z - doorTmpSt.z;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rm-graphical-computing-node",
3
- "version": "1.0.134",
3
+ "version": "1.0.135",
4
4
  "description": "墙体/梁线/点云语义计算库(依赖 Python 与 three.js)",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",