Old Town Roofs

Try this
roof.gh (15.1 KB)

5 Likes

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…

Hello,
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.

Hello
I think there is a problem with
https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_Intersect_Intersection_CurveBrep.htm
could also be related to this problem

I look at that.

@rhino16, @paul.metzger
here a new version, I make many modifications. So I will be happy to know if it works with your curves.
Tolerance is used to transform curves in Polylines. Curves must be on XY plane.

I use here some code from this discussion from @PeterFotiadis and @RadovanG

it tooks ~30 s to compute for 768 roofs.


There are some holes in some type of roof. Cap Hole must heal that.


6 Likes

Hello Laurent,

you made a great program, i tried it in rhino 7 and it work so far fine.

I have a question regarding the shape of the roof. Is it possible to get it more like a gable rooftop? That two side have steep angles?

thank you in advance

Hello
Yes it must be possible
I did that :

So I must find a way to tweak the new definition to make the same thing.

The problem with this type of specialization is to find a good way to enter the angles, not too simple and not over-complicated…

Great progress! Also you implemented the multicurve support directly. Nice!
But I still have a challenge for you to figure out. Lets call this un-capable… :smiley: (15.4 KB)
I also attched a GH so you can check out the non working curve for yourself…
sand_dune_mc-internal-non-working-curves.gh

Thanks for reporting, I know where this problem come from, I just check brep that touches Plan.XY !

I’ll have to fin a way to retrieve the cutted brep that fills in holes.

There is also this one, but not my fault


Playing with tolerance helps

1 Like

I think the complicated part here is that you have to define which sides are the ones that have the steep angles.
I´ve acomplished gable rooftops so far by generating a “normal” roof first, then taking the very upper curve of this roof, extend it to infinity, intersect it with a extruded surface of the base-surface and then combine the edge vertices with this intersection point. Might be a bit complicated but it works very well. In this case I never have to set the lines of the steep angles manually…

@rhino16 @paul.metzger
New Version, it works on example given, sometimes it outputs more geometry than number of roof but this is due to bad roof border. I mean very sharp angles that generates intersection at places not intended.
Implementation is surely not bullet proof. I first take all roofs touching the ground then I union all parts. Then search for holes. Then put in holes geometries that were not used and not having a bounding box center coincident with a previous geometry.
I also change the way curve is transformed to Polyline. So if it already a Polyline, there will be no changes.


sand_dune_internal_curves_csharp_RH7_LEGACY.gh (103.2 KB)

20 Likes

I´ve tried your “multiple angles roof generator”. Doesn´t work with more complex shapes :frowning:
Do you have a version that works with Rhino 7?

I looked at it some time ago and i didnt work. My logic to make contour as polyline is not a good idea with variation of angle. So i didnt manage to make a workable tool.

1 Like

The only way I can think of doing this properly, is using the STALGO algorithm for the straight skeleton, but with a modification for the vertical angle of the edges in the motorcycle graph…this algo is pretty hard to implement, because you need to solve the collision problem at different angles. The straight skeleton is a collision based algo. other of the ways is by adding a parameter for the angle of the corner rays, instead of just using bisectors. But in this way you cannot specify the slope of the roof first. In the ideal roof generator algorithm, you have to be able to specify the slope of the different surfaces by hand, and the location of the principal axis. If your are gonna have to do this is probably just better to model the roof by hand.
Its funny because this problem is actually central to architecture, but I never seen anyone in the past 8 years having even a close solution to it

2 Likes

That sounds interesting, even when I don’t quite understand what you are doing :wink: Would you mind sharing the gh file? It would be much appreciated.

Hey Joel, well its not the most robust way to generate it. I had some troubles with it. Is your buidling polygonal or rectangular? If it is rectangular you can create the sattle roof way easier. I think its necessary to emphasize that the sand dune approach is perfect for non-rectangular buildings…

Thank you for the quick answer. I am looking for a script for gable roofs on polygonal (L-shaped, U-shaped) buildings. Maybe I have to go through the sand dunes script again to see what is possible with it.

You’re looking for the sand dunes script iteration that allows variable angles.

You can set the gable angle to 90 and leave the others to default and you should get a hip roof on all faces with the exception of the gable face.

Does that make sense?