lib/openstudio-standards/standards/Standards.SubSurface.rb in openstudio-standards-0.4.0 vs lib/openstudio-standards/standards/Standards.SubSurface.rb in openstudio-standards-0.5.0.rc1
- old
+ new
@@ -76,11 +76,11 @@
# Reduce the area of the subsurface by shrinking it toward the centroid.
# @author Julien Marrec
#
# @param sub_surface [OpenStudio::Model::SubSurface] sub surface object
# @param percent_reduction [Double] the fractional amount to reduce the area
- # @return [Bool] returns true if successful, false if not
+ # @return [Boolean] returns true if successful, false if not
def sub_surface_reduce_area_by_percent_by_shrinking_toward_centroid(sub_surface, percent_reduction)
# if percent_reduction > 1=> percent increase instead of reduction
mult = percent_reduction <= 1 ? 1 - percent_reduction : percent_reduction
scale_factor = mult**0.5
@@ -111,11 +111,11 @@
# Reduce the area of the subsurface by raising the sill height.
#
# @param sub_surface [OpenStudio::Model::SubSurface] sub surface object
# @param percent_reduction [Double] the fractional amount to reduce the area.
- # @return [Bool] returns true if successful, false if not
+ # @return [Boolean] returns true if successful, false if not
def sub_surface_reduce_area_by_percent_by_raising_sill(sub_surface, percent_reduction)
mult = 1 - percent_reduction
# Calculate the original area
area_original = sub_surface.netArea
@@ -160,11 +160,11 @@
# Determine if the sub surface is a vertical rectangle,
# meaning a rectangle where the bottom is parallel to the ground.
#
# @param sub_surface [OpenStudio::Model::SubSurface] sub surface object
- # @return [Bool] returns true if the surface is a vertical rectangle, false if not
+ # @return [Boolean] returns true if the surface is a vertical rectangle, false if not
def sub_surface_vertical_rectangle?(sub_surface)
# Get the vertices once
verts = sub_surface.vertices
# Check for 4 vertices
@@ -193,11 +193,11 @@
# fraction of the surface (set by area_fraction). Note that this only works for surfaces that do not fold into
# themselves (like an 'L' or a 'V').
#
# @param surface [OpenStudio::Model::Surface] surface object
# @param area_fraction [Double] fraction of area of the larger surface
- # @return [Bool] returns true if successful, false if not
+ # @return [Boolean] returns true if successful, false if not
def sub_surface_create_centered_subsurface_from_scaled_surface(surface, area_fraction)
# Get rid of all existing subsurfaces.
remove_all_subsurfaces(surface: surface)
# What is the centroid of the surface.
surf_cent = surface.centroid
@@ -243,11 +243,11 @@
# loops that cycle through the verticies in a surface.
#
# @param surface [OpenStudio::Model::Surface] surface object
# @param area_fraction [Double] fraction of area of the larger surface
# @param construction [OpenStudio::Model::Construction] construction to use for the new surface
- # @return [Bool] returns true if successful, false if not
+ # @return [Boolean] returns true if successful, false if not
def sub_surface_create_scaled_subsurfaces_from_surface(surface:, area_fraction:, construction:)
# Set geometry tolerences:
geometry_tolerence = 12
# Get rid of all existing subsurfaces.
remove_all_subsurfaces(surface: surface)
@@ -332,11 +332,11 @@
# the name of the window to be the surface name plus the subsurface type (always 'fixedwindow').
#
# @param surface [OpenStudio::Model::Surface] surface object
# @param area_fraction [Double] fraction of area of the larger surface
# @param construction [OpenStudio::Model::Construction] construction to use for the new surface
- # @return [Bool] returns true if successful, false if not
+ # @return [Boolean] returns true if successful, false if not
def set_window_to_wall_ratio_set_name(surface:, area_fraction:, construction:)
surface.setWindowToWallRatio(area_fraction)
surface.subSurfaces.sort.each do |sub_surf|
sub_surf.setSubSurfaceType('FixedWindow')
sub_surf.setConstruction(construction)
@@ -348,10 +348,10 @@
# This removes all of the subsurfaces from a surface.
# Is a preparation for replaceing windows or clearing doors before adding windows.
#
# @param surface [OpenStudio::Model::Surface] surface object
- # @return [Bool] returns true if successful, false if not
+ # @return [Boolean] returns true if successful, false if not
def remove_all_subsurfaces(surface:)
surface.subSurfaces.sort.each(&:remove)
return true
end
end