lib/to_openstudio/geometry/door.rb in honeybee-openstudio-2.32.1 vs lib/to_openstudio/geometry/door.rb in honeybee-openstudio-2.33.0
- old
+ new
@@ -116,18 +116,28 @@
unless @hash[:display_name].nil?
os_subsurface.setDisplayName(@hash[:display_name])
end
# assign the construction if it exists
- if @hash[:properties].key?(:energy) && @hash[:properties][:energy][:construction]
- construction_identifier = @hash[:properties][:energy][:construction]
- construction = openstudio_model.getConstructionByName(construction_identifier)
- if !construction.empty?
- os_construction = construction.get
- os_subsurface.setConstruction(os_construction)
- elsif $window_dynamic_hash[construction_identifier] != nil
- os_construction = $window_dynamic_hash[construction_identifier].constructions[0]
- os_subsurface.setConstruction(os_construction)
+ if @hash[:properties].key?(:energy)
+ if @hash[:properties][:energy][:construction]
+ construction_identifier = @hash[:properties][:energy][:construction]
+ construction = openstudio_model.getConstructionByName(construction_identifier)
+ if !construction.empty?
+ os_construction = construction.get
+ os_subsurface.setConstruction(os_construction)
+ elsif $window_dynamic_hash[construction_identifier] != nil
+ os_construction = $window_dynamic_hash[construction_identifier].constructions[0]
+ os_subsurface.setConstruction(os_construction)
+ end
+ end
+ if @hash[:properties][:energy][:frame]
+ frame_identifier = @hash[:properties][:energy][:frame]
+ frame = openstudio_model.getWindowPropertyFrameAndDividerByName(frame_identifier)
+ unless frame.empty?
+ os_frame = frame.get
+ os_subsurface.setWindowPropertyFrameAndDivider(os_frame)
+ end
end
end
# assign the boundary condition object if it's a Surface
if @hash[:boundary_condition][:type] == 'Surface'