lib/openstudio-standards/standards/Standards.SubSurface.rb in openstudio-standards-0.6.0.rc2 vs lib/openstudio-standards/standards/Standards.SubSurface.rb in openstudio-standards-0.6.3

- old
+ new

@@ -40,11 +40,11 @@ new_sub_surface = OpenStudio::Model::SubSurface.new(new_vertices, surface.model) # Put this sub-surface on the surface. new_sub_surface.setSurface(surface) # Set the name of the subsurface to be the surface name plus the subsurface type (likely either 'fixedwindow' or # 'skylight'). - new_name = surface.name.to_s + '_' + new_sub_surface.subSurfaceType.to_s + new_name = "#{surface.name}_#{new_sub_surface.subSurfaceType}" new_sub_surface.setName(new_name) # There is now only one surface on the subsurface. Enforce this new_sub_surface.setMultiplier(1) return true end @@ -127,12 +127,12 @@ new_sub_surface = OpenStudio::Model::SubSurface.new(new_vertices, surface.model) # Put this sub-surface on the surface. new_sub_surface.setSurface(surface) # Set the name of the subsurface to be the surface name plus the subsurface type (likely either 'fixedwindow' or # 'skylight'). If there will be more than one subsurface then add a counter at the end. - new_name = surface.name.to_s + '_' + new_sub_surface.subSurfaceType.to_s + new_name = "#{surface.name}_#{new_sub_surface.subSurfaceType}" if new_surfaces.length > 1 - new_name = surface.name.to_s + '_' + new_sub_surface.subSurfaceType.to_s + '_' + index.to_s + new_name = "#{surface.name}_#{new_sub_surface.subSurfaceType}_#{index}" end # Set the skylight type to 'Skylight' new_sub_surface.setSubSurfaceType('Skylight') # Set the skylight construction to whatever was passed (should be the default skylight construction) new_sub_surface.setConstruction(construction)