A Photosensor-Based Measuring System for Precision Mechanics