(self)
| 4305 | self.assertTupleAlmostEquals((0, 0, 5), obj1.val().Center().toTuple(), 9) |
| 4306 | |
| 4307 | def testWorkplaneFromTagged(self): |
| 4308 | |
| 4309 | # create a flat, wide base. Extrude one object 4 units high, another |
| 4310 | # object on top of it 6 units high. Go back to base plane. Extrude an |
| 4311 | # object 11 units high. Assert that top face is 11 units high. |
| 4312 | result = ( |
| 4313 | Workplane("XY") |
| 4314 | .box(10, 10, 1, centered=(True, True, False)) |
| 4315 | .faces(">Z") |
| 4316 | .workplane() |
| 4317 | .tag("base") |
| 4318 | .center(3, 0) |
| 4319 | .rect(2, 2) |
| 4320 | .extrude(4) |
| 4321 | .faces(">Z") |
| 4322 | .workplane() |
| 4323 | .circle(1) |
| 4324 | .extrude(6) |
| 4325 | .workplaneFromTagged("base") |
| 4326 | .center(-3, 0) |
| 4327 | .circle(1) |
| 4328 | .extrude(11) |
| 4329 | ) |
| 4330 | self.assertTupleAlmostEquals( |
| 4331 | result.faces(">Z").val().Center().toTuple(), (-3, 0, 12), 9 |
| 4332 | ) |
| 4333 | |
| 4334 | def testWorkplaneOrientationOnVertex(self): |
| 4335 |
nothing calls this directly
no test coverage detected