rm-graphical-computing-node 1.0.35 → 1.0.36

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 +5 -0
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -8349,6 +8349,9 @@ function calculateClosePointRatioWithGrid2(pointsA, pointsB, threshold = 5e-3, m
8349
8349
  }
8350
8350
  return closePointsCount / pointsA.length;
8351
8351
  }
8352
+ function isNumber2(num) {
8353
+ return !isNaN(num) && num !== null && !Array.isArray(num);
8354
+ }
8352
8355
  function calculateClosePointWithOBB(points, box, maxCalculate = 0.5) {
8353
8356
  let closePointsCount = 0;
8354
8357
  let calculate = 0;
@@ -8427,6 +8430,8 @@ function getCenterAndPointHeight(points) {
8427
8430
  function getObb(path3, center, h, z) {
8428
8431
  const pathPoints = [];
8429
8432
  for (let p = 0; p < path3.length; p++) {
8433
+ if (!isNumber2(path3[p][0]) || !isNumber2(path3[p][1]))
8434
+ continue;
8430
8435
  pathPoints.push(new THREE8.Vector3(
8431
8436
  path3[p][0],
8432
8437
  path3[p][1],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rm-graphical-computing-node",
3
- "version": "1.0.35",
3
+ "version": "1.0.36",
4
4
  "description": "墙体/梁线/点云语义计算库(依赖 Python 与 three.js)",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",