rm-graphical-computing-node 1.0.120 → 1.0.121

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 +4 -44
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -9842,7 +9842,8 @@ var getMergeMeaning = (allProjectionResults, wallLines, wallVerifyType, averageP
9842
9842
  ) {
9843
9843
  let tol = array[k].type == "door frame" ? 0.5 : 0.5;
9844
9844
  let boxVecK = getObbLongSideDirection(array[k].obb);
9845
- if (boxVecJ.length() > 0.3 && boxVecK.length() > 0.3) {
9845
+ let f = calculateClosePointWithOBB(array[k].points, cloneData.obb);
9846
+ if (boxVecJ.length() > 0.3 && boxVecK.length() > 0.3 && f < 0.3) {
9846
9847
  let isPPPP = isParallel(boxVecJ, boxVecK, tol);
9847
9848
  if (!isPPPP || !isPPPP.parallel) {
9848
9849
  continue;
@@ -14648,48 +14649,7 @@ var getWindowData = (lines, pcdData, lineReader) => {
14648
14649
  const totalInPlaneNum = region.totalInPlaneNum;
14649
14650
  if (!facePoints || facePoints.length <= 0)
14650
14651
  continue;
14651
- let regionLength = facePoints[0].distanceTo(facePoints[1]);
14652
- let regionHeight = facePoints[0].distanceTo(facePoints[3]);
14653
- const centerHeight = region.gridHeight * (regionHeight / region.gridHeight / 3 * 2) + region.gridHeight / 2;
14654
- let linePt1 = new THREE10.Vector3(facePoints[0].x, facePoints[0].y, facePoints[0].z + centerHeight);
14655
- let linePt2 = new THREE10.Vector3(facePoints[1].x, facePoints[1].y, facePoints[1].z + centerHeight);
14656
- const centerLine = new THREE10.Line3(linePt1, linePt2);
14657
- const inLinePts = [];
14658
- let tmpTargetPt = new THREE10.Vector3();
14659
- region.points.forEach((pt) => {
14660
- const tmpClosePt = centerLine.closestPointToPoint(pt, true, tmpTargetPt);
14661
- if (tmpClosePt.distanceTo(pt) < region.gridHeight + 0.01) {
14662
- inLinePts.push(pt);
14663
- }
14664
- });
14665
- let lineGroup = [];
14666
- let isFindPtIndex = [];
14667
- while (true) {
14668
- let tmpLine = [];
14669
- for (let e = 0; e < inLinePts.length; e++) {
14670
- if (isFindPtIndex.includes(e))
14671
- continue;
14672
- if (tmpLine.length == 0) {
14673
- tmpLine.push(inLinePts[e]);
14674
- isFindPtIndex.push(e);
14675
- }
14676
- }
14677
- for (let c = 0; c < inLinePts.length; c++) {
14678
- if (isFindPtIndex.includes(c))
14679
- continue;
14680
- for (let e = 0; e < tmpLine.length; e++) {
14681
- if (inLinePts[c].distanceTo(tmpLine[e]) < region.gridWidth + 0.01) {
14682
- tmpLine.push(inLinePts[c]);
14683
- isFindPtIndex.push(c);
14684
- c = -1;
14685
- break;
14686
- }
14687
- }
14688
- }
14689
- if (tmpLine.length == 0)
14690
- break;
14691
- lineGroup.push(tmpLine);
14692
- }
14652
+ let lineGroup = [[...region.points]];
14693
14653
  const regionData = [];
14694
14654
  for (let e = 0; e < lineGroup.length; e++) {
14695
14655
  const obj = {
@@ -15100,7 +15060,7 @@ var getWindowData = (lines, pcdData, lineReader) => {
15100
15060
  groundClearance,
15101
15061
  obj_id: windowObj_id
15102
15062
  };
15103
- if (windowToWallAngle > 60 && changeWindowSize) {
15063
+ if (windowToWallAngle > 50 && changeWindowSize) {
15104
15064
  let rectPts = [doorAndBeamDataObj.windowBottomSt, doorAndBeamDataObj.windowBottomEd, doorAndBeamDataObj.windowTopEd, doorAndBeamDataObj.windowTopSt];
15105
15065
  let checkResultsNum = region.centerPts ? region.centerPts.length : 0;
15106
15066
  let inRectNum = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rm-graphical-computing-node",
3
- "version": "1.0.120",
3
+ "version": "1.0.121",
4
4
  "description": "墙体/梁线/点云语义计算库(依赖 Python 与 three.js)",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",