| 363 | |
| 364 | |
| 365 | def test_single_ent_selector(): |
| 366 | |
| 367 | bs = box(1, 1, 1).moved((0, 0, 0), (2, 0, 0)) |
| 368 | |
| 369 | f = bs.face(">X") |
| 370 | |
| 371 | assert isinstance(f, Face) |
| 372 | |
| 373 | fs = bs.faces(">Z") |
| 374 | |
| 375 | assert isinstance(fs, Compound) |
| 376 | assert isinstance(fs.face(), Face) |
| 377 | |
| 378 | # check all options |
| 379 | assert isinstance(f.edge(">Z"), Edge) |
| 380 | assert isinstance(f.vertex(), Vertex) |
| 381 | assert isinstance(f.wire(">Z"), Wire) |
| 382 | assert isinstance(bs.shell(">X"), Shell) |
| 383 | assert isinstance(bs.solid(">X"), Solid) |
| 384 | assert isinstance(bs.face(NearestToPointSelector((0, 0, 1))), Face) |
| 385 | |
| 386 | with raises(ValueError): |
| 387 | bs.face("%CYLINDER") |
| 388 | |
| 389 | |
| 390 | def test_special(): |