Precise control of variable-height laser metal deposition using a height memory strategy