lib/to_openstudio/construction/windowshade.rb in honeybee-openstudio-2.23.3 vs lib/to_openstudio/construction/windowshade.rb in honeybee-openstudio-2.23.4
- old
+ new
@@ -84,17 +84,17 @@
# insert the shade material
shd_mat_name = openstudio_model.getMaterialByName(@hash[:shade_material])
unless shd_mat_name.empty?
@shade_material = shd_mat_name.get
- obj_type = @shade_material.iddObject.name
+ obj_type = @shade_material.iddObject.name.to_s
end
unless @shade_material.nil?
- if obj_type == 'OS:WindowMaterial:StandardGlazing'
+ if obj_type == 'OS:WindowMaterial:StandardGlazing' || obj_type == 'OS:WindowMaterial:Glazing'
if @shade_location == 'Interior'
os_materials[-1] = @shade_material
- elsif @shade_location == 'Exterior' | os_materials.length < 2
+ elsif @shade_location == 'Exterior' || os_materials.length < 2
os_materials[0] = @shade_material
else # middle glass pane
os_materials[-3] = @shade_material
end
else
@@ -148,12 +148,12 @@
# add a WindowShadingControl object to a model for a given aperture and room
os_shade_control = OpenStudio::Model::ShadingControl.new(@shade_construction)
# figure out the shading type
unless @shade_material.nil?
- obj_type = @shade_material.iddObject.name
+ obj_type = @shade_material.iddObject.name.to_s
end
- if obj_type == 'OS:WindowMaterial:StandardGlazing'
+ if obj_type == 'OS:WindowMaterial:StandardGlazing' || obj_type == 'OS:WindowMaterial:Glazing'
shd_type = 'SwitchableGlazing'
elsif obj_type == 'OS:WindowMaterial:Blind'
if @shade_location == 'Between'
shd_type = 'BetweenGlassBlind'
else