Parametric urban network



Author:

Categories: Tutorials

Tagged with: | |


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

https://www.fa.cvut.cz/cs/galerie/atelierove-prace/73010-3-x-60

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:

https://www.youtube.com/channel/UCo_hmaAwpJSzd0eyARSs7-Q

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.

Conclusion

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:
divisma5@fa.cvut.cz or martindivis.gymkvary@gmail.com
for any further explanation.

Resources

https://discourse.mcneel.com/t/data-matching-points-to-closest-curve-while-usign-hierarchy/181307
https://hopific.com/category/grasshopper-tutorials/

https://www.rhino3d.com/features/grasshopper/blocks/
https://discourse.mcneel.com/t/brep-to-mesh-settings-explanation/118473/2
https://discourse.mcneel.com/t/cast-shadows-in-grasshopper/108427
https://www.grasshopper3d.com/forum/topics/e005-number-view-change-to
https://www.grasshopper3d.com/forum/topics/how-to-display-longlarge?overrideMobileRedirect=1
https://discourse.mcneel.com/t/split-partition-mass-addition-lists/64529
https://discourse.mcneel.com/t/proportional-division-of-a-number/57034
https://discourse.mcneel.com/t/delete-cull-empty-branches/99967
https://discourse.mcneel.com/t/how-to-remove-duplicate-curves-in-grasshopper/60621
https://discourse.mcneel.com/t/delete-elements-from-a-list-if-they-are-too-close-to-each-other/111579
https://www.grasshopper3d.com/forum/topics/principal-parameter
https://discourse.mcneel.com/t/largest-possible-rectangle-inside-closed-curve/147870
https://discourse.mcneel.com/t/getting-part-of-a-curve-between-points-on-a-curve/160958
https://www.grasshopper3d.com/forum/topics/creating-text-objects-and-outputting-them-as-normal-rhino?overrideMobileRedirect=1
https://discourse.mcneel.com/t/grasshopper-textentity/155323
https://discourse.mcneel.com/t/cant-turn-a-surface-into-a-curve/125852/2
https://discourse.mcneel.com/t/how-can-surfaces-be-converted-to-curves/155948
https://discourse.mcneel.com/t/random-rotation-for-list-of-objects/59801
https://hopific.com/cull-pattern-in-grasshopper/
https://www.grasshopper3d.com/forum/topics/min-max-on-grafted-list?xg_source=activity
https://www.shapediver.com/blog/optimizing-grasshopper-definitions-explained
https://discourse.mcneel.com/t/fillet-curve-at-parameter/157747
https://discourse.mcneel.com/t/road-on-terrain-meshing-workflows/141641
https://discourse.mcneel.com/t/grasshopper-format-component/96951
https://discourse.mcneel.com/t/subdivide-data-tree/81321
https://discourse.mcneel.com/t/is-there-a-way-to-divide-land-plots-equally-in-grasshopper/81902?page=2
https://discourse.mcneel.com/t/road-from-centerline-script-closed-curves-and-region-union-problem/175229/16
https://discourse.mcneel.com/t/nth-list-items-of-tree-to-branches/167425
https://discourse.mcneel.com/t/understanding-path-mapper/93660/2

https://discourse.mcneel.com/t/simplify-mesh/93210
https://discourse.mcneel.com/t/problem-using-trimesh/130007
https://discourse.mcneel.com/t/read-multiple-csv-files-and-output-as-tree-structure/165460
https://discourse.mcneel.com/t/csv-export-data-lists/153402