Thanks Terry. Reason I did it with the distance across flats is that usually that would be the known parameter as dictated by standard wrench sizes. I can see though where the shaft diameter would be rather convenient. Anyway not a problem to derive one from another. What I do like in your approach is, as I mentioned, the option to do this in multiple passes.
Yes, the math with arcs is going to be painful. Interesting how it will work out.
Dan