rm-graphical-computing-node 1.0.136 → 1.0.138

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 +18 -11
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -10087,6 +10087,19 @@ var getMergeMeaning = (allProjectionResults, wallLines, wallVerifyType, averageP
10087
10087
  const f2 = calculateClosePointWithOBB(array1[e].points, obb2);
10088
10088
  const isMaxBox = compareBoxVolume(obb1, obb2);
10089
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
+ }
10090
10103
  if (type1 === "window") {
10091
10104
  const size1 = new THREE8.Vector3();
10092
10105
  obb1.getSize(size1);
@@ -15074,8 +15087,7 @@ var getWindowData = (lines, pcdData, lineReader) => {
15074
15087
  if (length2 < 3.5) {
15075
15088
  for (let n = 0; n < windowDatas.length; n++) {
15076
15089
  if (windowDatas[n].isFind) {
15077
- if (line2.length < lines[windowDatas[n].findLineIndex[0]]?.length)
15078
- continue;
15090
+ continue;
15079
15091
  }
15080
15092
  let doorSt = new THREE10.Vector3(windowDatas[n].windowStartPt.x, windowDatas[n].windowStartPt.y, 0);
15081
15093
  let doorEd = new THREE10.Vector3(windowDatas[n].windowEndPt.x, windowDatas[n].windowEndPt.y, 0);
@@ -15390,12 +15402,10 @@ var getWindowData = (lines, pcdData, lineReader) => {
15390
15402
  let isOverlap = false;
15391
15403
  for (let m = 0; m < allDoorLines1.length; m++) {
15392
15404
  let result = classifySegments(allDoorLines1[m].start, allDoorLines1[m].end, doorTmpSt, doorTmpEd);
15393
- console.log(result);
15394
15405
  if (result && result.type == "collinear_overlap" && result.maxPerpendicularDistance < 0.07) {
15395
15406
  isOverlap = true;
15396
15407
  }
15397
15408
  }
15398
- console.log("isOverlap", isOverlap);
15399
15409
  if (isOverlap) {
15400
15410
  if (findDoorDataIndex != -1) {
15401
15411
  if (!beforePcdDoorisFindWindow) {
@@ -15451,13 +15461,8 @@ var getWindowData = (lines, pcdData, lineReader) => {
15451
15461
  continue;
15452
15462
  }
15453
15463
  line2.windowIdToCheckResults.push([region.index, id]);
15454
- if (windowDatas[findDoorDataIndex].findLineIndex.length > 0) {
15455
- let lineIndex = windowDatas[findDoorDataIndex].findLineIndex[0];
15456
- let windowDataIndex = windowDatas[findDoorDataIndex].findLineIndex[1];
15457
- lines[lineIndex].windowData.splice(windowDataIndex, 1);
15458
- }
15459
- windowDatas[findDoorDataIndex].findLineIndex = [index, line2.windowData.length - 1];
15460
15464
  line2.windowData.push(doorAndBeamDataObj);
15465
+ windowDatas[findDoorDataIndex].findLineIndex = [index, line2.windowData.length - 1];
15461
15466
  doorBeamDataIndex.push({
15462
15467
  linesIndex: index,
15463
15468
  doorIndex: line2.windowData.length - 1
@@ -15976,7 +15981,9 @@ var getDoorPcdData = (lines, pcdData, needFindOtherDoor = true) => {
15976
15981
  let ptStart2 = getPt3(line3.start);
15977
15982
  let ptEnd2 = getPt3(line3.end);
15978
15983
  ptStart2.z = ptEnd2.z = ptMid1.z;
15979
- let classify = classifySegments(ptMid1, ptMid2, ptStart2, ptEnd2);
15984
+ let classify = classifySegments(ptMid1, ptMid2, ptStart2, ptEnd2, {
15985
+ collinearAngleMax: THREE11.MathUtils.degToRad(10)
15986
+ });
15980
15987
  if (classify.type == "collinear_overlap" && classify.maxPerpendicularDistance < pcdToLineDist) {
15981
15988
  eligibilityLines.push(line3);
15982
15989
  eligibilityLinesIndexs.push(j);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rm-graphical-computing-node",
3
- "version": "1.0.136",
3
+ "version": "1.0.138",
4
4
  "description": "墙体/梁线/点云语义计算库(依赖 Python 与 three.js)",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",