Skip to content

Commit

Permalink
add make_face localization test
Browse files Browse the repository at this point in the history
  • Loading branch information
jdegenstein authored Aug 31, 2023
1 parent 03d599d commit 977f83a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_build_sketch.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,16 @@ def test_mode_replace(self):
Rectangle(10, 10, align=(Align.MIN, Align.MIN), mode=Mode.REPLACE)
self.assertAlmostEqual(test.sketch.area, 100, 5)

def test_make_face_localization(self):
with BuildSketch(Plane.YZ) as test:
with BuildLine(Plane.YZ):
m1 = JernArc((0, 46), (1, 0), 40, -90)
m2 = Line(m1@1, m1@0)
make_face()
bbox_center = test.sketch.bounding_box().center()
self.assertAlmostEqual(bbox_center.X, 0.0)
self.assertAlmostEqual(bbox_center.Y, 20.0)
self.assertAlmostEqual(bbox_center.Z, 26.0)

class TestBuildOnPlanes(unittest.TestCase):
def test_plane_xz(self):
Expand Down

0 comments on commit 977f83a

Please sign in to comment.