Skip to content

Commit

Permalink
fix(writer): Avoid duplicate bare window constructions
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswmackey committed Jul 12, 2023
1 parent 71915ca commit 12e113e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
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

0 comments on commit 12e113e

Please sign in to comment.