Esempio n. 1
0
 def get_intersect_pt(self, seg):
     """If there's an intersection, then seg is opposite direction (vert or horiz)"""
     if segment_intersect(self.segment, seg):
         if self.direction == 'vert':
             x_int = self.p0.x
             y_int = seg[0].y
         else:
             x_int = seg[0].x
             y_int = self.p0.y
         return Point( x_int, y_int )
     else:
         return None
Esempio n. 2
0
 def get_intersect_pt(self, seg):
     """If there's an intersection, then seg is opposite direction (vert or horiz)"""
     if segment_intersect(self.segment, seg):
         if self.direction == 'vert':
             x_int = self.p0.x
             y_int = seg[0].y
         else:
             x_int = seg[0].x
             y_int = self.p0.y
         return Point(x_int, y_int)
     else:
         return None
Esempio n. 3
0
 def intersects_segment(self, seg):
     return segment_intersect(self.segment, seg)
Esempio n. 4
0
 def intersects(self, blockade):
     return segment_intersect(self.segment, blockade.segment)
Esempio n. 5
0
 def intersects_segment(self, seg):
     return segment_intersect(self.segment, seg)
Esempio n. 6
0
 def intersects(self, blockade):
     return segment_intersect(self.segment, blockade.segment)