lib/from_openstudio/geometry/shade.rb in honeybee-openstudio-2.20.9 vs lib/from_openstudio/geometry/shade.rb in honeybee-openstudio-2.21.0

- old
+ new

@@ -57,17 +57,19 @@ def self.energy_properties_from_shading_surface(shading_surface) hash = {} hash[:type] = 'ShadeEnergyPropertiesAbridged' - construction = shading_surface.construction - if !construction.empty? - const_name = construction.get.nameString - hash[:construction] = const_name - unless $shade_constructions.has_key?(const_name) - const_obj = construction.get - const = const_obj.to_LayeredConstruction.get - $shade_constructions[const_name] = const + unless shading_surface.isConstructionDefaulted + construction = shading_surface.construction + if !construction.empty? + const_name = construction.get.nameString + hash[:construction] = const_name + unless $shade_constructions.has_key?(const_name) + const_obj = construction.get + const = const_obj.to_LayeredConstruction.get + $shade_constructions[const_name] = const + end end end transmittance_schedule = shading_surface.transmittanceSchedule if !transmittance_schedule.empty?