Tests whether or not calling mirrorX().mirrorY() works correctly
(self)
| 2172 | self.assertEqual(18, r.edges().size()) |
| 2173 | |
| 2174 | def testChainedMirror(self): |
| 2175 | """ |
| 2176 | Tests whether or not calling mirrorX().mirrorY() works correctly |
| 2177 | """ |
| 2178 | r = 20 |
| 2179 | s = 7 |
| 2180 | t = 1.5 |
| 2181 | |
| 2182 | points = [ |
| 2183 | (0, t / 2), |
| 2184 | (r / 2 - 1.5 * t, r / 2 - t), |
| 2185 | (s / 2, r / 2 - t), |
| 2186 | (s / 2, r / 2), |
| 2187 | (r / 2, r / 2), |
| 2188 | (r / 2, s / 2), |
| 2189 | (r / 2 - t, s / 2), |
| 2190 | (r / 2 - t, r / 2 - 1.5 * t), |
| 2191 | (t / 2, 0), |
| 2192 | ] |
| 2193 | |
| 2194 | r = Workplane("XY").polyline(points).mirrorX().mirrorY().extrude(1).faces(">Z") |
| 2195 | |
| 2196 | self.assertEqual(1, r.wires().size()) |
| 2197 | self.assertEqual(32, r.edges().size()) |
| 2198 | |
| 2199 | # TODO: Re-work testIbeam test below now that chaining works |
| 2200 | # TODO: Add toLocalCoords and toWorldCoords tests |