hexagon logo

Inspection of gage dimensions

Hello everyone Slight smile
I need to inspect some gage on a circular part as shown in image.
1st case : Diameter should be kept constant and distance to be inspected
2nd case : Distance should be kept constant and dimeter to be inspected

how should I proceed with programming for the same?