| 82 | |
| 83 | @pytest.fixture |
| 84 | def nested_assy_sphere(): |
| 85 | |
| 86 | b1 = cq.Workplane().box(1, 1, 1).faces("<Z").tag("top_face").end() |
| 87 | b2 = cq.Workplane().box(1, 1, 1).faces("<Z").tag("bottom_face").end() |
| 88 | b3 = cq.Workplane().pushPoints([(-2, 0), (2, 0)]).tag("pts").sphere(1).tag("boxes") |
| 89 | |
| 90 | assy = cq.Assembly(b1, loc=cq.Location(cq.Vector(0, 0, 0)), name="TOP") |
| 91 | assy2 = cq.Assembly(b2, loc=cq.Location(cq.Vector(0, 4, 0)), name="SECOND") |
| 92 | assy2.add(b3, loc=cq.Location(cq.Vector(0, 4, 0)), name="BOTTOM") |
| 93 | |
| 94 | assy.add(assy2, color=cq.Color("green")) |
| 95 | |
| 96 | return assy |
| 97 | |
| 98 | |
| 99 | @pytest.fixture |