Mirror entities around the x axis of the workplane plane. :return: a new object with any free edges consolidated into as few wires as possible. All free edges are collected into a wire, and then the wire is mirrored, and finally joined into a new wire Typi
(self: T)
| 2253 | return consolidated.consolidateWires() |
| 2254 | |
| 2255 | def mirrorX(self: T) -> T: |
| 2256 | """ |
| 2257 | Mirror entities around the x axis of the workplane plane. |
| 2258 | |
| 2259 | :return: a new object with any free edges consolidated into as few wires as possible. |
| 2260 | |
| 2261 | All free edges are collected into a wire, and then the wire is mirrored, |
| 2262 | and finally joined into a new wire |
| 2263 | |
| 2264 | Typically used to make creating wires with symmetry easier. |
| 2265 | """ |
| 2266 | # convert edges to a wire, if there are pending edges |
| 2267 | n = self.wire(forConstruction=False) |
| 2268 | |
| 2269 | # attempt to consolidate wires together. |
| 2270 | consolidated = n.consolidateWires() |
| 2271 | |
| 2272 | mirroredWires = self.plane.mirrorInPlane(consolidated.wires().vals(), "X") |
| 2273 | |
| 2274 | for w in mirroredWires: |
| 2275 | consolidated.objects.append(w) |
| 2276 | consolidated._addPendingWire(w) |
| 2277 | |
| 2278 | # attempt again to consolidate all of the wires |
| 2279 | return consolidated.consolidateWires() |
| 2280 | |
| 2281 | def _addPendingEdge(self, edge: Edge) -> None: |
| 2282 | """ |