MCPcopy
hub / github.com/CadQuery/cadquery / test_spline

Function test_spline

tests/test_free_functions.py:486–496  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

484
485
486def test_spline():
487
488 s1 = spline((0, 0), (0, 1))
489 s2 = spline([(0, 0), (0, 1)])
490 s3 = spline([(0, 0), (0, 1)], [(1, 0), (-1, 0)])
491
492 assert s1.Length() == approx(1)
493 assert s2.Length() == approx(1)
494 assert s3.Length() > 0
495 assert s3.tangentAt(0).toTuple() == approx((1, 0, 0))
496 assert s3.tangentAt(1).toTuple() == approx((-1, 0, 0))
497
498
499def test_spline_params():

Callers

nothing calls this directly

Calls 4

splineFunction · 0.85
LengthMethod · 0.45
toTupleMethod · 0.45
tangentAtMethod · 0.45

Tested by

no test coverage detected