Spline tangnet fix for offset workplane (#293)

Fixes #292
This commit is contained in:
Adam Urbańczyk
2020-03-06 22:18:31 +01:00
committed by GitHub
parent cd66589e4e
commit b9d3a1c187
2 changed files with 11 additions and 1 deletions

View File

@ -545,6 +545,13 @@ class TestCadQuery(BaseTest):
path1 = Workplane("XZ").spline(pts[1:], includeCurrent=True).val()
self.assertAlmostEqual(path.Length(), path1.Length())
# test tangents and offset plane
pts = [(0, 0), (-1, 1), (-2, 0), (-1, 0)]
tangents = [(0, 1), (1, 0)]
path2 = Workplane("XY", (0, 0, 10)).spline(pts, tangents=tangents)
self.assertAlmostEqual(path2.val().tangentAt(0).z, 0)
def testSweep(self):
"""
Tests the operation of sweeping a wire(s) along a path