3D printed magnet