# Rooms by Orientation

![](https://3521261292-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPHXQ1FZ8W_xSW4Nb61%2Fuploads%2Fgit-blob-9c311fc9dc312feed34d2683856afaf372bb4b85%2FRooms_by_Orientation.png?alt=media)

![](https://3521261292-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPHXQ1FZ8W_xSW4Nb61%2Fuploads%2Fgit-blob-09d1f26b9a4d39e6ac94e014243ab5f999b4629d%2FRooms_by_Orientation.png?alt=media) - [\[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;
