Added handling of non coplanar faces to BuildSketch

This commit is contained in:
Roger Maitland 2023-03-06 09:13:14 -05:00
parent ee35bfe0b0
commit 2850ac7266
2 changed files with 17 additions and 0 deletions

View file

@ -117,6 +117,15 @@ class TestBuildOnPlanes(unittest.TestCase):
Rectangle(1, 1)
self.assertTrue(sketch_builder.sketch.faces()[0].is_coplanar(Plane.XZ))
def test_not_coplanar(self):
with self.assertRaises(ValueError):
with BuildSketch() as error:
Add(Face.make_rect(1, 1, Plane.XY.offset(1)))
with self.assertRaises(ValueError):
with BuildSketch() as error:
Add(Face.make_rect(1, 1, Plane.XZ))
class TestBuildSketchExceptions(unittest.TestCase):
"""Test exception handling"""