Bounding curve around set of circles

hello all,

i am trying to create a curve that encloses several circles.
when changing size and position of the circles the curve should adapt accordingly.

what i got so far is this:


i’ve tried the convex hull but that gives me straight lines between the circles.
what i need are arcs that i can adjust in the curvature. at the end it should look
similar to that - a nice clean curve with as few points as possible:

hopefully that was somehow understandable and someone can help me.
i’m at beginner level and just getting started with GH.

thanks in advance

there’s a component called Tangent Lines

but I think you want something different?

1 Like

thank you for looking into this alessandro.

but this is the same i already got.
i want the surrounding curve tangent to the circles but arched, not straight.

I had this from some time ago, might work but will need some adjustments (like handling many circles, now it just wants 2 of them)


2circle_external_tangent_arcs.gh (11.4 KB)

1 Like

You can use the Arc SED component. It requires a start point, end point and tangent vector.

PS: unfortunately this doesn’t work as it only takes one tangent vector… new solution below

Blue group slider moves tangent lines inward to find circle intersection points that yield tangents for BiArc.


TangentCrvs_2022Feb7a.gh (21.8 KB)

List of circles is sorted… from @martinsiegrist’s model.

P.S. Cut the circles at the tangent points to get a perimeter curve.


TangentCrvs_2022Feb7b.gh (29.5 KB)

OOPS! I pulled the tangents in instead of pushing them out. Oh well, it was fun.

Now this definition takes the same number of circles and text dots for the radius input. The text dots need to be roughly where the arc segment is going to be. Circles can be scaled and dragged.

22_02_07_arc_sed.3dm (51.6 KB)

22_02_07_arc_sed.gh (23.4 KB)

curve_around_circles.gh (17.0 KB)

2 Likes

YES!!!

thank you seghier. this is exactly what i was looking for :slight_smile:
one more question:
which component do i need to get a curve with as few points
as possible in the end (see my third picture above)?

when using the control point component i can see that there are too many points on the circle sections.
therefore the curvature seems to be “unclean”.


and also a great solution martin :+1:t2: grüezi!
but i don’t understand what the path slider is doing?

The path slider is there just to verify the tree structure

You can use Divide curve

I tried both BiArc and BzSpan (Bezier Span, white curves). There may be a way around this but I added a ‘VecMag’ slider (yellow group) to “fudge” vector magnitude values for BzSpan. This must be adjusted based on distance between circles, whereas BiArc works well with three sets of curves (blue group, upper left).


TangentCrvs_2022Feb8b.gh (36.7 KB)

The ‘VecMag’ slider (yellow group) needs adjustment for these, while BiArc works fine (‘Bend’ slider in blue group):


1 Like

I also ‘have’ this ‘problem’ all the time.
Definitely studying all provided answers here.

It reminds me of Daniel Piker’s 2D pressure, which also provides exploration advantages:

Best

1 Like

Fixed! Instead of slider, used half the Distance between start and end points. Different curve than the piped BiArc but consistent for all three sets of circles.


TangentCrvs_2022Feb8c.gh (37.5 KB)

P.S. Extended bottom range of ‘Bend’ slider (changed from min = 0 to min = -1, blue group) to get concave tangents in addition to convex,


TangentCrvs_2022Feb8cc.gh (33.3 KB)

2 Likes

thank you very much joseph.

a lot of work! i don’t even understand half of what everything is doing in your definition.
as i said i’m a beginner.

when i bake the resulting curves everything seems to be tangent (see curvature graph):

three control points on the circle sections is just what i wanted.
but there is an offset in the middle of every arc. i wonder if this a break in the curvature or something?
it is still there even if i delete the control points (red) in the middle. no matter i will get that sorted.


new questions:

1. somehow i don’t manage to access the circles to change size and position.
circle component says that there are 4 locally defined values. how can i get in there?

2. what is the tube for?


kind regards
thomas


ps: you are more the top-down-GH-man, right? :grin:

Create your own list of circles any way you like. I modified this model for another thread with a ‘Random Subset’ feature (pink group) to use a subset of the list of circles as a quick way of trying any two circles. Then I found I needed to sort the circle segments differently (teal group).

The “tube” (Pipe) is just cosmetic to show the complete perimeter curve, which is constructed from curve fragments.


TangentCrvs_2022Feb9aa.gh (38.4 KB)