Skip to content

Commit

Permalink
fix(building): Ensure stories composed of plenums don't get exception
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswmackey committed Dec 12, 2024
1 parent 8753097 commit b9014cf
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions dragonfly/building.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,13 @@ def from_honeybee(cls, model, conversion_method='AllRoom2D'):
story_dict.pop(r_flr)
story_dict.update(new_flrs)
# create the Story and Building objects
stories = [Story.from_honeybee(clean_string(str(s_id)), rms, model.tolerance)
for s_id, rms in story_dict.items()]
stories = []
for s_id, rms in story_dict.items():
story_id = clean_string(str(s_id))
valid_rooms = [r for r in rms if not r.exclude_floor_area]
if len(valid_rooms) != 0:
story = Story.from_honeybee(story_id, rms, model.tolerance)
stories.append(story)
bldg = cls(model.identifier, stories)
bldg._display_name = model._display_name
# if stories were auto-generated, remove them to avoid editing the input
Expand Down

0 comments on commit b9014cf

Please sign in to comment.