Tests whether or not a wire can be mirrored if its mirror won't connect to it
(self)
| 2140 | self.saveModel(s) |
| 2141 | |
| 2142 | def testUnorderedMirror(self): |
| 2143 | """ |
| 2144 | Tests whether or not a wire can be mirrored if its mirror won't connect to it |
| 2145 | """ |
| 2146 | r = 20 |
| 2147 | s = 7 |
| 2148 | t = 1.5 |
| 2149 | |
| 2150 | points = [ |
| 2151 | (0, 0), |
| 2152 | (0, t / 2), |
| 2153 | (r / 2 - 1.5 * t, r / 2 - t), |
| 2154 | (s / 2, r / 2 - t), |
| 2155 | (s / 2, r / 2), |
| 2156 | (r / 2, r / 2), |
| 2157 | (r / 2, s / 2), |
| 2158 | (r / 2 - t, s / 2), |
| 2159 | (r / 2 - t, r / 2 - 1.5 * t), |
| 2160 | (t / 2, 0), |
| 2161 | ] |
| 2162 | |
| 2163 | r = Workplane("XY").polyline(points).mirrorX() |
| 2164 | |
| 2165 | self.assertEqual(1, r.wires().size()) |
| 2166 | self.assertEqual(18, r.edges().size()) |
| 2167 | |
| 2168 | # try the same with includeCurrent=True |
| 2169 | r = Workplane("XY").polyline(points[1:], includeCurrent=True).mirrorX() |
| 2170 | |
| 2171 | self.assertEqual(1, r.wires().size()) |
| 2172 | self.assertEqual(18, r.edges().size()) |
| 2173 | |
| 2174 | def testChainedMirror(self): |
| 2175 | """ |