Since I am not getting any replies about subroutines, I did restructure again so that I can copy DC and make a few changes to produce a component that maintains distances.
The example would work for a garage door ( using ASIN & ACOS for angles ).
The calculations were adapted from
http://local.wasp.uwa.edu.au/~pbourke/geometry/sphereline/
http://local.wasp.uwa.edu.au/~pbourke/geometry/2circle/
There are some weird bugs in sketchup when using large numbers, in addition to the SQRT problems.
skyfish