rm-graphical-computing-node 1.0.104 → 1.0.105

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 +27 -9
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -14592,8 +14592,12 @@ var getWindowPcdData = (lines, pcdData) => {
14592
14592
  obj_id: pcd.obj_id
14593
14593
  };
14594
14594
  let windowLocationIsTrue = true;
14595
- if ((line2.isPassageEntrance || line2.inPassageEntranceDoor) && line2.passageEntrance && line2.passageEntrance.length) {
14596
- windowLocationIsTrue = checkWindowLocationIsTrue(windowData, line2.passageEntrance);
14595
+ if ((line2.isPassageEntrance || line2.inPassageEntranceDoor) && line2.passageEntrance && line2.passageEntrance.length == 1) {
14596
+ const ret = checkWindowLocationIsTrue(windowData, line2.passageEntrance);
14597
+ windowLocationIsTrue = ret.windowLocationIsTrue;
14598
+ if (ret.delDoorAndBemaData) {
14599
+ line2.doorAndBeamData = [];
14600
+ }
14597
14601
  }
14598
14602
  if (!windowLocationIsTrue)
14599
14603
  continue;
@@ -14641,8 +14645,12 @@ var getWindowPcdData = (lines, pcdData) => {
14641
14645
  obj_id: pcd.obj_id
14642
14646
  };
14643
14647
  let windowLocationIsTrue = true;
14644
- if ((line2.isPassageEntrance || line2.inPassageEntranceDoor) && line2.passageEntrance && line2.passageEntrance.length) {
14645
- windowLocationIsTrue = checkWindowLocationIsTrue(windowData, line2.passageEntrance);
14648
+ if ((line2.isPassageEntrance || line2.inPassageEntranceDoor) && line2.passageEntrance && line2.passageEntrance.length == 1) {
14649
+ const ret = checkWindowLocationIsTrue(windowData, line2.passageEntrance);
14650
+ windowLocationIsTrue = ret.windowLocationIsTrue;
14651
+ if (ret.delDoorAndBemaData) {
14652
+ line2.doorAndBeamData = [];
14653
+ }
14646
14654
  }
14647
14655
  if (!windowLocationIsTrue)
14648
14656
  continue;
@@ -14695,8 +14703,12 @@ var getWindowPcdData = (lines, pcdData) => {
14695
14703
  obj_id: pcd.obj_id
14696
14704
  };
14697
14705
  let windowLocationIsTrue = true;
14698
- if ((line2.isPassageEntrance || line2.inPassageEntranceDoor) && line2.passageEntrance && line2.passageEntrance.length) {
14699
- windowLocationIsTrue = checkWindowLocationIsTrue(windowData, line2.passageEntrance);
14706
+ if ((line2.isPassageEntrance || line2.inPassageEntranceDoor) && line2.passageEntrance && line2.passageEntrance.length == 1) {
14707
+ const ret = checkWindowLocationIsTrue(windowData, line2.passageEntrance);
14708
+ windowLocationIsTrue = ret.windowLocationIsTrue;
14709
+ if (ret.delDoorAndBemaData) {
14710
+ line2.doorAndBeamData = [];
14711
+ }
14700
14712
  }
14701
14713
  if (!windowLocationIsTrue)
14702
14714
  continue;
@@ -14711,16 +14723,22 @@ var getWindowPcdData = (lines, pcdData) => {
14711
14723
  function checkWindowLocationIsTrue(windowData, passageEntrance) {
14712
14724
  let windowP = getPt3(windowData.p);
14713
14725
  let windowLocationIsTrue = true;
14726
+ let delDoorAndBemaData = false;
14714
14727
  for (let i = 0; i < passageEntrance.length; i++) {
14715
14728
  const passage = passageEntrance[i];
14716
14729
  let passP = getPt3(passage.p);
14717
14730
  let distance2 = windowP.distanceTo(passP);
14718
14731
  if (distance2 < passage.width / 2) {
14719
- windowLocationIsTrue = false;
14720
- break;
14732
+ if (distance2 < 0.3 && Math.abs(windowData.width - passage.width) < 0.3) {
14733
+ delDoorAndBemaData = true;
14734
+ break;
14735
+ } else {
14736
+ windowLocationIsTrue = false;
14737
+ break;
14738
+ }
14721
14739
  }
14722
14740
  }
14723
- return windowLocationIsTrue;
14741
+ return { windowLocationIsTrue, delDoorAndBemaData };
14724
14742
  }
14725
14743
 
14726
14744
  // src/geometry/door.mjs
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rm-graphical-computing-node",
3
- "version": "1.0.104",
3
+ "version": "1.0.105",
4
4
  "description": "墙体/梁线/点云语义计算库(依赖 Python 与 three.js)",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",