xzw 1 year ago
parent
commit
bb0420de50
1 changed files with 20 additions and 20 deletions
  1. 20 20
      service/PanoBoxFrame.js

+ 20 - 20
service/PanoBoxFrame.js

@@ -24,32 +24,32 @@ let boxesSolid = []
 
 let standards = {
     cabinet: {
-        widthNormal: { min: 0.6, max: 0.7 }, //widthNormal是不计宽还是厚度的平均宽度
+        widthNormal: { min: 0.55, max: 0.65 }, //widthNormal是不计宽还是厚度的平均宽度  //个别场景如S9yepREK8Jl 宽0.8米
         height: { min: 0.3, max: 2.5, standard: 2 },
         closeRatio: 0.7, //数值越小越容易findRest。一般在墙上的位置不准要设置大些,扎堆放置的设置小些
     },
     fire: {
-        widthNormal: { min: 0.12, max: 0.15 },
-        height: { min: 0.4, max: 0.55 },
+        widthNormal: { min: 0.12, max: 0.16 },
+        height: { min: 0.4, max: 0.58 },
         widthSame: true, //长宽相等
         closeRatio: 4,
         tinyXZ: true, //可以通过它近似确定地面高度
     },
     air: {
         widthNormal: { min: 0.35, max: 0.7 },
-        width: { min: 0.6, max: 0.75 },
-        thick: { min: 0.3, max: 0.4 },
-        height: { min: 1.2, max: 2, standard: 1.8 },
+        width: { min: 0.48, max: 0.75 },//因为总是斜着放所以范围较大
+        thick: { min: 0.33, max: 0.5 },
+        height: { min: 1.2, max: 2.2, standard: 1.8 },
         atWall: 0.8,
         closeRatio: 1.1 ,
     },
     airSmart: {
         widthNormal: { min: 0.35, max: 0.7 },
-        width: { min: 0.6, max: 0.75 },
-        thick: { min: 0.3, max: 0.4 },
-        height: { min: 1.2, max: 2, standard: 1.8 },
+        width: { min: 0.48, max: 0.75 },//因为总是斜着放所以范围较大
+        thick: { min: 0.33, max: 0.5 },
+        height: { min: 1.2, max: 2.2, standard: 1.8 },
         atWall: 0.8,
-        closeRatio: 1.1,
+        closeRatio: 1.1 ,
     },
 
     'air-hanging': {
@@ -76,25 +76,25 @@ let standards = {
         widthNormal: { min: 0.06, max: 0.4 },
         width: { min: 0.3, max: 0.5 },
         thick: { min: 0.05, max: 0.08 },
-        height: { min: 0.15, max: 0.25 },
+        height: { min: 0.1, max: 0.20 },
         bottom: { min: 1.2, max: 3 },
         atWall: 1,
         closeRatio: 2,
     },
     hlkcWindow: {
         widthNormal: { min: 0.08, max: 0.5 },
-        width: { min: 0.4, max: 0.6 },
-        thick: { min: 0.05, max: 0.1 },
-        height: { min: 0.4, max: 0.6 },
+        width: { min: 0.35, max: 0.5 },
+        thick: { min: 0.03, max: 0.06 },
+        height: { min: 0.35, max: 0.5 },
         bottom: { min: 1.2, max: 3 },
         atWall: 1,
         closeRatio: 2,
     },
     electric: {
         widthNormal: { min: 0.2, max: 0.7 },
-        width: { min: 0.4, max: 0.8  },
+        width: { min: 0.5, max: 0.65  },
         thick: { min: 0.2, max: 0.3 },
-        height: { min: 0.5, max: 1 }, //maxHeight
+        height: { min: 0.5, max: 1 }, //maxHeight   4GqaqNdyjGf一米高
         bottom: { min: 0.8, max: 1.8 },
         atWall: 1,
         closeRatio: 2,
@@ -108,7 +108,7 @@ let standards = {
         tiny: true, //因为较小且无方向,所以近似一个点,用射线算出的位置比墙面还准,所以其最终位置可用于expandModelBound
     },
     rowBigBox: {
-        widthNormal: { min: 0.5, max: Infinity },
+        widthNormal: { min: 0.55, max: Infinity },
         height: { min: 0.7, max: 2.4, standard: 2 },
     },
     /*"cabling-wall":{ 
@@ -1314,9 +1314,9 @@ export default class PanoBoxFrame extends THREE.Group {
                     matchInfo.center = o.pos3d.clone()
                     /* let o2 = math.getLineIntersect({ A, B,  p1: A.clone().add(box0.centerDir), p2:B.clone().add(box1.centerDir) })
                     matchInfo.center2 = o2.pos3d.clone() */
-                    if (name == 'pano2-2&pano4-4') {
+                    /* if (name == "pano16-4&pano18-5") {
                         addLine(A, box0.centerBtmDir, 10), addLine(B, box1.centerBtmDir, 10)
-                    }
+                    } */
 
                     //验证是否漫游点到中心点的方向和centerDir一样
                     let dir0 = new THREE.Vector3().subVectors(o.pos3d, A).normalize()
@@ -1361,7 +1361,7 @@ export default class PanoBoxFrame extends THREE.Group {
                     if (predict0 && predict1) {
                         matchInfo.center = new THREE.Vector3()
                             .addVectors(
-                                cIntersect.multiplyScalar(cr),
+                                cIntersect.clone().multiplyScalar(cr),
                                 predict0
                                     .clone()
                                     .add(predict1)