Determination of Extreme Distances of a Robot Hand—Part 1: A General Theory