Circles in two Curve

Does anyone know how to make uniform filling? (with the ability to change the distance).
how is it done by Peacock ?
do not offer anemone… :slight_smile:


circle 2 curve.gh (133.0 KB)

Did you look at this discussion ?

1 Like

thanks.
but there uses anemone.
and he does not work well with Human UI so I am looking for a way not to use anemone.

It looks like one of your clusters, Gems by 2 curves, is already doing a pretty good job.

The other cluster is a disaster!

P.S. At least one of the solutions @laurent_delrieu referred to uses Python, not Anemone.

2 Likes

yes my way looks bad :slight_smile: .
I do not know how to change the distance between the Circles through python.

What is the problem with using the Peacock component if it does what you want?

1 Like

sorry. and thanks for the help. but I’m wondering how it’s done.
my method works pretty well no closed curve. but it is bad for closed curve

Since it is an iterative process, you need to do it with scripting or Anemone. To do it correctly, you have to set many conditions to handle the different cases, such as that the curves are closed (the termination condition varies according to various parameters). It’s a process full of heuristics when you jump from the purely geometrical problem by giving it utility for jewelry. This happens in almost all serious tools, the old version of Peacock is a demonstration of the limitations of Grasshopper in this sense, you really need to program to make a serious and clean plugin. GH is lousy at handling a lot of complexity and development becomes a nightmare even with good practice. I recommend you to learn C# so you can use the Peacock 1 framework when I release it in a few months, or for to make this kind of tools properly.

1 Like

thanks for the answer. I would like to use Peacock for my project. but I do the maximally open algorithm in the grasshopper. for free use. so I wanted to create a different algorithm.

Here is a non-iterative solution - not quite what you want but simple!


circle 2 curve_2020Sep29a.gh (7.6 KB)

1 Like

This one is better as the circles are not evenly spaced so you can fit more of them. 19 instead of 16. The gaps between them aren’t quite even though, but clustering and another iteration of the same logic is worth trying… standby for that.


circle 2 curve_2020Sep29b.gh (22.7 KB)

2 Likes

Nope, no joy there. Amusing though?


circle 2 curve_2020Sep29c.gh (18.2 KB)

1 Like

Well basically you have three restriction curves, the two side curves and the previous circle. You make a tween curve between the two sides, and there has to be the centre of the next circle, at a distance greater than the radius plus separation with the previous circle. From the intersection of the tween curve with the previous circle (or from a better approximation), you start to move that parameter (curve position) forward of the tween curve with a small interval (small enough to be accurate, large enough to run fast) until the new circle with a given size enters in all those restrictions. And you repeat as long as you can still get circles in.

It depends a lot on how much you want to complicate or what requirements you put… but in essence it is an iterative process with restrictions, repeats a process that only outputs something when the conditions are met, then the state is updated and repeated again until some ending criteria, with some particular cases as the first or last circle and many heuristics to prioritize some criteria or others.

Anemone has a version that directly returns the final result, not good for you? I know it’s annoying to have to include dependencies in your projects, but the alternative here would be to make an ugly and fragile algorithm or one that doesn’t fit the jewelry design standards (for example you have a gem rail with shared prongs the stones must have a consistent separation regardless of their size so that the prongs to hold the stones properly).

1 Like

very interesting . Thank you very much. :sunglasses:

I cannot use Anemone. because it stopped working correctly as soon as I connect the Human UI interface.

Check this

circle 2 curve_2.gh (14.0 KB)

2 Likes

from watch the video how anemone does not work with human. !

test.gh (118.4 KB)

Try this and you must split closed curves than use mirror like in your example

circles between 2 crvs.gh (4.6 KB)

2 Likes

Good job. !
but is it possible to add the ability to change the distance between the Сircle ?

No, try to do that or use offset , i have no idea

1 Like