Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(multiphase): Use room display name for auto group naming #872

Merged
merged 1 commit into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions honeybee_radiance/dynamic/multiphase.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ def cluster_orientation(room_apertures, apertures, room_based=True, vertical_tol
for room_id, data in room_apertures.items():
_normal_list = []
grouped_apertures = []
ap_groups[room_id] = {}
for ap in data['apertures']:
# check if normal is already in list
n_bools = [ap.normal.is_equivalent(n, tolerance=0.01)
Expand Down Expand Up @@ -310,7 +311,8 @@ def cluster_orientation(room_apertures, apertures, room_based=True, vertical_tol
vertical_groups.extend(_ap_groups)
grouped_apertures = vertical_groups

ap_groups[room_id] = grouped_apertures
ap_groups[room_id]['aperture_groups'] = grouped_apertures
ap_groups[room_id]['display_name'] = data['display_name']
else:
_normal_list = []
grouped_apertures = []
Expand Down Expand Up @@ -352,10 +354,10 @@ def cluster_output(ap_groups, room_apertures, room_based=True):
group_names = []
group_dict = {}
if room_based:
for room_id, groups in ap_groups.items():
for idx, group in enumerate(groups):
for room_id, data in ap_groups.items():
for idx, group in enumerate(data['aperture_groups']):
ap_ids = [ap.identifier for ap in group]
group_name = '{}_ApertureGroup_{}'.format(room_id, idx)
group_name = '{}_ApertureGroup_{}'.format(data['display_name'], idx)
group_names.append(
{'identifier': group_name, 'apertures': ap_ids}
)
Expand Down
2 changes: 1 addition & 1 deletion honeybee_radiance/modifier/material/bsdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def __init__(self, bsdf_file, identifier=None, up_orientation=None, thickness=0,
self.thickness = thickness or 0
aBSDF.__init__(self, bsdf_file, identifier, up_orientation, modifier,
function_file, transform, angle_basis, dependencies)

def _update_values(self):
"update value dictionaries."
n_path = os.path.normpath(self.bsdf_file).replace('\\', '/')
Expand Down
Loading