honeybee-openstudio 2.28.1 → 2.28.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c3f02cf48f4c9d6c3b519513a9602452d044c24287ba8b3ad9d9317e2cb869b
|
4
|
+
data.tar.gz: 5a08ac81d335c8ca9862dbf84a2e918480b594cf4e2e2cc495ef78d26b3e6256
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b94674ad176a8846d1a2b10bfc11f3da312ff7e9adb186eac9c93a4bbc66d87d76bc1b41e730d49d9f93cd1d409e6f38b1256e9a5fb5dd4bdb08e077bb4b482
|
7
|
+
data.tar.gz: 30daf7224ae75f43219a0e9566146a045d5d86f074079ee29157455373804967b639a820f328777e71b69982a0392bbc4f97c0a24fdef55d2bff0c8a04ef5a46
|
data/honeybee-openstudio.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'honeybee-openstudio'
|
7
|
-
spec.version = '2.28.
|
7
|
+
spec.version = '2.28.2'
|
8
8
|
spec.authors = ['Tanushree Charan', 'Dan Macumber', 'Chris Mackey', 'Mostapha Sadeghipour Roudsari']
|
9
9
|
spec.email = ['tanushree.charan@nrel.gov', 'chris@ladybug.tools']
|
10
10
|
|
@@ -48,14 +48,13 @@ module Honeybee
|
|
48
48
|
@hash[:geometry][:boundary].each do |vertex|
|
49
49
|
os_vertices << OpenStudio::Point3d.new(vertex[0], vertex[1], vertex[2])
|
50
50
|
end
|
51
|
-
reordered_vertices = OpenStudio.reorderULC(os_vertices)
|
52
51
|
|
53
52
|
# triangulate subsurface if neccesary
|
54
53
|
triangulated = false
|
55
54
|
final_vertices_list = []
|
56
55
|
matching_os_subsurfaces = []
|
57
56
|
matching_os_subsurface_indices = []
|
58
|
-
if
|
57
|
+
if os_vertices.size > 4
|
59
58
|
|
60
59
|
# if this apeture has a matched apeture, see if the other one has already been created
|
61
60
|
# the matched apeture should have been converted to multiple subsurfaces
|
@@ -75,9 +74,9 @@ module Honeybee
|
|
75
74
|
if final_vertices_list.empty?
|
76
75
|
|
77
76
|
# transform to face coordinates
|
78
|
-
t = OpenStudio::Transformation::alignFace(
|
77
|
+
t = OpenStudio::Transformation::alignFace(os_vertices)
|
79
78
|
tInv = t.inverse
|
80
|
-
face_vertices = OpenStudio::reverse(tInv*
|
79
|
+
face_vertices = OpenStudio::reverse(tInv*os_vertices)
|
81
80
|
|
82
81
|
# no holes in the subsurface
|
83
82
|
holes = OpenStudio::Point3dVectorVector.new
|
@@ -85,7 +84,7 @@ module Honeybee
|
|
85
84
|
# triangulate surface
|
86
85
|
triangles = OpenStudio::computeTriangulation(face_vertices, holes)
|
87
86
|
if triangles.empty?
|
88
|
-
raise "Failed to triangulate aperture #{@hash[:identifier]} with #{
|
87
|
+
raise "Failed to triangulate aperture #{@hash[:identifier]} with #{os_vertices.size} vertices"
|
89
88
|
end
|
90
89
|
|
91
90
|
# create new list of surfaces
|
@@ -98,13 +97,13 @@ module Honeybee
|
|
98
97
|
end
|
99
98
|
|
100
99
|
else
|
101
|
-
#
|
102
|
-
final_vertices_list <<
|
100
|
+
# os_vertices are good as is
|
101
|
+
final_vertices_list << os_vertices
|
103
102
|
end
|
104
103
|
|
105
104
|
result = []
|
106
|
-
final_vertices_list.each_with_index do |
|
107
|
-
os_subsurface = OpenStudio::Model::SubSurface.new(
|
105
|
+
final_vertices_list.each_with_index do |os_vertices, index|
|
106
|
+
os_subsurface = OpenStudio::Model::SubSurface.new(os_vertices, openstudio_model)
|
108
107
|
|
109
108
|
if !matching_os_subsurfaces.empty?
|
110
109
|
os_subsurface.setName(@hash[:identifier] + "..#{matching_os_subsurface_indices[index]}")
|
@@ -174,9 +173,8 @@ module Honeybee
|
|
174
173
|
hb_verts.each do |vertex|
|
175
174
|
os_vertices << OpenStudio::Point3d.new(vertex[0], vertex[1], vertex[2])
|
176
175
|
end
|
177
|
-
reordered_vertices = OpenStudio.reorderULC(os_vertices)
|
178
176
|
|
179
|
-
os_shading_surface = OpenStudio::Model::ShadingSurface.new(
|
177
|
+
os_shading_surface = OpenStudio::Model::ShadingSurface.new(os_vertices, openstudio_model)
|
180
178
|
os_shading_surface.setName(@hash[:identifier])
|
181
179
|
unless @hash[:display_name].nil?
|
182
180
|
os_shading_surface.setDisplayName(@hash[:display_name])
|
@@ -48,14 +48,13 @@ module Honeybee
|
|
48
48
|
@hash[:geometry][:boundary].each do |vertex|
|
49
49
|
os_vertices << OpenStudio::Point3d.new(vertex[0], vertex[1], vertex[2])
|
50
50
|
end
|
51
|
-
reordered_vertices = OpenStudio.reorderULC(os_vertices)
|
52
51
|
|
53
52
|
# triangulate subsurface if neccesary
|
54
53
|
triangulated = false
|
55
54
|
final_vertices_list = []
|
56
55
|
matching_os_subsurfaces = []
|
57
56
|
matching_os_subsurface_indices = []
|
58
|
-
if
|
57
|
+
if os_vertices.size > 4
|
59
58
|
|
60
59
|
# if this door has a matched door, see if the other one has already been created
|
61
60
|
# the matched door should have been converted to multiple subsurfaces
|
@@ -75,9 +74,9 @@ module Honeybee
|
|
75
74
|
if final_vertices_list.empty?
|
76
75
|
|
77
76
|
# transform to face coordinates
|
78
|
-
t = OpenStudio::Transformation::alignFace(
|
77
|
+
t = OpenStudio::Transformation::alignFace(os_vertices)
|
79
78
|
tInv = t.inverse
|
80
|
-
face_vertices = OpenStudio::reverse(tInv*
|
79
|
+
face_vertices = OpenStudio::reverse(tInv*os_vertices)
|
81
80
|
|
82
81
|
# no holes in the subsurface
|
83
82
|
holes = OpenStudio::Point3dVectorVector.new
|
@@ -85,7 +84,7 @@ module Honeybee
|
|
85
84
|
# triangulate surface
|
86
85
|
triangles = OpenStudio::computeTriangulation(face_vertices, holes)
|
87
86
|
if triangles.empty?
|
88
|
-
raise "Failed to triangulate door #{@hash[:identifier]} with #{
|
87
|
+
raise "Failed to triangulate door #{@hash[:identifier]} with #{os_vertices.size} vertices"
|
89
88
|
end
|
90
89
|
|
91
90
|
# create new list of surfaces
|
@@ -98,13 +97,13 @@ module Honeybee
|
|
98
97
|
end
|
99
98
|
|
100
99
|
else
|
101
|
-
#
|
102
|
-
final_vertices_list <<
|
100
|
+
# os_vertices are good as is
|
101
|
+
final_vertices_list << os_vertices
|
103
102
|
end
|
104
103
|
|
105
104
|
result = []
|
106
|
-
final_vertices_list.each_with_index do |
|
107
|
-
os_subsurface = OpenStudio::Model::SubSurface.new(
|
105
|
+
final_vertices_list.each_with_index do |os_vertices, index|
|
106
|
+
os_subsurface = OpenStudio::Model::SubSurface.new(os_vertices, openstudio_model)
|
108
107
|
|
109
108
|
if !matching_os_subsurfaces.empty?
|
110
109
|
os_subsurface.setName(@hash[:identifier] + "..#{matching_os_subsurface_indices[index]}")
|
@@ -168,9 +167,8 @@ module Honeybee
|
|
168
167
|
hb_verts.each do |vertex|
|
169
168
|
os_vertices << OpenStudio::Point3d.new(vertex[0], vertex[1], vertex[2])
|
170
169
|
end
|
171
|
-
reordered_vertices = OpenStudio.reorderULC(os_vertices)
|
172
170
|
|
173
|
-
os_shading_surface = OpenStudio::Model::ShadingSurface.new(
|
171
|
+
os_shading_surface = OpenStudio::Model::ShadingSurface.new(os_vertices, openstudio_model)
|
174
172
|
os_shading_surface.setName(@hash[:identifier])
|
175
173
|
unless @hash[:display_name].nil?
|
176
174
|
os_shading_surface.setDisplayName(@hash[:display_name])
|
@@ -55,10 +55,9 @@ module Honeybee
|
|
55
55
|
hb_verts.each do |vertex|
|
56
56
|
os_vertices << OpenStudio::Point3d.new(vertex[0], vertex[1], vertex[2])
|
57
57
|
end
|
58
|
-
reordered_vertices = OpenStudio.reorderULC(os_vertices)
|
59
58
|
|
60
59
|
# create the openstudio surface and assign the type
|
61
|
-
os_surface = OpenStudio::Model::Surface.new(
|
60
|
+
os_surface = OpenStudio::Model::Surface.new(os_vertices, openstudio_model)
|
62
61
|
os_surface.setName(@hash[:identifier])
|
63
62
|
unless @hash[:display_name].nil?
|
64
63
|
os_surface.setDisplayName(@hash[:display_name])
|
@@ -198,9 +197,8 @@ module Honeybee
|
|
198
197
|
hb_verts.each do |vertex|
|
199
198
|
os_vertices << OpenStudio::Point3d.new(vertex[0], vertex[1], vertex[2])
|
200
199
|
end
|
201
|
-
reordered_vertices = OpenStudio.reorderULC(os_vertices)
|
202
200
|
|
203
|
-
os_shading_surface = OpenStudio::Model::ShadingSurface.new(
|
201
|
+
os_shading_surface = OpenStudio::Model::ShadingSurface.new(os_vertices, openstudio_model)
|
204
202
|
os_shading_surface.setName(@hash[:identifier])
|
205
203
|
unless @hash[:display_name].nil?
|
206
204
|
os_shading_surface.setDisplayName(@hash[:display_name])
|
@@ -55,9 +55,8 @@ module Honeybee
|
|
55
55
|
hb_verts.each do |vertex|
|
56
56
|
os_vertices << OpenStudio::Point3d.new(vertex[0], vertex[1], vertex[2])
|
57
57
|
end
|
58
|
-
reordered_vertices = OpenStudio.reorderULC(os_vertices)
|
59
58
|
|
60
|
-
os_shading_surface = OpenStudio::Model::ShadingSurface.new(
|
59
|
+
os_shading_surface = OpenStudio::Model::ShadingSurface.new(os_vertices, openstudio_model)
|
61
60
|
os_shading_surface.setName(@hash[:identifier])
|
62
61
|
unless @hash[:display_name].nil?
|
63
62
|
os_shading_surface.setDisplayName(@hash[:display_name])
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: honeybee-openstudio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.28.
|
4
|
+
version: 2.28.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tanushree Charan
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: exe
|
13
13
|
cert_chain: []
|
14
|
-
date: 2021-12-
|
14
|
+
date: 2021-12-30 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|