> 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;
