  A method to create a highly homogeneous magnetic field by applying topology
optimized, additively manufactured shimming elements is investigated. The
topology optimization algorithm can calculate a suitable permanent and
nonlinear soft magnetic design that fulfills the desired field properties. The
permanent magnetic particles are bonded in a polyamide matrix, and they are
manufactured with a low-cost, end-user 3D printer. Stray field measurements and
an inverse stray field simulation framework can determine printing and
magnetization errors. The customized shimming elements are manufactured by a
selective melting process which produces completely dense soft magnetic metal
parts. The methodology is demonstrated on an example of two axial symmetric
cylindrical magnets. In this case, the homogeneity can be increased by a factor
of 35. Simulation and measurement results point out a good conformity.
