Distributing breps according to criteria

Hello there.

I am using Galapagos to find a desirable objects distribution within the area. The issue is that I do not have working transformations to feed it.
I am trying to distribute 4 buildings breps within the curve visible on the screenshot. It would be great if they could move and rotate freely within the boundary with two criteria:

  • they cannot intersect with each other and
  • they cannot intersect with the boundary curve.

As I am a beginner I am finding it hard to constraint components that move breps to achieve these conditions. Any suggestions would be really appreciated.

Thanks in advance!

Jan

Install K2 (Kangaroo: the GH Physics Engine by Daniel) and have fun. That said the attached is just an entry Level indicative demo: you can constrain any (reasonable) result imaginable especially if/when code is used (meaning in plain English: write custom K2 goals that suit your needs).

Obviously in real-life cases (breps in BrepFaces that emulate some terrain) some steps more are required … but the gist should be clear.

Notify if by accident you speak C#.

K2_ShapeCollide_V2.gh (24.0 KB)

Thank you Peter! I installed Kangaroo but honestly I will need to do some tutorials probably.
I realized that what I want to do is a bit more complicated.
Alternatively, are there any components that allow to input obstacles that could limit the movements (similar to input in Isovist component)?
Thanks!

Well … as exposed in the demo provited is very simple (but if K2 is an allien thingy to you … there’s a mountain to climb (or a hill at best)). But no pain == no gain meaning that I would strongly advise to spend some time in order to get the gist of that Physics Engine (by a huge margin the best add-on that GH has to offer).

That said I could provide a C# that does an auto arrangement of your footprints in any BrepFace … but what could be the benefit? (if we forget the black box [C#] part of the story) None since K2 has a lot of things more to offer.

Have a try opennest Plugin.

Thank you Peter, I think climbing the hill is well worth doing!

Thanks a lot, that seems like a perfect match! I’m having some issues with selecting breps but this probably can be solved.

You have 2 things to climb: Everest (Coding, a MUST in the years to come … while time flies and reversing it is not yet mastered) and a small hill (K2).

That said since “packing” buildings in NOT the same as packing bananas … your goal is far more complex/challenging than you think (having reality in mind).

Moral: hurry because always is too late.