Skip to content

Commit

Permalink
fix(room): Add a hidden property for Room._parent
Browse files Browse the repository at this point in the history
I'm going to make use of this in Dragonfly and I thought about having Dragonfly extend the honeybee Room class but I think it's just much simpler and more efficient this way. I might also make use of it in other cases where I need to keep track of a particular building that the honeybee Room is apart of.
  • Loading branch information
chriswmackey committed Feb 8, 2024
1 parent e1dbba1 commit 878331b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion honeybee/room.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ class Room(_BaseWithShade):
* average_floor_height
* user_data
"""
__slots__ = ('_geometry', '_faces', '_multiplier', '_story', '_exclude_floor_area')
__slots__ = (
'_geometry', '_faces',
'_multiplier', '_story', '_exclude_floor_area', '_parent')

def __init__(self, identifier, faces, tolerance=0, angle_tolerance=0):
"""Initialize Room."""
Expand Down Expand Up @@ -123,6 +125,7 @@ def __init__(self, identifier, faces, tolerance=0, angle_tolerance=0):
self._multiplier = 1 # default value that can be overridden later
self._story = None # default value that can be overridden later
self._exclude_floor_area = False # default value that can be overridden later
self._parent = None # completely hidden as it is only used by Dragonfly
self._properties = RoomProperties(self) # properties for extensions

@classmethod
Expand Down

0 comments on commit 878331b

Please sign in to comment.