MCPcopy Index your code
hub / github.com/CadQuery/cadquery / testSplineInputValidation

Method testSplineInputValidation

tests/test_cadquery.py:852–868  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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):

Callers

nothing calls this directly

Calls 2

WorkplaneClass · 0.85
splineMethod · 0.45

Tested by

no test coverage detected