Camera distance from mesh not center

(A) Sphere size 1.
Camera distance 2.

(B) Sphere size 10.
Camera distance 2.

(C) Sphere size 0.1
Camera distance 2.

In A camera position is ok, at B Camera position is inside the Sphere. How would you transform not from center but from the mesh instead? I could calculate 10 + 2 and make position to 12. Is there another way? And C would be too far away.

the mesh is showing the sphere in space you would have to setup the camera distance to just outside the shape i do not really know any other way yet because this software is new to me so i could be wrong.