honeybee-openstudio 2.35.1 → 2.35.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 +4 -4
- data/honeybee-openstudio.gemspec +1 -1
- data/lib/to_openstudio/geometry/door.rb +46 -46
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eadf72cc6184d0f30705481227c69a6bb35a17485856a641a841c797f720bd46
|
4
|
+
data.tar.gz: cbff4e6067b9be01c1df2b545c4a181f863f9a51a5c5cc4f2c6bd5a301558e19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e91999590b5b8b2f15bca7cc073beafd4d310507064b2eea7e883069fcfb761301d3cf22147ef9cdb1fe11cb6db967d06417d1c82534d7b821ef69cc3dc8300
|
7
|
+
data.tar.gz: 6c3aaad16d195b28a4434365d2d94dacd6e639f4baba7ff016b53c16bb0d31105157b59c9417ee5c0d2f9b25f5a735fad265751e771a82e131e9a089482323f4
|
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.35.
|
7
|
+
spec.version = '2.35.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
|
|
@@ -162,61 +162,61 @@ module Honeybee
|
|
162
162
|
|
163
163
|
return result
|
164
164
|
end
|
165
|
-
end # Door
|
166
165
|
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
166
|
+
def to_openstudio_shade(openstudio_model, shading_surface_group)
|
167
|
+
# get the vertices from the door
|
168
|
+
if @hash[:geometry][:vertices].nil?
|
169
|
+
hb_verts = @hash[:geometry][:boundary]
|
170
|
+
else
|
171
|
+
hb_verts = @hash[:geometry][:vertices]
|
172
|
+
end
|
174
173
|
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
174
|
+
# create the openstudio shading surface
|
175
|
+
os_vertices = OpenStudio::Point3dVector.new
|
176
|
+
hb_verts.each do |vertex|
|
177
|
+
os_vertices << OpenStudio::Point3d.new(vertex[0], vertex[1], vertex[2])
|
178
|
+
end
|
180
179
|
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
180
|
+
os_shading_surface = OpenStudio::Model::ShadingSurface.new(os_vertices, openstudio_model)
|
181
|
+
os_shading_surface.setName(@hash[:identifier])
|
182
|
+
unless @hash[:display_name].nil?
|
183
|
+
os_shading_surface.setDisplayName(@hash[:display_name])
|
184
|
+
end
|
186
185
|
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
186
|
+
# get the approriate construction id
|
187
|
+
construction_id = nil
|
188
|
+
if @hash[:properties].key?(:energy) && @hash[:properties][:energy][:construction]
|
189
|
+
construction_id = @hash[:properties][:energy][:construction]
|
190
|
+
elsif @hash[:is_glass] == true
|
191
|
+
construction_id = 'Generic Double Pane'
|
192
|
+
else
|
193
|
+
construction_id = 'Generic Exterior Door'
|
194
|
+
end
|
196
195
|
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
196
|
+
# assign the construction
|
197
|
+
unless construction_id.nil?
|
198
|
+
construction = openstudio_model.getConstructionByName(construction_id)
|
199
|
+
unless construction.empty?
|
200
|
+
os_construction = construction.get
|
201
|
+
os_shading_surface.setConstruction(os_construction)
|
202
|
+
end
|
203
203
|
end
|
204
|
-
end
|
205
204
|
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
205
|
+
# add a transmittance schedule if a value is found
|
206
|
+
if @hash[:transmit]
|
207
|
+
schedule_identifier = 'Constant ' + @hash[:transmit] + ' Transmittance'
|
208
|
+
schedule = openstudio_model.getScheduleByName(schedule_identifier)
|
209
|
+
unless schedule.empty?
|
210
|
+
os_schedule = schedule.get
|
211
|
+
os_shading_surface.setTransmittanceSchedule(os_schedule)
|
212
|
+
end
|
213
213
|
end
|
214
|
-
end
|
215
214
|
|
216
|
-
|
217
|
-
|
215
|
+
# add the shade to the group
|
216
|
+
os_shading_surface.setShadingSurfaceGroup(shading_surface_group)
|
218
217
|
|
219
|
-
|
220
|
-
|
218
|
+
os_shading_surface
|
219
|
+
end
|
221
220
|
|
221
|
+
end # Door
|
222
222
|
end # Honeybee
|
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.35.
|
4
|
+
version: 2.35.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: 2023-
|
14
|
+
date: 2023-11-10 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: json_pure
|