Tangent arcs with a "convex" curve - strange behavior

Hello All,
I have made this figure with 4 smaller circles connected by 2 concave arcs, 1 line and a convex arc.
image
As I decrease the radius of the convex arc it flips to the other side together with one small circle, like this:
image
Also, after I join these 8 pieces and then explode them, the result of explode is, somehow, 9 pieces and one of the smaller circles if broken in two.

These glitches are not super critical, but I wonder if knowledgeable people here could give me an idea what might explain this behavior, so I compose scripts more correctly.

Relevant older thread:

Thank you All,
4Cir 3Crv 1Ln-2.gh (18.2 KB)

Just saw this thread. Did you ever solve your problem? If not, I’d suggest taking my solution for the “tangent circles outside” and intersecting that circle with the two smaller circles you have. If you then shatter the large circle at these intersection points, you can sort the two segments by their length and always take the shorter arc, which should be the one you want.

… i also just saw this thread.
looks like a nice geometric challenge…
and it is a unsatisfying rainy day today… so hopefully this helps:

construction


Circle A B and given Radius R = 200
draw additional concentric circles with
R+rA
R-rA
around Center of A … same for B

the intersections of the “+r” and “-r” circles are already the searched center points.
some additional lines from the new Centers to the old Centers will give the start/endpoints of the searched arcs.

… a similar construction is found here as video

CircleTangentTangentR.3dm (2.9 MB)

grasshopper script

implementing above as c# script.
The script does not care about special cases (180-degree-arcs)
I tried to keep everything sorted. The order of input Circles matters.

Did only test in 2d / WorldXY

CircleTangentTangentR_tomp_02.gh (16.1 KB)

arc vs circle

please note that a cicle can be easily extracted from an arc:
Screenshot 2024-09-26 at 20.49.28
just plug the arc into a circle parameter.

kind regards -tom

2 Likes

Looks like this one:

not exactly:

this topic:

given: 2 circles, Radius R
searched: a 3rd circle / arc with Radius R, tangent to the first 2 circles

the linked topic:

given: 3 circles
searched: a 4th circle, tangent to all of the first 3 circles.

but it s great to have those “circle with condition… searched” topics linked.

cheers - tom

I agree and your construction makes total sense.
But I have no clue how the version with 3 given circles is resolved - can’t wrap my head around the math formula that Ed proposed in his script.

Did not really solve.
I have a script that “kind of” works, but not really. Because the large curve flips to the wrong side par my 3rd image in the initial post.
the issue seems to be that when the radius of the large arc becomes small (below 280) and the tangent point goes past the “seam” of the small circle, for some reason the list item with index 0 starts to pick up the wrong fragment of the shattered arc:


Files here:
4Cir 3Crv 1Ln-2.3dm (88.2 KB)
4Cir 3Crv 1Ln-2.gh (18.7 KB)

i’ve put some effort in my script to keep the arcs sorted.
check the code, i wrote some comments.
(a) Basically with Vector-CrossProduct you can decide if a point is left or right of a line (in 2d).
(b) Rhinocommon intersection methods will provide the curve Parameter - I look at this as well to sort and pick the right Points.
(c) and - with a small performance disadvantage / laziness - I use StartPoint-PointOnArc-Endpoint to get the correct Arc.

or in your definition:

The result of (1) - red group
do not trust the index it might change.
so you need to do some logic with the crossproduct to find the correct left or right-sided point.

same for the result of (2)
do not trust a fixed index.
again some logic to pick the correct result - i used (c) StartPoint-PointOnArc-Endpoint to get the correct Arc.

and as stuff get s complicated un unreadable quite fast - that s why I prefere to code it text-based.

kind regards -tom

This is interesting…
Have you attached the file?

Last time I was not able to open your C# as I’m on Rhino 7 and older GH (1.0.0007)
with older C#. Any chance to save it down somehow for my older GH?

voila:
CircleTangentTangentR_tomp_02_rh7.gh (14.3 KB)

Tom,
for some reason getting these errors:

  1. Error (CS0246): The type or namespace name ‘CircleCircleIntersection’ could not be found (are you missing a using directive or an assembly reference?) (line 148)
  2. Error (CS0117): ‘Rhino.Geometry.Intersect.Intersection’ does not contain a definition for ‘CircleCircle’ (line 148)
  3. Error (CS0103): The name ‘CircleCircleIntersection’ does not exist in the current context (line 150)

I don t get any errors in
Version 7 (7.37.24004.15002, 2024-01-04)
on a mac.

the using directive on question is there.

Screenshot 2024-10-03 at 21.58.40

which version of rhino do you run ?
are you running the latest version of Rhino 7 ?
with a legal licence ?

post your systemInfo via command _systeminfo