From 07c1507e316b1b4d9c36df00acc6df2a101048cb Mon Sep 17 00:00:00 2001 From: Chris Mackey Date: Wed, 12 Jul 2023 09:46:11 -0700 Subject: [PATCH] fix(writer): Avoid duplicate bare window constructions --- honeybee_energy/construction/windowshade.py | 2 +- honeybee_energy/writer.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/honeybee_energy/construction/windowshade.py b/honeybee_energy/construction/windowshade.py index 5f2c5b0d5..4d89a1162 100644 --- a/honeybee_energy/construction/windowshade.py +++ b/honeybee_energy/construction/windowshade.py @@ -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 diff --git a/honeybee_energy/writer.py b/honeybee_energy/writer.py index d3ace523e..b196ca50d 100644 --- a/honeybee_energy/writer.py +++ b/honeybee_energy/writer.py @@ -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())