Parametric urban network


Categories: Tutorials

Tagged with: | |

3 fully parametric versions of 1 urban street network with different street layouts and multiple building generation methods

plus some sparkles on top

When I chose to do this course I wanted to do something simple for my ATRN studio work. But because it didn’t get chosen from all the works at the studio to be actually done, it kinda stopped at this:

Proposal on the revitalization of a square in Opava, Martin Diviš

So I needed a new idea as this was clearly too little to my liking…

…so why parametric urbanism?

I already had my first thoughts about parametric urbanism being the ideal solution as “clearly” its only parameters you need to feed to the computer … right?

PS7 lecture on computer-aided design solutions, doc. Ing. arch. Miloš Florián, Ph.D.

.. yeah we are going to ignore that, trust me, it won’t matter, trust … ehm …

so last semester I kind of joggled with this script:

also, those scripts are only parts of the bonus mentioned above, so exploring is only your liability…

The main problem of the given script was the inability to create valid offsets thus unintentionally generating invalid or flipped surfaces which isn’t great for further computing…

So are we finally going to talk about the new script?

I hope so, yes. I wanted to do the road offsets for my 4 credit studio work easily and quickly (see how that went …) . So I opened Mozilla and browsed for answers. I found this beauty of a script:

Road auto intersect and offset by layer, by Inno

Eventually, it kinda grew to this…

(ver11 is a “debugged” version, so of course it has even more bugs…)

Grasshopper script for parametric street network with 3 hierarchy slots, Martin Diviš

Even that I ultimately failed to do my general idea and spent mora than 120 hours designing this script, I think it was worth it. It uses some neat little tricks. So let’s get to them:

the whole script is controlled by exactly 45 parameters (including 3 input layers)

Even at the beginning of the script I can already see things to improve – as the script grew and grew I didn’t want to make complicated tree structure and/or gate filters to include exclude some components automatically which resulted into repeating of the offset script. Eventually it should be possible to entwine the input data and calculate it as 1 tree. Then split/sort/explode the output into needed solutions used later on. Also you can see I use Telepathy plugin that lets me save input/output as a named tag/variable and bring it on the canvas wherever I need it. It’s kind of a glorified hidden wire. Eventually I made 113 variables to make the script reading more clear and it also greatly helped me in building the script.

the output is clear and in one place thanks to Telepathy
a kind of neat way, I found after numerous errors, how to split intersection points between 3 sets of curves into 3 sets of intersections
(Which is keeping street hierarchy.)
And all that just using single “pt on crv” and sets (množiny). No hard math.
another part of the script I’m proud of is this solution that lets you place randomly multiple different variations of trees in 2D and also in 3D (see lower pic) and all that just from the tree alley axes and the parameters of the trees (refer to input picture)
I even upgraded the 3D trees definition by using blocks which sped up the actual drawing by approximately x5 times

Buildings generation

my take on how to do that (FYI unhappy places are places too small to be buildings after the split so they get “assigned” to the neighbors)
and the easy take on the problem using DeCodingSpaces toolbox (plugin) that does exactly what you need

Regarding DeCodingSpaces plugin – prof. Reinhard Koenig (young guy) has some really niche tutorials at:

also see this:

Free online courses at Bauhaus-University Weimar with a focus on parametric architecture and urbanism

2D siteplan generation

All in all its just a boolean operations with careful choice of the correct surfaces.
The correct ones have same normal (are not fliped) as the input surface.
I also added possibility to cull largest and smallest parking spots but refrained from using it later on ..

And in this manner the whole siteplan is generated.

3D generation

3D generation of surfaces from 2D surfaces using general surface and splitting into fragments

I know this could be potentially done by tree structure (similarly to the offsets) but choosing the “correct surfaces” after the fragmenting method was the “idea bottleneck”.

In the words of a wise woman:

How to get mesh from surface and back to mesh?

Why? because mesh is best for drawing, graphics card for some reason don’t like pure brep and rather would do zigzag meshes. Don’t ask me why, I don’t know. But If you want something smooth, you’d rather use surface. So here you go:

The GH file posted above will take any mesh and reduce/add it vertices count so its usable for GH computing. Varning, it takes long for huge meshes like the ones downloaded from IPR (15 min+). But reducing from 5,6 millions polygon to 56k polygons is quite good ratio for that ;) as it saves you hours of computing later.

And if you ever need the 5,6 mil. definition, let me know, I want to know what you’re doing.


Spending a lot of time on this I hope it will come to use to somebody. The streets come up nicely even tho the generating for my 60 ha area took about 10-15 mins per itteration. But even this cant be compared to days drawing it by hand.

Also I can’t stress (on nobody’s behalf but myself) that this sort of script should be used for generating not more than street layouts. Generating these sorts of buildings doesn’t do good urbanism and neither it does generate good places. We would need much more time and team devoted for that.

Feel free to ask me at: or
for any further explanation.