Old Town Roofs

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?

This one was working for simple geometry

Thanks a lot! This works pretty good! Can I somehow use the color Gradient to define an angle? Like green roof and lila roof 90 degrees, rest 35 degrees. That would be quite practical. But otherwise amazing work!

The tool is now in Nautilus plugin and it accepts curves in whatever plane you want.

If you want multiple angles see the tool Arqishap3d

1 Like

Hi Laurent,

Have you seen this approach for constructing roofs that have variable-sloped faces?

https://www.sciencedirect.com/science/article/pii/S0010448517301240

Unfortunately, I can’t make much use of that article… I know that many Rhino and VisualARQ users would benefit from having a high-quality, flexible solution for complex roofs. In this case, I can only kindly ask if there is a chance that somebody could turn it into a Grasshopper component. I would be also the first on the list to crowdfund such an effort.

6 Likes

I’ve looked at all the roof solutions I could find relating to Grasshopper and @laurent_delrie’s code is what I have settled on as it yields the best results.

But, as this article points out, roof conditions like gable ends, dormers, flat tops, or varying heights from a single height input profile/curve set gets “complicated” and while I’ve put this on hold for now I, and I know others, would be very keen to be able to solve for “typical” architectural conditions of roofs such as gable, dormers, dutch gables, shed, etc.

With Laurent’s variable angle version of the script I was able to get gable ends working by effectively feeding an angle of 90 degrees to those sides of the boundary curve, thus producing a gable.

I experimented with Dutch gables by parametrically offsetting the sub-curve of a roof boundary at a Dutch Gable condition up the existing “hip roof” face and then lofting/extruding out the dutch gable portion at the top but never quite finished that in a polished state.

Roofs are annoying in that they are complex yet stupidly simple simultaneously, really roofs are just edges that have an angle given to them, creating a plane, and these planes are trimmed at their intersections and you end up with any conventionally framed roof form from that method. This obviously doesn’t account for onion domes, curvilinear roofs, etc. but that’s another/separate issue.

The majority (please correct me if I’m wrong) of roofs are framed with planar faces intersecting each other and some variation of this at a smaller/local scale within the larger roof form (such as dormers)

Solving this portion of the problem would be so highly beneficial. Next chance I have I’ll compile what I have been able to produce thus far and share to this thread in the hopes of advancing the topic.

TLDR; this is something I, and others, have been wanting/hoping to solve for years, and I’d love to collaborate on this effort for those open to it.

2 Likes

That´s a very great tool!

1 Like

Next year I hope to output a version that will rely on lines and arcs. I begin to work on it, the tools to transform a curve to lines and arcs seem to work, it uses mainly Rhinocommon method but some additional features were required.
Now I am on the slope generation, that’s the easy part.


Still struggling cutting the breps and sorting them …

Happy New Year

Debugging, optimizing … Sometime some funny things appear.

Tool now output the medial Axis in 3d


Still some problems, look at the K

16 Likes

It does a much better job with letters than AI image create at least :wink:

I hope it is useful, better is more subjective. I am not the cleaner coder but I like when tools work. And what I can say is that doing a robust tool is not easy. Rhino team has done excellent tools in Rhinocommon but sometimes little errors brings problem.
For example the tool Curve to Lines and Arcs is keep the tangency quite everywhere but sometime there is a little glitch. Perhaps it could be resolved by lowering the tolerances but I don’t want too much arcs for the Roof tool.
Here the tangency discontinuity using Grasshopper tool


But my medial axis tools find that

Just because of that

So I ended making a little tool to align the repair arc that are not well aligned (using Rhinocommon Blend tool with arc)
So now Medial axis are better.

From the last version for this new Year, I added some components.

Curve Region To Roof need Polycurve made with arcs and lines and oriented curves. So at the moment it is quite mandatory to use the 2 others components before.


CurvesRegionToRoof.gh (6.6 KB)
Medial axis are quite clean

In this other example you’ll have a new Font component, that can filter fonts. By default I try to output just single line fonts.


TextRoofMedialAxis.gh (8.9 KB)

8 Likes

Happy New year @laurent_delrieu new year, new release!!! :grinning:
I think your Polyline Region to Roof need a Medial Axis output too.

Seeing the result of your component, will a type of Medial Axis Offset approximation just for a single closed polyline be possible?
Again with idea to generate quadmesh.

Multiple polylines could be much more complex since the requirement is to mantian the number of control points.


MedialAxisOffset.gh (12.5 KB)


These papers for printing paths are related to offset it
ding2016.pdf (3.3 MB)
j.rcim.2015.01.003.pdf (5.0 MB)

That’s surely doable because there is little difference between the 2 components.

1 Like

Thanks for the papers, it is interesting as I have done some tools for 3d printing this could be a nice addition. Also it looks very similar to this problem

But let me think It already works quite like that !


Going back to Medial Axis and roof, I will join the 2 tools (Polyline and Arcs/Lines) in one tool as I can use the same code.
So it will look like that. You will be free to transform curve to polyline or arcsAndLines. If you provide polyline, it must stay polylines (already like that with the new component).

2 Likes

I updated the tools and hide the old ones. Now there is just 2 tools. One with automatic tolerancing and the other it is up to you to choose tolerances.
For the first you can load geometry with differents size


I no more do the transformation from curve to polyline inside the tools. It can brings too much curves so the brep work is tool long. If you want polyline Roof or Medial axis provide a polyline to the tool, it will be used as is.

2 Likes

Regarding the MedialAxisFromRegion I was thinking in this division strategy the idea is to ensure adding bisectors lines to (Li) output.
This strategy adding a bit better preccision to the MedialAxis, what do you think @laurent_delrieu ?


MedialAxisPerLines.gh (16.9 KB)

Hey Thomas,
I am beginning to look at this problem.
To my point of view the best (not fastest perhaps) is to work with the roof component.
It is quite easy to filter the brep and use them to have lines.
Here a first result. Calculation time is ~0.1 s.


The idea is to take each brep face, then look if edge is on medial axis or on contour.
Then join, orient. Then I’ll have to orient all groups of lines. and it will be good to go on a component.


Still some problems for the curves orientations but seems good.



What is the logic to have for the offset of curves ? Min distance, number of curves ?
If you want to test it works now.


And it could be projected

9 Likes