> For the complete documentation index, see [llms.txt](https://docs.ladybug.tools/dragonfly-primer/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ladybug.tools/dragonfly-primer/components/0_create/apply_roof.md).

# Apply Roof

![](/files/qcZTl0LWbxpIu8S8sxb7)

![](/files/ulm0zHRMDUZeuat0R8a5) - [\[source code\]](https://github.com/ladybug-tools/dragonfly-grasshopper/blob/master/dragonfly_grasshopper/src//DF%20Apply%20Roof.py)

Assign Roof geometry to a Dragonfly Story, Building, or Model.

This can be used to generate sloped roofs over a Story. The roof geometry will only affect the Room2Ds that have a True is\_top\_exposed property and it will only be utilized in translation to Honeybee when the Story multiplier is 1.

Multiple sucessive versions of this component can be used to assign different roof specifications for different Stories of a Dragonfly Building or Model.

### Inputs

* **df\_obj \[Required]**

A Dregonfly Story or Building to which the roof geometry is assigned. When a building is plugged in, only one story will receive the roof geometry, which will be the top floor unless an explicit *story\_i* is specified below. This input can also be an entire Dragonfly Model, in which case the relevant Story of the first Building will receive the roof geometry, indicating that a Model inputs are really only appropriate when the Model contains one Building.

* **roof\_geo \[Required]**

A list of Breps representing the geometry of the Roof. Together, these Breps should completely cover the Room2Ds of the Story to which they are assigned.

* **story\_i**

An optional integer to set the index of the Story to which the Roof should be assigned. If unspecified, the roof geometry will be added to the top floor of any connected Building or Model.

### Outputs

* **df\_obj**

The input Dragonfly objects with the roof geometry assigned to them.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ladybug.tools/dragonfly-primer/components/0_create/apply_roof.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
