In-situ alignment of 3D printed anisotropic hard magnets