Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add make_face localization test #309

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading