Magnets production