additional checks in testParallelPlaneFaceFilter
This commit is contained in:
@ -146,7 +146,7 @@ class TestCQSelectors(BaseTest):
|
|||||||
self.assertNotEqual(c.faces("+X").val().Center(), c.faces("-X").val().Center())
|
self.assertNotEqual(c.faces("+X").val().Center(), c.faces("-X").val().Center())
|
||||||
|
|
||||||
def testParallelPlaneFaceFilter(self):
|
def testParallelPlaneFaceFilter(self):
|
||||||
c = CQ(makeUnitCube())
|
c = CQ(makeUnitCube(centered=False))
|
||||||
|
|
||||||
# faces parallel to Z axis
|
# faces parallel to Z axis
|
||||||
# these two should produce the same behaviour:
|
# these two should produce the same behaviour:
|
||||||
@ -162,6 +162,13 @@ class TestCQSelectors(BaseTest):
|
|||||||
# just for fun, vertices on faces parallel to z
|
# just for fun, vertices on faces parallel to z
|
||||||
self.assertEqual(8, c.faces("|Z").vertices().size())
|
self.assertEqual(8, c.faces("|Z").vertices().size())
|
||||||
|
|
||||||
|
# check that the X & Y center of these faces is the same as the box (ie. we haven't selected the wrong face)
|
||||||
|
faces = c.faces(selectors.ParallelDirSelector(Vector((0, 0, 1)))).vals()
|
||||||
|
for f in faces:
|
||||||
|
c = f.Center()
|
||||||
|
self.assertAlmostEqual(c.x, 0.5)
|
||||||
|
self.assertAlmostEqual(c.y, 0.5)
|
||||||
|
|
||||||
def testParallelEdgeFilter(self):
|
def testParallelEdgeFilter(self):
|
||||||
c = CQ(makeUnitCube())
|
c = CQ(makeUnitCube())
|
||||||
for sel, vec in zip(
|
for sel, vec in zip(
|
||||||
|
|||||||
Reference in New Issue
Block a user