rm-graphical-computing-node 1.0.158 → 1.0.159

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 +6 -5
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -14382,8 +14382,10 @@ var getMergeMeaning = (allProjectionResults, wallLines, wallVerifyType, averageP
14382
14382
  ) {
14383
14383
  let tol = array[k].type == "door frame" ? 0.5 : 0.5;
14384
14384
  let boxVecK = getObbLongSideDirection(array[k].obb);
14385
+ let obbPointsClone = getOBBPoints(cloneData.obb);
14385
14386
  let polygonK = array[k].path.map((point2) => new THREE8.Vector3(point2[0], point2[1], 0));
14386
- let polygonJ = cloneData.path.map((point2) => new THREE8.Vector3(point2[0], point2[1], 0));
14387
+ let polygonJ = [obbPointsClone[0], obbPointsClone[1], obbPointsClone[2], obbPointsClone[3]];
14388
+ polygonJ = setPointsSameZ(polygonJ, 0);
14387
14389
  let f = getPolygonIntersectionRatio(polygonK, polygonJ);
14388
14390
  if (boxVecJ.length > 0.2 && boxVecK.length > 0.2 || f > 30) {
14389
14391
  let isPPPP = isParallel(boxVecJ.direction, boxVecK.direction, tol);
@@ -14484,6 +14486,7 @@ var getMergeMeaning = (allProjectionResults, wallLines, wallVerifyType, averageP
14484
14486
  });
14485
14487
  let beforeLength = newArray.length;
14486
14488
  if (clusterResult.length > 0 && clusterResult[0].length > 1) {
14489
+ let add = 1;
14487
14490
  for (const cluster of clusterResult[0]) {
14488
14491
  if (cluster.length < 50) continue;
14489
14492
  const newOriginalPoints = cluster.map((i2) => points[i2]);
@@ -14499,7 +14502,7 @@ var getMergeMeaning = (allProjectionResults, wallLines, wallVerifyType, averageP
14499
14502
  type: type2,
14500
14503
  averagePz: averagePz3,
14501
14504
  obb: null,
14502
- obj_id,
14505
+ obj_id: obj_id + `_${add}`,
14503
14506
  positionArr,
14504
14507
  isStaircaseBalconyRailing,
14505
14508
  mapPosition: array[j]?.mapPosition
@@ -14507,6 +14510,7 @@ var getMergeMeaning = (allProjectionResults, wallLines, wallVerifyType, averageP
14507
14510
  data.obb = getObb(data.path, data.center, data.h, (data.maxz + data.minz) / 2);
14508
14511
  if (data.obb == null) continue;
14509
14512
  newArray.push(data);
14513
+ add++;
14510
14514
  }
14511
14515
  }
14512
14516
  if (newArray.length != beforeLength) {
@@ -17349,9 +17353,6 @@ var getWindowData = (lines, pcdData, lineReader) => {
17349
17353
  collinearAngleMax: THREE10.MathUtils.degToRad(10),
17350
17354
  distanceThreshold: 2
17351
17355
  });
17352
- if (windowDatas[n].name == "210_front_window_001") {
17353
- console.log(index, result);
17354
- }
17355
17356
  if (result && result.type == "collinear_gap") {
17356
17357
  let ptCenter = getMid(doorSt, doorEd);
17357
17358
  let line3 = new THREE10.Line3(new THREE10.Vector3(line2.start.x, line2.start.y, 0), new THREE10.Vector3(line2.end.x, line2.end.y, 0));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rm-graphical-computing-node",
3
- "version": "1.0.158",
3
+ "version": "1.0.159",
4
4
  "description": "墙体/梁线/点云语义计算库(依赖 Python 与 three.js)",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",