A Continuous Motion Shape-from-Focus Method for Geometry Measurement during 3D Printing