From eb0eb81feabf98849875fdc60c913a87d9be2c4e Mon Sep 17 00:00:00 2001 From: Mikkel Pedersen Date: Thu, 14 Mar 2024 18:43:27 +0100 Subject: [PATCH] fix(folder): Add each element of light path to grid mapping --- honeybee_radiance_folder/folder.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/honeybee_radiance_folder/folder.py b/honeybee_radiance_folder/folder.py index ca8ebd6..ca78217 100644 --- a/honeybee_radiance_folder/folder.py +++ b/honeybee_radiance_folder/folder.py @@ -819,19 +819,19 @@ def _update_dict(dict, key, value): for grid in grid_info: light_paths = grid.get('light_path', []) for light_path in light_paths: - light_path = light_path[0] - if light_path in non_mtx_groups: - _update_dict(two_phase_dict, light_path, grid) - elif light_path in mtx_groups: - if phase == 2: - # if 2 phase mtx groups are added to two phase - _update_dict(two_phase_dict, light_path, grid) - else: - # else added to three phase - _update_dict(three_phase_dict, light_path, grid) - elif not exclude_static: - # static apertures - _update_dict(two_phase_dict, '__static_apertures__', grid) + for elem in light_path: + if elem in non_mtx_groups: + _update_dict(two_phase_dict, elem, grid) + elif elem in mtx_groups: + if phase == 2: + # if 2 phase mtx groups are added to two phase + _update_dict(two_phase_dict, elem, grid) + else: + # else added to three phase + _update_dict(three_phase_dict, elem, grid) + elif not exclude_static: + # static apertures + _update_dict(two_phase_dict, '__static_apertures__', grid) if not light_paths: # no light path, put grid in static, might be an exterior grid _update_dict(two_phase_dict, '__static_apertures__', grid)