lib/measures/SetWindowToWallRatioByFacade/measure.rb in openstudio-model-articulation-0.4.0 vs lib/measures/SetWindowToWallRatioByFacade/measure.rb in openstudio-model-articulation-0.5.0

- old
+ new

@@ -315,10 +315,17 @@ starting_gross_ext_wall_area += surface_gross_area starting_ext_window_area += ext_window_area all_surfaces = [s] if split_at_doors == 'Split Walls at Doors' && has_doors + + # remove windows before split at doors + s.subSurfaces.each do |sub_surface| + next if ['Door','OverheadDoor'].include? sub_surface.subSurfaceType + sub_surface.remove + end + # split base surfaces at doors to create multiple base surfaces split_surfaces = s.splitSurfaceForSubSurfaces.to_a # frozen array # add original surface to new surfaces split_surfaces.sort.each do |ss| @@ -339,12 +346,12 @@ vertices = ss.vertices flag = false vertices.each do |vertex| # initialize new vertex to old vertex # rounding values to address tolerance issue 10 digits digits in - x_vals << vertex.x.round(8) - y_vals << vertex.y.round(8) - z_vals << vertex.z.round(8) + x_vals << vertex.x.round(4) + y_vals << vertex.y.round(4) + z_vals << vertex.z.round(4) end if x_vals.uniq.size <= 2 && y_vals.uniq.size <= 2 && z_vals.uniq.size <= 2 rect_tri = true end