Skip to content

Commit

Permalink
fix(model): Add a method to convert Rooms to orphaned objects
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswmackey authored and Chris Mackey committed Jan 9, 2024
1 parent c493bda commit 580ccc2
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions honeybee/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1754,6 +1754,22 @@ def convert_to_units(self, units='Meters'):
self.tolerance = self.tolerance * scale_fac
self.units = units

def rooms_to_orphaned(self):
"""Convert all Rooms in this Model to orphaned geometry objects.
This is useful when the energy load balance of Rooms is not important
and they are only significant as context shading. Note that this method
will effectively discount any geometries with a Surface boundary condition
or with an AirBoundary face type.
"""
for room in self._rooms:
for face in room._faces:
face._parent = None
if not isinstance(face.boundary_condition, Surface) and not \
isinstance(face.type, AirBoundary):
self._orphaned_faces.append(face)
self._rooms = []

def remove_degenerate_geometry(self, tolerance=None):
"""Remove any degenerate geometry from the model.
Expand Down

0 comments on commit 580ccc2

Please sign in to comment.