> For the complete documentation index, see [llms.txt](https://docs.ladybug.tools/honeybee-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/honeybee-primer/components/2_organize/rooms_by_orientation.md).

# Rooms by Orientation

![](/files/-Ma9I6jKwf1uiEYgAbbe)

![](/files/-Mihnw6P2Asiesud6ujp) - [\[source code\]](https://github.com/ladybug-tools/honeybee-grasshopper-core/blob/master/honeybee_grasshopper_core/src//HB%20Rooms%20by%20Orientation.py)

Separate and group honeybee rooms with the same average orientation of walls with an Outdoors boundary condition.

## Inputs

* **rooms \[Required]**

  A list of honeybee honeybee Rooms or honeybee Models to be separated by orientation.&#x20;
* **n\_groups**

  An optional positive integer to set the number of orientation groups to use. For example, setting this to 4 will result in rooms being grouped by four orientations (North, East, South, West). If None, the maximum number of unique groups will be used.&#x20;
* **north**

  A number between 0 and 360 to set the clockwise north direction in degrees. This can also be a vector to set the North. Default is 0.&#x20;

## Outputs

* **orientations**

  A list of numbers between 0 and 360 with one orientation for each branch of the output perim*rooms. This will be a list of angle ranges if a value is input for n\_groups*.&#x20;
* **perim\_rooms**

  A data tree of honeybee rooms with each branch of the tree representing a different orientation.&#x20;
* **core\_rooms**

  A list of honeybee rooms with no identifiable orientation.&#x20;


---

# 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/honeybee-primer/components/2_organize/rooms_by_orientation.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.
