Create a Roof in Dynamo for Generative Design

Hello! I am trying to create a roof with variable type and slopes (inputs) for generative design purposes. The roof basically follows a variable footprint (having variable width and length). The purpose will be to extract the R value of the roof type selected along with the surface area of the roof. The first two screenshots attached show what I’ve done so far. roof.DYN (54.7 KB) My concerns/questions are:
1- Why can’t I preview the roof in the 3D background view of Dynamo?
2-I know I might need a gate node to prevent Dynamo from creating the actual roof everytime we run the study. But I’m not sure of where to insert that node? The 3rd screenshot shows the roof in Revit.
3-How can I extract the surface area of the Footprint roof created?
4-I’m concerned about the roof type variable. What I did is that I created a list of roof types and called a random type from the list using a slider node (which is an input of the GD). Will that create issues for me later on when I run the GD study (for ex. Revit dependent nodes…)? If yes, how can I solve this issue?



You need to generate a Dynamo geometry, currently you’re just making a Revit element. This will require using the Dynamo Geometry library (stuff like Curve.NormalAtParameter, and Geometry.Translate.

Use a Data.Gate node to prevent execution of Revit interaction nodes. The Generative Design primer has some info on that topic here: Using Data from Revit - Generative Design Primer

Once you have created the Dynamo geometry, you can pull the area from a surface using the Surface.Area node. If you build a solid you’ll have to use something like a Geometry.Explode node proceeding it, or utilize the topology section of the library to pull and filter faces which can be converted to surfaces.

Very much so. You’ll want to put that before the data.Gate as well, and ensure that everything you’re generating (not yet recording in revit) and evaluating happens before the gate node.

Thank you Jacob for your prompt response. I have another question. When the time comes to creating the roof in Revit, if I stick to using the same node “FootPrintRoof.ByEdgesAndSlopes”, it needs an input “roofType”. I thought about creating a dictionary by keys (which are the names of the roof types available) and values (the thermal property associated with the roof). The problem arises when I try to call a specific roof type by its name. Its name here is of “String” type and not “RoofType”, and this doesn’t allow the “FootPrintRoof.ByEdgesAndSlopes” node to function properly. How can I solve this issue? I hope I properly explained my problem!
Thanks in advance.

I solved it using “RoofType.ByName” node with a data.gate node before it.

1 Like