honeybee-grasshopper-radiance 1.34.3__py2.py3-none-any.whl → 1.34.4__py2.py3-none-any.whl
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.
- honeybee_grasshopper_radiance/src/HB Automatic Aperture Group.py +6 -124
- honeybee_grasshopper_radiance/user_objects/HB Automatic Aperture Group.ghuser +0 -0
- {honeybee_grasshopper_radiance-1.34.3.dist-info → honeybee_grasshopper_radiance-1.34.4.dist-info}/METADATA +1 -1
- {honeybee_grasshopper_radiance-1.34.3.dist-info → honeybee_grasshopper_radiance-1.34.4.dist-info}/RECORD +7 -7
- {honeybee_grasshopper_radiance-1.34.3.dist-info → honeybee_grasshopper_radiance-1.34.4.dist-info}/WHEEL +1 -1
- {honeybee_grasshopper_radiance-1.34.3.dist-info → honeybee_grasshopper_radiance-1.34.4.dist-info}/LICENSE +0 -0
- {honeybee_grasshopper_radiance-1.34.3.dist-info → honeybee_grasshopper_radiance-1.34.4.dist-info}/top_level.txt +0 -0
|
@@ -56,23 +56,13 @@ Model.
|
|
|
56
56
|
|
|
57
57
|
ghenv.Component.Name = 'HB Automatic Aperture Group'
|
|
58
58
|
ghenv.Component.NickName = 'AutoGroup'
|
|
59
|
-
ghenv.Component.Message = '1.8.
|
|
59
|
+
ghenv.Component.Message = '1.8.1'
|
|
60
60
|
ghenv.Component.Category = 'HB-Radiance'
|
|
61
61
|
ghenv.Component.SubCategory = '0 :: Basic Properties'
|
|
62
62
|
ghenv.Component.AdditionalHelpFromDocStrings = '2'
|
|
63
63
|
|
|
64
|
-
import os
|
|
65
|
-
import json
|
|
66
|
-
|
|
67
|
-
try: # import honeybee_radiance dependencies
|
|
68
|
-
from ladybug.futil import write_to_file_by_name
|
|
69
|
-
except ImportError as e:
|
|
70
|
-
raise ImportError('\nFailed to import ladybug:\n\t{}'.format(e))
|
|
71
|
-
|
|
72
64
|
try:
|
|
73
65
|
from honeybee.model import Model
|
|
74
|
-
from honeybee.boundarycondition import Outdoors
|
|
75
|
-
from honeybee.config import folders
|
|
76
66
|
except ImportError as e:
|
|
77
67
|
raise ImportError('\nFailed to import honeybee:\n\t{}'.format(e))
|
|
78
68
|
|
|
@@ -82,11 +72,7 @@ except ImportError as e:
|
|
|
82
72
|
raise ImportError('\nFailed to import honeybee_radiance_command:\n\t{}'.format(e))
|
|
83
73
|
|
|
84
74
|
try:
|
|
85
|
-
from honeybee_radiance.
|
|
86
|
-
from honeybee_radiance.dynamic.multiphase import aperture_view_factor, \
|
|
87
|
-
aperture_view_factor_postprocess, cluster_view_factor, \
|
|
88
|
-
cluster_orientation, cluster_output
|
|
89
|
-
from honeybee_radiance.lightsource.sky.skydome import SkyDome
|
|
75
|
+
from honeybee_radiance.dynamic.multiphase import automatic_aperture_grouping
|
|
90
76
|
except ImportError as e:
|
|
91
77
|
raise ImportError('\nFailed to import honeybee_radiance:\n\t{}'.format(e))
|
|
92
78
|
|
|
@@ -108,111 +94,7 @@ if all_required_inputs(ghenv.Component) and _run:
|
|
|
108
94
|
size = 0.2 if _size_ is None else _size_
|
|
109
95
|
vertical_tolerance = None if vert_tolerance_ is None else vert_tolerance_
|
|
110
96
|
|
|
111
|
-
#
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
apertures = []
|
|
117
|
-
room_apertures = {}
|
|
118
|
-
# get all room-based apertures with Outdoors boundary condition
|
|
119
|
-
for room in model.rooms:
|
|
120
|
-
for face in room.faces:
|
|
121
|
-
for ap in face.apertures:
|
|
122
|
-
if isinstance(ap.boundary_condition, Outdoors):
|
|
123
|
-
apertures.append(ap)
|
|
124
|
-
if not room.identifier in room_apertures:
|
|
125
|
-
room_apertures[room.identifier] = {}
|
|
126
|
-
if not 'apertures' in room_apertures[room.identifier]:
|
|
127
|
-
room_apertures[room.identifier]['apertures'] = \
|
|
128
|
-
[ap]
|
|
129
|
-
else:
|
|
130
|
-
room_apertures[room.identifier]['apertures'].append(ap)
|
|
131
|
-
if not 'display_name' in room_apertures[room.identifier]:
|
|
132
|
-
room_apertures[room.identifier]['display_name'] = \
|
|
133
|
-
room.display_name
|
|
134
|
-
assert len(apertures) != 0, \
|
|
135
|
-
'Found no apertures. There should at least be one aperture ' \
|
|
136
|
-
'in your model.'
|
|
137
|
-
|
|
138
|
-
if view_factor:
|
|
139
|
-
# write octree
|
|
140
|
-
model_content, modifier_content = model.to.rad(model, minimal=True)
|
|
141
|
-
scene_file, mat_file = 'scene.rad', 'scene.mat'
|
|
142
|
-
write_to_file_by_name(folder_dir, scene_file, model_content)
|
|
143
|
-
write_to_file_by_name(folder_dir, mat_file, modifier_content)
|
|
144
|
-
|
|
145
|
-
octree = 'scene.oct'
|
|
146
|
-
oconv = Oconv(inputs=[mat_file, scene_file], output=octree)
|
|
147
|
-
oconv.options.f = True
|
|
148
|
-
|
|
149
|
-
# run Oconv command
|
|
150
|
-
env = None
|
|
151
|
-
if rad_folders.env != {}:
|
|
152
|
-
env = rad_folders.env
|
|
153
|
-
env = dict(os.environ, **env) if env else None
|
|
154
|
-
oconv.run(env, cwd=folder_dir)
|
|
155
|
-
|
|
156
|
-
rflux_sky = SkyDome()
|
|
157
|
-
rflux_sky = rflux_sky.to_file(folder_dir, name='rflux_sky.sky')
|
|
158
|
-
|
|
159
|
-
# calculate view factor
|
|
160
|
-
mtx_file, ap_dict = aperture_view_factor(
|
|
161
|
-
folder_dir, apertures, size=size, ambient_division=1000,
|
|
162
|
-
receiver=rflux_sky, octree=octree, calc_folder=folder_dir
|
|
163
|
-
)
|
|
164
|
-
rmse = aperture_view_factor_postprocess(
|
|
165
|
-
mtx_file, ap_dict, room_apertures, room_based
|
|
166
|
-
)
|
|
167
|
-
|
|
168
|
-
# cluster apertures into groups
|
|
169
|
-
if view_factor:
|
|
170
|
-
ap_groups = cluster_view_factor(
|
|
171
|
-
rmse, room_apertures, apertures, 0.001, room_based, vertical_tolerance)
|
|
172
|
-
else:
|
|
173
|
-
ap_groups = cluster_orientation(
|
|
174
|
-
room_apertures, apertures, room_based, vertical_tolerance
|
|
175
|
-
)
|
|
176
|
-
|
|
177
|
-
# process clusters
|
|
178
|
-
group_names, group_dict = \
|
|
179
|
-
cluster_output(ap_groups, room_apertures, room_based)
|
|
180
|
-
|
|
181
|
-
# write aperture groups to JSON file
|
|
182
|
-
dyn_gr = os.path.join(folder_dir, 'aperture_groups.json')
|
|
183
|
-
with open(dyn_gr, 'w') as fp:
|
|
184
|
-
json.dump(group_names, fp, indent=2)
|
|
185
|
-
|
|
186
|
-
# write dynamic group identifiers to JSON file
|
|
187
|
-
dyn_gr_ids = os.path.join(folder_dir, 'dynamic_group_identifiers.json')
|
|
188
|
-
with open(dyn_gr_ids, 'w') as fp:
|
|
189
|
-
json.dump(group_dict, fp, indent=2)
|
|
190
|
-
|
|
191
|
-
# assign dynamic group identifiers for each aperture
|
|
192
|
-
group_ap_dict = {}
|
|
193
|
-
for room in model.rooms:
|
|
194
|
-
for face in room.faces:
|
|
195
|
-
for ap in face.apertures:
|
|
196
|
-
if isinstance(ap.boundary_condition, Outdoors):
|
|
197
|
-
dyn_group_id = group_dict[ap.identifier]
|
|
198
|
-
ap.properties.radiance.dynamic_group_identifier = \
|
|
199
|
-
dyn_group_id
|
|
200
|
-
try:
|
|
201
|
-
group_ap_dict[dyn_group_id].append(ap)
|
|
202
|
-
except KeyError:
|
|
203
|
-
group_ap_dict[dyn_group_id] = [ap]
|
|
204
|
-
|
|
205
|
-
# assign any states if they are connected
|
|
206
|
-
if len(states_) != 0:
|
|
207
|
-
for group_aps in group_ap_dict.values():
|
|
208
|
-
# assign states (including shades) to the first aperture
|
|
209
|
-
group_aps[0].properties.radiance.states = [state.duplicate() for state in states_]
|
|
210
|
-
# remove shades from following apertures to ensure they aren't double-counted
|
|
211
|
-
states_wo_shades = []
|
|
212
|
-
for state in states_:
|
|
213
|
-
new_state = state.duplicate()
|
|
214
|
-
new_state.remove_shades()
|
|
215
|
-
states_wo_shades.append(new_state)
|
|
216
|
-
for ap in group_aps[1:]:
|
|
217
|
-
ap.properties.radiance.states = \
|
|
218
|
-
[state.duplicate() for state in states_wo_shades]
|
|
97
|
+
# automatically assign groups
|
|
98
|
+
automatic_aperture_grouping(
|
|
99
|
+
model, size=size, room_based=room_based, view_factor_or_orientation=view_factor,
|
|
100
|
+
vertical_tolerance=vertical_tolerance, states=states_)
|
|
Binary file
|
|
@@ -16,7 +16,7 @@ honeybee_grasshopper_radiance/src/HB Apply ModifierSet.py,sha256=Jx62qOUzZ3YhU3E
|
|
|
16
16
|
honeybee_grasshopper_radiance/src/HB Apply Shade Modifier.py,sha256=FEpe9fdbrZbGWLFIVib1FuUvF9V_ozP1bioWfa-ClOM,4727
|
|
17
17
|
honeybee_grasshopper_radiance/src/HB Apply Window Modifier.py,sha256=QaX1IF5c2uNrCWFWIVNyp8vCk823Vdnb_yiJbAEVscQ,5246
|
|
18
18
|
honeybee_grasshopper_radiance/src/HB Assign Grids and Views.py,sha256=iuQLBMddE5skVCe3rnFyhKySq_psujFu4Y0FsRtKxiI,2159
|
|
19
|
-
honeybee_grasshopper_radiance/src/HB Automatic Aperture Group.py,sha256=
|
|
19
|
+
honeybee_grasshopper_radiance/src/HB Automatic Aperture Group.py,sha256=TfWWoHSIuVXH2dw8YsmWyLErs-mwQUA1yYz9KZvPn7U,4734
|
|
20
20
|
honeybee_grasshopper_radiance/src/HB BSDF Modifier.py,sha256=aDygn5veaTApNG9ZQ8nWO7UHQUF7vpFhgRdBrqS7X-w,3211
|
|
21
21
|
honeybee_grasshopper_radiance/src/HB CIE Standard Sky.py,sha256=xnEyIUNJIWzSpTv-SjYjD4UVIP2Ar0X8YBoQiE--t4M,2845
|
|
22
22
|
honeybee_grasshopper_radiance/src/HB Certain Illuminance.py,sha256=yEOoldaVBvKG7Cph1f8jSRWlgn_MpVL8RSZbwCcNv-g,1350
|
|
@@ -97,7 +97,7 @@ honeybee_grasshopper_radiance/user_objects/HB Apply ModifierSet.ghuser,sha256=rT
|
|
|
97
97
|
honeybee_grasshopper_radiance/user_objects/HB Apply Shade Modifier.ghuser,sha256=0HUxaznpnxPWfmTdF2OboQIHEqCL3i27ITCkmBoWbFM,4789
|
|
98
98
|
honeybee_grasshopper_radiance/user_objects/HB Apply Window Modifier.ghuser,sha256=t3HWk5Bb8fyxAkE1NtNsXeN4L_StP3xPP0wgN8Sm4-E,5099
|
|
99
99
|
honeybee_grasshopper_radiance/user_objects/HB Assign Grids and Views.ghuser,sha256=3V1SS7_6TWhCO-X7LCkW6DtTg-9BSG_B3fCBUbOrAxM,4916
|
|
100
|
-
honeybee_grasshopper_radiance/user_objects/HB Automatic Aperture Group.ghuser,sha256=
|
|
100
|
+
honeybee_grasshopper_radiance/user_objects/HB Automatic Aperture Group.ghuser,sha256=ZoXyAdVwyyaqXzopnA-BzLM-CKEJSUFVtBnBXIC64rQ,6229
|
|
101
101
|
honeybee_grasshopper_radiance/user_objects/HB BSDF Modifier.ghuser,sha256=1kgfBC8CopJTOMG2ZcqB2xptpVWGagcV68aGrk_A3cs,5314
|
|
102
102
|
honeybee_grasshopper_radiance/user_objects/HB CIE Standard Sky.ghuser,sha256=H_Xm_hddoCVUdCLa4-xdRBQPBx7i1azRojNi0_mebx8,5333
|
|
103
103
|
honeybee_grasshopper_radiance/user_objects/HB Certain Illuminance.ghuser,sha256=GObGDyDfKcO-WCKCQLYOmIVnscjvfmWTDtrTQ8CyI7w,4223
|
|
@@ -163,8 +163,8 @@ honeybee_grasshopper_radiance/user_objects/HB Wea From EPW.ghuser,sha256=RC0YVNW
|
|
|
163
163
|
honeybee_grasshopper_radiance/user_objects/HB Wea From Tau Clear Sky.ghuser,sha256=WmcJdcy7g4zQwtR-SWYrqLZs7WA6GhtRheijykKizAU,5423
|
|
164
164
|
honeybee_grasshopper_radiance/user_objects/HB Wea from Zhang-Huang.ghuser,sha256=G86nZiRNxajZVNlfBFnSEYu5DAQ0z78v0V3IJhi18FE,4679
|
|
165
165
|
honeybee_grasshopper_radiance/user_objects/__init__.py,sha256=7BOscRVupILqwFUBWP6nAsMNgNN8lXQPsQ_zYUvGEr8,50
|
|
166
|
-
honeybee_grasshopper_radiance-1.34.
|
|
167
|
-
honeybee_grasshopper_radiance-1.34.
|
|
168
|
-
honeybee_grasshopper_radiance-1.34.
|
|
169
|
-
honeybee_grasshopper_radiance-1.34.
|
|
170
|
-
honeybee_grasshopper_radiance-1.34.
|
|
166
|
+
honeybee_grasshopper_radiance-1.34.4.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
|
|
167
|
+
honeybee_grasshopper_radiance-1.34.4.dist-info/METADATA,sha256=q65LGupSbhCIff_ooS3F6c6UXxb_tOcJ3YkcFE2ie4Y,2767
|
|
168
|
+
honeybee_grasshopper_radiance-1.34.4.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
|
|
169
|
+
honeybee_grasshopper_radiance-1.34.4.dist-info/top_level.txt,sha256=BBzJ4nJKMDfzWMqymIH91kdsQlHSptnGHSk8i6_KZ_4,30
|
|
170
|
+
honeybee_grasshopper_radiance-1.34.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|