Fix extrude of non-planar face Issue #307

This commit is contained in:
gumyr 2023-08-29 10:33:37 -04:00
parent 8970b73e46
commit 750fa0e071
2 changed files with 16 additions and 1 deletions

View file

@ -274,6 +274,12 @@ class TestExtrude(unittest.TestCase):
extrude(square.sketch, amount=10)
self.assertAlmostEqual(box.part.volume, 10**3, 5)
def test_extrude_non_planar_face(self):
cyl = Cylinder(1, 2)
npf = cyl.split(Plane.XZ).faces().filter_by(GeomType.PLANE, reverse=True)[0]
test_solid = extrude(npf, amount=3, dir=(0, 1, 0))
self.assertAlmostEqual(test_solid.volume, 2 * 2 * 3, 5)
class TestHole(unittest.TestCase):
def test_fixed_depth(self):