| 60 | |
| 61 | @pytest.fixture |
| 62 | def nested_assy(): |
| 63 | |
| 64 | b1 = cq.Workplane().box(1, 1, 1).faces("<Z").tag("top_face").end() |
| 65 | b2 = cq.Workplane().box(1, 1, 1).faces("<Z").tag("bottom_face").end() |
| 66 | b3 = ( |
| 67 | cq.Workplane() |
| 68 | .pushPoints([(-2, 0), (2, 0)]) |
| 69 | .tag("pts") |
| 70 | .box(1, 1, 0.5) |
| 71 | .tag("boxes") |
| 72 | ) |
| 73 | |
| 74 | assy = cq.Assembly(b1, loc=cq.Location(cq.Vector(0, 0, 0)), name="TOP") |
| 75 | assy2 = cq.Assembly(b2, loc=cq.Location(cq.Vector(0, 4, 0)), name="SECOND") |
| 76 | assy2.add(b3, loc=cq.Location(cq.Vector(0, 4, 0)), name="BOTTOM") |
| 77 | |
| 78 | assy.add(assy2, color=cq.Color("green")) |
| 79 | |
| 80 | return assy |
| 81 | |
| 82 | |
| 83 | @pytest.fixture |