| 850 | ) |
| 851 | |
| 852 | def testSplineInputValidation(self): |
| 853 | |
| 854 | points = [(0, 0), (1, 1), (2, 0)] |
| 855 | tangents = [(0, 0.5), (1, 0), (0, -1), (-1, 0)] |
| 856 | |
| 857 | with raises(ValueError): |
| 858 | spline = Workplane().spline(points, tangents=tangents) |
| 859 | |
| 860 | with raises(ValueError): |
| 861 | Workplane().spline( |
| 862 | points, periodic=False, parameters=[x for x in range(len(points) + 1)], |
| 863 | ) |
| 864 | |
| 865 | with raises(ValueError): |
| 866 | Workplane().spline( |
| 867 | points, periodic=True, parameters=[x for x in range(len(points))], |
| 868 | ) |
| 869 | |
| 870 | def testRotatedEllipse(self): |
| 871 | def rotatePoint(x, y, alpha): |