Learning to 3D print