Circle packing with fixed radius and fixed number of circle for each radius

It looks like the main Kangaroo solver component isn’t loading.
This is usually due to a blocked dll.
I presume you’re on Rhino 5?
Go into the directory where you installed Kangaroo, and for both the dll and gha, right click, select properties and unblock. Then restart Rhino and it should work.

Thank you very much thats working now! i got the current version of kangaroo as suggested.

@DanielPiker this might be a redundant question but how exactly do I change the assembly reference?

Rhino 5 for Mac with latest GH

Thanks!

1 Like

Hello again, do you have an image of this script? struggling to make connections for missing plugins even though i have downloaded them

Hi!
Is there an option to put this circles of fixed radius at defined surface? I want to make something like this:

I’d be very grateful for any help or tips

1 Like

Right click the C# component, and select ‘Manage Assemblies’

It looks like in that image they’ve used a compact circle packing (each gap between the circles has 3 sides)
In general this will mean the circles are all of slightly different sizes.
You can pack circles of predefined sizes on a surface with the definitions I posted above, just adding an OnMesh goal with your target surface, but it won’t be as neat - many of the spaces between the circles will have 4 or more sides.
Here’s an example for a compact circle packing on a surface:
CompactCirclePackingOnSurface.gh (40.9 KB)


For more about compact circle packings, see this paper
http://www.geometrie.tugraz.at/wallner/packing.pdf
or Mathias Höbinger’s thesis

9 Likes

Hi Daniel,

Big fan of your work! I am trying to get this result you have in your image here, using the script you provided (CompactCirclePackingOnSurface.gh), however whenever I try to use brep to mesh of the same brep geometry, it never works well… I am not sure what to put as the input for the mesh. I was wondering if you have a quick answer for that question.

Best,
Frank

Hi, Daniel
Thanks for your script, but I get a error message:

  1. Solution exception:Unable to cast object of type ‘Collider2’ to type ‘KangarooSolver.IGoal’.

How could I fix it?
Rhino Version 6SR13

@DanielPiker smae issue as @wdppan here for me … any insight ?

Hi - Are you on Rhino6?
Make sure the assembly reference points to the same one Grasshopper is loading
Typically this is in:

C:\Program Files\Rhino 6\Plug-ins\Grasshopper\Components

Note that this is different from the Users…AppData folder where it would usually be in Rhino 5

1 Like

hey @DanielPiker ! yes i am on R6

You were right : i already added the right assembly for R6 but while keeping the old one too … :rofl:

Sorry and thank you very much
Great work By the way !!

1 Like

Clean new install of Kangaroo doesn’t include the timer and from what Ive read… one doesn’t need the timer anymore!? Can you illustrate how to do this please, or repost with the timer exchanged for the updated process… i.e. as described here:

Hi @sheridan - sorry for not replying to this earlier.
That’s correct - you don’t need a timer component any more with Kangaroo. It automatically keeps iterating until convergence.
Which definition are you asking about? The ones posted in this thread are already in Kangaroo2, and should just run when you open the file. You can reset the sim by pressing the button connected to Reset, and start/stop it with a boolean toggle connected to the ‘On’ input.

Hello Daniel,

I am so fun of your work especially the folding …… I have made a code myself for circle packing -BUT IT NEEDS TO BE WITH THE SAME RADIUS that’s very import! But there is something wrong in the script they don’t move or change ? Can you please tell me why my script is not working?

Thank you so much!
circle packing.gh (24.2 KB)

Hi Daniel

I am trying to use the definition you posted to build circle packing with fixed radiuses on a sphere. Running the algorithm, I receive multiple errors, as you see in the below picture, and if I give it a new mesh such as a sphere, it doesn’t produce a compact suitable circle packing. Could you please help me to fix this problem?

Thank you in advance


Hi @hooshmandmehrnaz

I can’t tell your problem from the screenshots.
For keeping points on a sphere though, I find it generally works better to use length goals keeping them at the same distance from an anchored point, instead of meshing the sphere and keeping them on that.

How can I add more variations of sizes? :sweat_smile:

Hey @DanielPiker !
I have been following some of your posts on circle packing and it has been of great help. I wanted to get something like your brazilnut on a 3D mesh where the bigger circles are the bottom and the smaller ones are packed at the top. Also if it’s possible to control their radius as well. Could you help me figure it out? I would really appreciate it. Thanks.

Hi @anagha.bnca,

Here’s an example.
The trick is to create a mesh with vertex colours, and pass that to the ImageCircles component.
The mesh colours tell the circles what size to be when they are on that part of the mesh.


circle_sizegradient.gh (20.3 KB)

12 Likes