Automated precision measurement of surface profile in CAD-directed inspection