Skip to content

Commit 997a277

Browse files
authored
Add rotateAboutCenter regression test (#982)
1 parent ccc8292 commit 997a277

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/test_cadquery.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,13 @@ def testRotate(self):
305305
self.assertEqual(-0.5, endPoint[1])
306306
self.assertEqual(2.5, endPoint[2])
307307

308+
def testRotateAboutCenter(self):
309+
r = Workplane().box(1, 1, 1).rotateAboutCenter((1, 0, 0), 20)
310+
assert len(r.edges("|X").vals()) == 4
311+
assert r.faces(">X").vertices("<Y").val().Center().toTuple() == approx(
312+
(0.5, -0.6408563820557885, 0.2988362387301199)
313+
)
314+
308315
def testPlaneRotateZNormal(self):
309316
"""
310317
Rotation of a plane in the Z direction should never alter its normal.

0 commit comments

Comments
 (0)