hello everybody
i came across the following problem - and it seams a nice challenge:

2 circles (blue) are not on the same plane (darkRed)
a 3rd circle is searched orange sketch in 1st picture, green solution in 2nd - it should be tangent in 3d to both input circles. (magenta points in sketch)

__Circle _Tangent FromFirstPoint will give imprecise or wrong results
_split the result and check with _GCon

i did not manage to find a pure, geometry solution.
I calculated the distance (o) to (x).
And of course an iterative, recursive approach would be possible as well.
But i want a nice more or less “circle, ruler and pencil” solution.

for co-planar circles - a nice approach is described: (here)

have fun.
(@pascal i think you will like it and manag to do it in 5 min ?)

Dear Pascal - thanks for your fast Answer. But are you sure? Did you check the result with _GCon ?
for -Circle _Tangent _Tangent i get multiple solutions depended on the points i pick. and most of them are only Tangent to one of the input circles. - and they fail with _GCon (G0) And i am not sure / but i think there should only be one or two solutions.

Command: GCon
Curve end difference = 0.000 millimeters
Radius of curvature difference = 70.000 millimeters
Curvature direction difference in degrees = 133.786
Tangent difference in degrees = 0.000
Curves are G1.

albiet, thats splitting at the intersections of the green and blue circles as well as splitting the blue circles at another point then running GCon on the resulting blue and green Arcs.

i’m not really sure but at first think, there are either two answers or no answers depending on where the first point is placed…

Circle->Tangent->Tangent (or Circle->Tangent->FromFirstPoint) seems to give the correct solution(s) when available, but, if there isn’t a solution, it will still draw a circle that’s tangent to only one of the other circles… so that can be confusing if this is actually what’s going on. (but again, i didn’t really experiment much or prove any of my assumptions to be true)

As i wrote in the initial post: i got the right solution, by calculating the distance from (o) to (x)
For each circle, there are 2 rectangular triangles (orange and light blue) - i marked them with an offset, and a camfer in the rectangular corner.
we need to find the position of (x).
the Distance (x) to (t1) is the same as (x) to (t2) - magenta lines.
for each circle the the two triangles share one side - cyan - (m1)(x) using Pythagoras:
orange triangle
(x)(m1) ^2 = (o)(x) ^2 + (o)(m1) ^2
light blue triangle:
(x)(m1) ^2 = (x)(t1) ^2 + (t1)(m1) ^2

(m1)(t1) is the radius

same for other Circle
…

(x)(t1) == (x)(t2)

with some changes this will give a luckily linear equation and a solution for (o)(x)

that s how i did it.

but it is not the paper and pencil solution - and not a just rhino command solution.
And yes i agree with jeff, that it is confusing to get a only one side tangent solution

put a point where you’ve labeled ‘t1’… delete/hide everything except the blue circles and the point… run the Circle command and use the tangent option… click on the t1 point… then choose the From first point option and you’ll get the same circle as the green one.

(and you’ll get the other available result if you move the cursor to the opposite side of the small blue circle in the last step)

Dear Jeff - thanks again for your input.
the point (t1) is already part of the solution - sorry if i was unprecise - i update the initial post to make it more clear.

[edit] the following is bad/incorrect info - jh [/edit]

i guess it’s me that’s being unclear.
there isn’t only one solution… or two solutions…

there are infinite solutions… however, these solutions will only occur within a certain part of the circles… if you go outside of the range, the Circle command will still draw a circle that’s not tangent to the others…

this shows two of the other possible solutions… the yellow circle is Not a proper solution although it was created the same was as the correct ones.

i understand that you did some stuff to find the point x in you example… however, point x is nothing special in regards to finding THE solution because there isn’t only one solution… point x is moreOrLess an arbitrary point… you could move it somewhere else and still find another possible circle that’s tangent to the two circles.