Parametrically moving geometries on a surface

Hello, everyone!

I’m dealing with a complicated situation for me. I want to “move parametrically” the red buildings in the picture on one surface without hitting other buildings. I expect inspiration from you for this. Of course, I would be very happy if anyone could create an algorithm that would provide the entire solution, but there is no need for it. Just inspiration.

This topic is very important to me.
Thank you very much in advance.!

red|690x442

If your “move” rules are simple (say: something "“like” pack with respect obstacles) then get the footprints (case: flat surface) or the buildings as meshes (case: any terrain) and use K2 (obviously “translate” the rules as K2 goals [available or custom via C#] - plus the restrictions [if any]). Note: collisions in K2 are rather slow so avoid big N of items.

If your rules are complex (say: something “like” particle motion with respect obstacles) you’ll need advanced coding (C# or other).

if you see your buildings as floorplans, maybe this could help, i have not used it, so also no guarantee that it fulfils your requirements.

I could not fully understand you. But I want the masses to be able to move in only two directions (x and y) (on a plannar surface).

1. K2 = Kangaroo (the most important GH “add-on” by a huge margin). Is a kind of physics engine.
2. Goal: something that you try to achieve. K2 attempts to satisfy “on average” the goals used meaning that K2 is as good as your goals: if they fight each other … you’ll get delays (or even bananas).
3. K2 is available with a collection of goals: I want this or that … etc etc. If however you want some “extra” thingy you can write your own goal. If you are not familiar with coding forget that part.

So the moral of the story is simple: Install K2, get the gist of it and see if he can resolve your case.

That said this case can escalate rather easily: imagine that you want to respect rules the likes of Waldram analysis (as should be the norm in urban matters - I guess).

That said if the question has nothing to do with optimization of some kind and is simply about how to move things interactively around obstacles (and keep track of the history of your actions) then … you’ll need code.

2 Likes

I used some buildings and code from a recent thread:

• The ‘Tree/List Viewer’ in this model colors all the buildings blue except for the one selected by the ‘list idx’ slider, which is displayed in yellow and treated as the one you want to move.
• The ‘X’ and ‘Y’ sliders (blue groups) move the selected building ± the X and Y values.
• If there are no collisions, the moved building is displayed in transparent yellow.
• If there are any collisions, the moved building is displayed in transparent cyan and the buildings it collides with change from deep blue to magenta.

Plan B: real life.

In my view the question of yours makes only sence in this hypothesis:

1. There’s existing buildings in some urban area and there’s empty/available parcels and/or parcels with candidate buildings (to be build in the future).
2. There’s rules around related with what you can build (part of them is some sort of Waldram analysis that outlines the engulfing envelope per parcel). There’s also data related with soil, roads, infrastructure, trasportation, save the polar bears fake promises etc etc.
3. There’s some development schema(s), building regulations, area usage, parcel prices, inflation rates and some investment break-even points scenarios (or at least some virtual/fake/fabricated data suitable for the politicians [that’s the norm in urban matters]).
4. Start an x development scenario of yours (each one stored in some sort of scenarios history).
4.1 For a given parcel calculate interactively the building permission envelope (obviously taking into account the existed situation and the new already defined envelopes) . Assosiate the envelope with dollars and/or with some indicative geometries.
4.2 If at some point an envelope yields conflicting results and/or overloads the infrastucture etc etc and/or prohibits the deployment of the remaining envelopes … backtrace and change something (or mark invalid a candidate building [avoid informing politicians for that]).
4.3 Store all valid envelopes.
5. Start another scenario.
6. Validate scenarios, DO NOT put your name on this study and donate the whole thingy to the city authorities (change your name, phone, e-mail and address as well: better safe than sorry).

PS: for the above, forget K2 (hello C#).