Compensation for measured deviation of tool path, as function of lenght of path