Hey,
For an architecture project I am developing an urban plan which I am trying to generate using different elements. I have started with a base grid shape of polygons, in which i randomly select points which later in the plan will include buildings. However, Im a now trying to create a way to get to those plots using a polyline, so I can cull those plots out.
In the image below the buildings are in white, and the paths i now have drawn manually with curves, to cull out the other polygons and draw the grey ones which will be the access to the buildings.
Is there a way to do this also with grasshopper, and optional plugins, that I can define a starting point, and that it takes center points of the polygons and takes one of the closest to draw part of the polyline, and repeat this to get a similar result, which always ends up at least some times to a plot next to one of the building plots? shortest walks script.gh (55.3 KB) shortest walks.3dm (125.0 KB)
I’ve tried to understand what you want, but failed. Isn’t your .gh already doing what you ask?
(Probably it’s me, i’m not english native…)
You want to automatically create the roads? Instead than using an input curve?
If so, how the building need to be reached? In which side of the building? Any?
Yeah I want to automatically draw the roads. So that I would give like the start point and and point parametrically, and that is then generates a polyline through the centerpoints of the shapes. The entrances are not defined yet, and the building shapes neither. But I want to be able that everything can be done by alternating parameters, and therefore that I dont have to draw the curves manually.
Also shortest path doesnt work, since I dont have curves that “block” the path. Except of the buildings. Of course I could do it using shortest paths with just the buildings blocking, but the the route will just be a straight line to the building and then maybe a part a polyline around the building. But I want it to go through the centers of the shapes so it gets a bit more a natural flow. I hope this clears it up.
It can work. You have to make each path that meed in the center of the building a bit shorter, so they don’t meet, thus interrupting the “path”.
I’ll put something up tomorrow.
Instead of what I said, I’m copying Laurent’s idea from here: Shortest walk and straight going possible in grid? A*-algorithm : moving the building center up in Z+, it will artificially increase the path length, making it unsuitable for any other solution.