From 8e62ee1f42e255d22d691bc5f75d6a416d2a71b1 Mon Sep 17 00:00:00 2001 From: Chris Mackey Date: Tue, 9 Jan 2024 11:18:05 -0800 Subject: [PATCH] fix(model): Add a method to convert Rooms to orphaned objects --- honeybee/model.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/honeybee/model.py b/honeybee/model.py index e7ddc1b0..27891c50 100644 --- a/honeybee/model.py +++ b/honeybee/model.py @@ -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.