Magnetic polyhedra