lib/to_openstudio/model.rb in honeybee-openstudio-2.35.2 vs lib/to_openstudio/model.rb in honeybee-openstudio-2.36.0
- old
+ new
@@ -214,10 +214,11 @@
end
create_orphaned_shades
create_orphaned_faces
create_orphaned_apertures
create_orphaned_doors
+ create_shade_meshes
end
def create_materials(material_dicts, check_existing=false)
material_dicts.each do |material|
# check if there's already a material in the model with the identifier
@@ -666,9 +667,30 @@
@hash[:orphaned_doors].each do |dr|
dr_object = Door.new(dr)
openstudio_shade = dr_object.to_openstudio_shade(@openstudio_model, shading_surface_group)
if $orphan_groups
openstudio_shade.setShadingSurfaceGroup(shading_surface_group)
+ end
+ end
+ end
+ end
+
+ def create_shade_meshes
+ if @hash[:shade_meshes]
+ @hash[:shade_meshes].each do |shade_mesh|
+ shade_mesh_object = ShadeMesh.new(shade_mesh)
+ openstudio_shades = shade_mesh_object.to_openstudio(@openstudio_model)
+
+ if $orphan_groups
+ shading_surface_group = OpenStudio::Model::ShadingSurfaceGroup.new(@openstudio_model)
+ shading_surface_group.setShadingSurfaceType('Building')
+ shading_surface_group.setName(shade_mesh[:identifier])
+ unless shade_mesh[:display_name].nil?
+ shading_surface_group.setDisplayName(shade_mesh[:display_name])
+ end
+ openstudio_shades.each do |openstudio_shade|
+ openstudio_shade.setShadingSurfaceGroup(shading_surface_group)
+ end
end
end
end
end