Automating the Programming of Robot-Based Optical 3D Measuring Systems