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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(writer): Avoid duplicate bare window constructions #961

Merged
merged 1 commit into from Jul 12, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion honeybee_energy/construction/windowshade.py
Expand Up @@ -163,7 +163,7 @@ def __init__(self, identifier, window_construction, shade_material,
# create the split gap material to be used on either side of the shade
between_int_gap = int_gap.duplicate()
between_int_gap.identifier = \
'{}_Split{}'.format(int_gap.identifier, round(gap_thick, 4))
'{}_Split{}'.format(int_gap.identifier, round(gap_thick, 3))
between_int_gap.thickness = gap_thick
self._between_gap = between_int_gap
window_construction.lock() # lock to avoid illegal shade/material combinations
Expand Down
2 changes: 2 additions & 0 deletions honeybee_energy/writer.py
Expand Up @@ -675,6 +675,8 @@ def model_to_idf(
if constr.has_frame:
materials.append(constr.frame)
if constr.has_shade:
if constr.window_construction in all_constrs:
construction_strs.pop(-1) # avoid duplicate specification
if constr.is_switchable_glazing:
materials.append(constr.switched_glass_material)
construction_strs.append(constr.to_shaded_idf())
Expand Down