Skip to content

Commit

Permalink
test_build_line.py -> add test for vertex/start position
Browse files Browse the repository at this point in the history
  • Loading branch information
jdegenstein authored Jun 24, 2024
1 parent bee6642 commit 74f5f68
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_build_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,15 @@ def test_jern_arc(self):
self.assertAlmostEqual(iso1.radius, 1)
self.assertAlmostEqual(iso1.length, pi)

with BuildLine() as l:
with BuildLine() as full_l:
l1 = JernArc(start=(0, 0, 0), tangent=(1, 0, 0), radius=1, arc_size=360)
l2 = JernArc(start=(0, 0, 0), tangent=(1, 0, 0), radius=1, arc_size=300)
self.assertTrue(l1.is_closed)
self.assertFalse(l2.is_closed)
circle_face = Face(l1)
self.assertAlmostEqual(circle_face.area, pi, 5)
self.assertTupleAlmostEquals(circle_face.center().to_tuple(), (0, 1, 0), 5)
self.assertTupleAlmostEquals(l1.vertex().to_tuple(), l2.start.to_tuple(), 5)

l1 = JernArc((0, 0), (1, 0), 1, 90)
self.assertTupleAlmostEquals((l1 @ 1).to_tuple(), (1, 1, 0), 5)
Expand Down

0 comments on commit 74f5f68

Please sign in to comment.