| 212 | self.assertAlmostEqual(c.y, 0.5) |
| 213 | |
| 214 | def testParallelEdgeFilter(self): |
| 215 | c = CQ(makeUnitCube()) |
| 216 | for sel, vec in zip( |
| 217 | ["|X", "|Y", "|Z"], [Vector(1, 0, 0), Vector(0, 1, 0), Vector(0, 0, 1)] |
| 218 | ): |
| 219 | edges = c.edges(sel) |
| 220 | # each direction should have 4 edges |
| 221 | self.assertEqual(4, edges.size()) |
| 222 | # each edge should be parallel with vec and have a cross product with a length of 0 |
| 223 | for e in edges.vals(): |
| 224 | self.assertAlmostEqual(e.tangentAt(0).cross(vec).Length, 0.0) |
| 225 | |
| 226 | def testCenterNthSelector(self): |
| 227 | sel = selectors.CenterNthSelector |