Carnot's Theorem

O is the circumcenter of the triangle ABC and O' is the incenter. Carnot found a relationship between the radii of these two circles and the sum of the distances from the circumcenter to the three sides of the triangle. Can you prove this relationship? Can you devise a way to repair it in the circumstances in which it does not seem to work?