示例#1
0
 def test_interaction_parallel_11(self):
     # не параллельны, не пересекаются
     edge1 = [(100, 100), (500, 100)]
     edge2 = [(50, 150), (350, 250)]
     self.assertEqual(real_intersect(edge1, edge2), [])
示例#2
0
 def test_interaction_parallel_15(self):
     # перпендикулярны, пересекаются
     edge1 = [(100, 100), (500, 100)]
     edge2 = [(150, 50), (150, 150)]
     self.assertEqual(real_intersect(edge1, edge2), [(150, 100)])
示例#3
0
 def test_interaction_parallel_9(self):
     # параллельны, пересекаются концом
     edge1 = [(100, 100), (500, 100)]
     edge2 = [(50, 100), (100, 100)]
     self.assertEqual(real_intersect(edge1, edge2), [(100, 100), (100, 100)])
示例#4
0
 def test_interaction_parallel_1(self):
     edge1 = [(78, 201), (718, 201)]
     edge2 = [(78, 497), (434, 495)]
     self.assertEqual(real_intersect(edge1, edge2), [])
示例#5
0
 def test_interaction_parallel_8(self):
     # лежат близко друг к другу, пересекаются
     edge1 = [(100, 100), (500, 100)]
     edge2 = [(100, 102), (300, 98)]
     self.assertEqual(real_intersect(edge1, edge2), [(100, 102), (300, 98)])
示例#6
0
 def test_interaction_parallel_7(self):
     # лежат близко друг к другу: общий кусок
     edge1 = [(150, 201), (718, 201)]
     edge2 = [(78, 205), (434, 207)]
     self.assertEqual(real_intersect(edge1, edge2), [(150, 201), (434, 207)])
示例#7
0
 def test_interaction_parallel_16(self):
     # лежат близко друг к другу: первая поглощает вторую, но разнонаправлены
     edge1 = [(40, 201), (718, 201)]
     edge2 = [(434, 207), (78, 205)]
     self.assertEqual(real_intersect(edge1, edge2), edge2[::-1])
示例#8
0
 def test_interaction_parallel_6(self):
     # лежат близко друг к другу: первая поглощает вторую
     edge1 = [(40, 201), (718, 201)]
     edge2 = [(78, 205), (434, 207)]
     self.assertEqual(real_intersect(edge1, edge2), edge2)
示例#9
0
 def test_interaction_parallel_5(self):
     # лежат близко друг к другу: начинаются в одной точке
     edge1 = [(78, 201), (718, 201)]
     edge2 = [(78, 205), (434, 207)]
     self.assertEqual(real_intersect(edge1, edge2), edge2)