def test_get_orthogonal_vectors(self): round_shape = Shape( [ (4.5, 1), (4, 1), (3.5, 1), (3, 1), (2.5, 1.5), (2, 2), (1.5, 2.5), (1, 3), (1, 3.5), (1, 4), (1.5, 4.5), (2, 5), (2.5, 5.5), (3, 6), (3.5, 6), (4, 6), (4.5, 6), (5, 6), (5.5, 5.5), (6, 5), (6.5, 4.5), (7, 4), (7, 3.5), (7, 3), (6.5, 2.5), (6, 2), (5.5, 1.5), (5, 1), ] ) ort_vects = round_shape.get_orthogonal_vectors() print(ort_vects) plot_shape(round_shape, display=False) plot_vecs(ort_vects, round_shape.as_point_list())
def test_as_point_list(self): s1 = Shape([(1, 2), (2, 1)]) self.assertListEqual(s1.as_point_list(), [Point(1, 2), Point(2, 1)])