()
| 388 | |
| 389 | |
| 390 | def test_special(): |
| 391 | |
| 392 | c = compound(box(1, 1, 1), box(2, 2, 2), box(3, 3, 3)) |
| 393 | |
| 394 | assert isinstance(c[0], Solid) |
| 395 | assert isinstance(c[-1], Solid) |
| 396 | assert isinstance(c[:2], Compound) |
| 397 | |
| 398 | cf = c.filter(lambda x: x.Volume() <= 1) |
| 399 | assert len(cf.Solids()) == 1 |
| 400 | |
| 401 | cs = c.sort(lambda x: -x.Volume()) |
| 402 | assert cs[0].Volume() == approx(3 ** 3) |
| 403 | |
| 404 | |
| 405 | def test_center(): |