Old Town Roofs

Hi Guys!

I have to do a rendering of an old town, so I made a script thats draws my roofs (arround 400-500). It partially works as it should. But there are a few problems which I dont understand.

Basically I repoduce the process which is shown here: https://geometrie.uibk.ac.at/elearning/dachausmittlung/2_1_Dachausmittlung-3D/2_1_Dachausmittlung-3D.html

My approach on that is, that im offseting only once and connect the corner points by an SDL line. If they are intersecting i make a 3-Point surface, else i’m doing a Sweep2. In the end I merge everything together (3-Point Surface, Sweep2 and a Boundry Surface of the base curve) and make a boundry volume which fails in some cases.

My other proplem are the second set of corner point for the SDL. In some cases there is one too much or they are not sorted correctly( I already tried “Sort along Curve”).

I attached the script and a few examples of the base curves. I hope somebody can help me.

Thanks in advance

FORUM.gh (25.3 KB)
Forum.3dm (163.2 KB)

I reminds me of the work “Sand dune/Medial Axis” done by Laurent Delrieu which is similar to what you are doing.

It is not an easy task. One more robust but less beautiful will be to mesh the surface and move the point proportional to the contour.

Another way is to use clipper that is good at offsetting. And then … Still a lot of work :confused:

With mesh it gives that

sand dune using mesh.gh (18.6 KB)

A version using offset from clipper so 3 types of roofs

sand dune using clipper v2.gh (26.7 KB)


I updated “Sand Dunes” “Roof Generator”

A version now works for RH5 and RH6
It works quite well, still some problem but round and butt are quite good.


great work Laurent. Do you have a link to the file?

The link is here.

But here is the file
sand_dune_csharp_RH5_LEGACY.gh (18.0 KB)

sand_dune_csharp_RH5_different_angles.gh (28.1 KB)

I also did a multiple angles roof generator



Hi, lately I been using Laurent’s component for creating a Medial Axis “Roof”, I been having problems when changing the base curve, sometimes the component fails and shutsdown Rhino, I was wondering if some one knows why that happens, I can only imagine that it have to do with Rhino’s memory, or that the script keeps on running in a loop.
I been using it for creating a straight skeleton from a polygon, I have found other components that do the straight skeleton algorithm but they all seem to fail in a similar way, the Laurent one for me know is the best way to do that calculation, it would be nice to have a version of the Laurent’s component that only do the the skeleton part without creating the surface. Thanks

1 Like


Some new work on this script, still lot of work to do to make a better script that allows inner parts. It works but it is not optimised nor clean.


Nice work! Could you post the latest version which works with “multipolygons”, like the ones shown in your pictures? :slight_smile: Would be much appreciated

1 Like

Here the script ! But don’t expect too much it is not working when there are no inside curves !!!

sand_dune_internal_curves_csharp_RH5_LEGACY.gh (25.4 KB)



Good thing there is a key in OSM called type:multipolygon which makes it easy to separate single line polygons and buildings with inside curves.


Hey Laurent, Amazing script!
I am pretty new in grasshopper so I might be asking a basic question.
But is there a way (on either scripts) to make the height of the dune a permanent parameter and the angel would change according to the width of the dune?

Try this
roof.gh (15.1 KB)

1 Like

Thank you very much Seghier,
Its getting closer but I need the angel between the slops and the ground to change. I am basically trying to make walls (barriers) out of sand dunes, so the height of the dune would be the same, but the angle of the slops should be affected by the thickness of the wall…

I don’t understand what you are after. Can you describe what you are after with a sketch, an algorithm … both ?

Thank you for responding. I was trying to use your script but making the z a slider and the angel to dependent on that.
hope my fast sketch makes it clearer

Hi Laurent,
Thx for sharing this script - great help!
I tested it on Rhino 6 & 7 - unfortunately, there seams to be a problem using it on Rhino 7 (looks like there is a problem with selecting the right trimmed sides (for both the multi and non multicurve version I found here).

edit: might be that it worked yesterday - did an Rhino 7 update today.