Browse Source

修改业务空间相邻判断时使用的墙的厚度

jxing 4 years ago
parent
commit
f466759341
2 changed files with 974 additions and 7 deletions
  1. 971 4
      src/affected_space/function.py
  2. 3 3
      src/business_space_adjacent/adjacent.py

File diff suppressed because it is too large
+ 971 - 4
src/affected_space/function.py


+ 3 - 3
src/business_space_adjacent/adjacent.py

@@ -16,7 +16,7 @@ class Point(object):
 
 # 1度的角度误差
 slope_delta = 1 / 180 * math.pi
-
+wall_thickness = 600
 
 class Segment:
     """线段类"""
@@ -75,12 +75,12 @@ class Segment:
             return True
         return False
 
-    # 在近似相等后, 是否有线段端点的投影点在线段上并且垂线距离小于25cm
+    # 在近似相等后, 是否有线段端点的投影点在线段上并且垂线距离小于wall_thickness墙厚60cm
     def is_projective_point_satisfy(self, oupoint):
         project_point = self.get_projective_point(oupoint)
         if self.is_projective_point_on_segment(project_point):
             distance = project_point.distance(oupoint)
-            if distance < 250:
+            if distance < wall_thickness:
                 return True
             else:
                 return False