Solid Brep Packing Simulation in Kangaroo_Wall art

Hello everyone,

I am trying to make a small art piece in which I am using 5 different sizes of cylinders and populate it on a surface to create something like this

I am able to solve basic move and orientation problems but now, my geometry is intersecting with each other.

And I am not able to find any solution for solid geometry packing. I see some circle packing techniques on the forum but that is only for 2d geometry. so maybe that will not come in use ( I guess).

so any suggestions on how should i solve this problem?

I try rigid body collide but this type of result is coming which is not desired

(this kangaroo definition is not added in the script because it was not working) (365.5 KB)

Thank you

I didn’t look at your script, but it seems you have to first try to understand how you could do this object for real with your hands. For me it is an iterative process. Place a cylinder, then place another close … What is your logic to place the cylinder ?

yes, you are correct the fabrication process going to be similar as you mentioned.

but first, if we solve this self-intersection problem with Grasshopper (maybe using kangaroo). we will have an exact number of pieces according to size. and we can use an image sampler to generate some kinda pattern.

Kangaroo could surely be useful, but if you want to stay with cylinders aligned (all axis parallel) the computation is more simple. So for this kind of job I prefer to implement something with some code and Objects/Classes (C# for me).
A cylinder could be defined by 2 points P1, P2 (same Y Z, if on X axis ) and a radius.
A cylinder touches another cylinder if there X coordinates intersect and if distance between axis are less than the sum of radiuses.

sorry but not able to understand this completely A cylinder could be defined by 2 points P1, P2 (same Y Z, if on X axis ) and a radius. this line.

but I get a vague idea of what to do.

and is it possible through anemone and not C# because I am currently learning C# so don’t have much knowledge about it.

but I think this series of tutorials will cover that kinda problem if I am correct

in this, professor @LongNguyen was teaching how to generate a non-self intersection mesh. (maybe this will come in use)

and please also suggest if you have any references for this

I have no good references. I learned by doing and searching. But there are 3 things to study Coding , Algorithm and Libraries.
For the first there tons of tutorials for different languages.
For the second it is less simple as it depends on what you want to achieve. I thing it is best to learn by doing.
For the third it is mainly Rhinocommon library, but also Grasshopper, Kangaroo, … and many others you will have to discover. Not easy because it is quite huge.

1 Like

I think the way I would approach this would be to split it into a series of 1 directional circle packing problems and 1 directional rectangle packings (each of which could be solved with kangaroo or scripting. I think you could even do each individual stage without either, but you’d probably still need a way to iterate, such as octopusLoop).

So first make a row of touching circles along one axis,
When these circles are extruded into cylinders they are rectangles in the orthogonal view - move these rectangles along one axis until they touch the existing ones,
then return to step one and repeat until you’ve filled the required area.

1 Like

I think I need to work super hard and learn coding as early as possible to make life easier :sweat_smile:

yes sir, but I think for now approach from kangaroo would be a little easier.

such as circle packing how can we use a rectangle for packing ? any suggestions?