# Site plan automation based on proximity chart

I need to develop a gh script place different square/rec shaped 2D blocks (It can be 2D block or else we can create with given dimensions) but with some limitations. The limitation comes from a proximity chart for this. How to approach this script. Inputs with me are key plan, site plan etc. The overall script needs to have possibilities like if i change entry point automatically it needs to move the STP accordingly.

I find this research paper while searching ideas and examples for this https://www.sciencedirect.com/science/article/abs/pii/S0926580522000899

In which they used grid-based calculation in grasshopper

Iâ€™m still in very initial concept stage so I have nothing else to share for now. If anyone have ideas to give it will helpful i will be working with that idea and might share the script in the thread for further help.

Here is the site plan grid divide script.
SiteProx.gh (8.5 KB)

The adj Matrix shown is called space schedule(s) if classic spaces (i.e. partitions in a given building) are used. Matrices like these (in most of cases client sourced) are then used in Design Phase 1 i.e. in HAC Clustering in order to start approximating Topology solutions.

The diagonal(s) should be 0 since â€¦ well â€¦ any entity been adjacent to self has no meaning. In real life we use more â€śexpandedâ€ť values (say 0 to 10: the more the values are spread the more the possible equal entropy solutions may be).

Other than that I could provide several hints on that matter (but not any C# that does the HAC part [these are strictly internal] ) â€¦ but using solely code (C#). If by accident you are in that path notify.

1 Like

if you could provide more hints and example as you said it will be helpful.

I also find this research paper which use GH Kangaroo for the process

In general have in mind that attempting to deal with designs (i.e. spatial Topologies variations) based on adj Matrices (in most real-life cases nested ones), HAC Clustering and â€¦ well â€¦ various other next step Methods is rather impossible without code (unless thereâ€™s some add-on around that attempts to do that - or a portion of that anyway).

That said hope that you understand that similar solutions (complete up to some point) ARE not things available to public eyes - for more than obvious reasons.

Anyway the critical part of Phase 1 is how to go from an adj Matrix to some sort of hard/soft HAC Clustering (i.e nested combos of params that - in theory - outline some sub-design orientation(s)). This snap is taken from some sort of instructions (kind of â€śbookâ€ť) that every novice in the practice should read.

Anyway â€¦ 1 to 10 what is your experience with C#?

Note: when evaluating sets of potential solutions (local or global) we use MOO as well (and that makes things even more â€śfuzzyâ€ť).

1 Like

My experience with C# is 2/10 noob!

If so I would strongly advise to abandon ship: otherwise is kinda attempting to do club racing with a Fireblade RR while the only bike that you ever had is a CB125.

That said Iâ€™m not Academic (nor I like the way that Academics think). So I judge matters purely with their real-life potential (that translates to dollars for you IF you are hired in some practice in order to do things like the above)â€¦

That said using K2 for this â€¦ is an extreme over simplification of a complex problem (mostly because for every potential solution sub solutions [i.e. topologies within - or not - the solution â€śboundaryâ€ť] are also created and evaluated). Nobody in real-life would attempt to follow that way. K2 would â€śpackâ€ť things/shapes/whatever togetjer without any knowledge about what level/rate they have and/or what they contain in real-life (not to mention building regulations and other â€śtrivialâ€ť things).

Plus: K2 attempts to minimize the Kinetic Energy. Thatâ€™s fine for a tensile membrane or some freaky truss â€¦ but here we deal with entities/relations/revised on the fly relations that have nothing to do with particles/forces.

1 Like

I will try my best with the knowledge i have and try to learn new things which this requires. Iâ€™m not interested in abandon the ship for now.

I always admire the brave (but you gonna lose that battle [and your time as well]).

See an abstract (VERY naive/stupid/pointless) take towards a K2 solution (code for the K2 part is not included: I refuse to write lines that have no meaning).

This creates a Rnd relations (min/max) adj Matrix between Curves in cList. Then displays the Matrix and the relations as Rectangles3d where their y size is the relation*sizeFact (just for vis purposes).

Remember that rows/columns in a Matrix start from the upper left corner (top to bottom for rows, left to right for columns).

Now assume that you have a boundary (a Curve) and you have to put the Curves (as RigidBodies) inside (taking care of collisions blah, blah) â€¦ while Springs (cent to cent) have a target rest Length the cent_I to cent_J distance and a Force derived from the equivalent Matrix cell multiplied by some user defined Factor. So - in theory - Curves are â€śpackedâ€ť with some sort of respect of their relations from that #@#@ Matrix.

Ultra pointless â€¦ but as a challenge do it with native K2 components.

it can be done with k2 , but requires 2 simulations â€¦1 for bubble collision , 1 for poligon collision

im working the adjency chart with Human Uiâ€¦ Still in progress

3 Likes

Food4Rhino is down but there are at least 2 or 3 plugins that can help you with it.
SpaceSyntax comes to my mind first,

Some time ago I tried all the plugins available for automating the floor plans but I was not successful since the plugins are very limited (limited adjacencies, geometries or number of rooms)