def get_unit_cell_spider() -> pv.PolyData:
    """Return a spider unit. The spider has legspan that is slightly smaller
    than the box face, and is in a position so it appears to be standing on the
    box unit.

    Having the spider unit standing on the box centered at origin will make it
    easier for rotating the spider on a box.

    Returns:
        pv.PolyData: ``pv.Polydata`` containing the spider unit.
    """
    default_spider = examples.download_spider()
    default_spider.points /= 6
    default_spider.translate([-0.5, -0.5, 0.4])
    default_spider.rotate_z(-110)
    return default_spider
Ejemplo n.º 2
0
 def test_download_spider():
     data = examples.download_spider()
     assert data.n_cells