Tangent closed curves - intersection issue

Hello All,
I have two closed curves that partially align, and there are portions on two sides where they diverge between tangent points. The radiuses of the constituent parts are adjustable with the sliders.
I need to find those points where they “touch”, but when I use CCX component I get only 2 points out of 4 and one more point in incorrect location:


Then I increase the small radius and get all four points, but also the 5th incorrect point:

Then I increase the radius further, and I loose all the points:

Is there a way to get just 4 correct points where the curves converge?

I understand the issue may be in that the curves do not really intersect, but rather are tangent.

Thank you,
2024 0921_Tangent closed curves.3dm (99.7 KB)
2024 0921_Tangent closed curves.gh (44.1 KB)

I generally don’t like doing things “quick and dirty” but your code is already like that anyway (not written “the Grasshopper Way”) and my day is done so here you go: (blue and white points)


Tangent closed curves_2024Sep21a.gh (44.3 KB)

I split the two curves in the middle and used CCX on both halves.

The whole thing could be done much cleaner.

Slightly more like “the Grasshopper Way”:


Tangent closed curves_2024Sep22a.gh (43.4 KB)

Thank you Joseph.
I’m an amateur in this.

So, the big question is why I was getting incorrect output and why splitting each loop in two has solved the issue - produced all the correct intersection points?

I don’t spend much time asking “Why?”. My focus is on how to get the results I want. In this case, it was a hunch that splitting the curves might work, which it does. :sunglasses: