def test_control_vertices(p1): vertices = list(p1.control_vertices()) assert vertices == Vec3.list([(0, 0), (2, 0), (2, 1), (4, 1), (4, 0), (5, -1), (6, 0)]) path = Path() assert len(list(path.control_vertices())) == 0 path = converter.from_vertices([(0, 0), (1, 0)]) assert len(list(path.control_vertices())) == 2
def test_control_vertices(p1): vertices = list(p1.control_vertices()) assert close_vectors(vertices, [(0, 0), (2, 0), (2, 1), (4, 1), (4, 0), (5, -1), (6, 0)]) path = Path() assert len(list(path.control_vertices())) == 0 assert list(path.control_vertices()) == list(path.approximate(2)) path = converter.from_vertices([(0, 0), (1, 0)]) assert len(list(path.control_vertices())) == 2