Skip to content

Commit 7fe44b0

Browse files
committed
Test Edge.close
1 parent 55ba8ca commit 7fe44b0

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/test_cadquery.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4475,3 +4475,22 @@ def testParametricSurface(self):
44754475

44764476
self.assertTrue(r2.solids().val().isValid())
44774477
self.assertEqual(r2.solids().size(), 2)
4478+
4479+
def testEdgeClose(self):
4480+
4481+
# test with edge
4482+
e0 = Edge.makeThreePointArc(
4483+
Vector(0, 0, 0),
4484+
Vector(1, 1, 0),
4485+
Vector(0, 2, 0)
4486+
)
4487+
self.assertFalse(e0.IsClosed())
4488+
w0 = e0.close()
4489+
self.assertTrue(w0.IsClosed())
4490+
4491+
# test with already closed edge
4492+
e1 = Edge.makeCircle(1)
4493+
self.assertTrue(e1.IsClosed())
4494+
e2 = e1.close()
4495+
self.assertTrue(e2.IsClosed())
4496+
self.assertEqual(type(e1), type(e2))

0 commit comments

Comments
 (0)