honeybee-grasshopper-radiance 1.34.3__py2.py3-none-any.whl → 1.34.5__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/src/HB Get Grids and Views.py +18 -1
- honeybee_grasshopper_radiance/user_objects/HB Automatic Aperture Group.ghuser +0 -0
- honeybee_grasshopper_radiance/user_objects/HB Get Grids and Views.ghuser and b/honeybee_grasshopper_radiance/user_objects/HB Get Grids → Views.ghuser +0 -0
- {honeybee_grasshopper_radiance-1.34.3.dist-info → honeybee_grasshopper_radiance-1.34.5.dist-info}/METADATA +1 -1
- {honeybee_grasshopper_radiance-1.34.3.dist-info → honeybee_grasshopper_radiance-1.34.5.dist-info}/RECORD +9 -9
- {honeybee_grasshopper_radiance-1.34.3.dist-info → honeybee_grasshopper_radiance-1.34.5.dist-info}/WHEEL +1 -1
- {honeybee_grasshopper_radiance-1.34.3.dist-info → honeybee_grasshopper_radiance-1.34.5.dist-info}/LICENSE +0 -0
- {honeybee_grasshopper_radiance-1.34.3.dist-info → honeybee_grasshopper_radiance-1.34.5.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_)
|
|
@@ -14,6 +14,14 @@ in the Rhino scene.
|
|
|
14
14
|
|
|
15
15
|
Args:
|
|
16
16
|
_model: A Honeybee Model for which grids and views will be output.
|
|
17
|
+
view_filter_: Text for a view identifer or a pattern to filter the views of the
|
|
18
|
+
model that are output. For instance, `first_floor_*` will simulate
|
|
19
|
+
only the views that have an identifier that starts with `first_floor_`.
|
|
20
|
+
By default, all views in the model will be output.
|
|
21
|
+
grid_filter_: Text for a grid identifer or a pattern to filter the sensor grids of
|
|
22
|
+
the model that are output. For instance, first_floor_* will simulate
|
|
23
|
+
only the sensor grids that have an identifier that starts with
|
|
24
|
+
first_floor_. By default, all grids in the model will be output.
|
|
17
25
|
|
|
18
26
|
Returns:
|
|
19
27
|
views: A list of Honeybee-Radiance Views that are assigned to the
|
|
@@ -27,7 +35,7 @@ in the Rhino scene.
|
|
|
27
35
|
|
|
28
36
|
ghenv.Component.Name = 'HB Get Grids and Views'
|
|
29
37
|
ghenv.Component.NickName = 'GetGridsViews'
|
|
30
|
-
ghenv.Component.Message = '1.8.
|
|
38
|
+
ghenv.Component.Message = '1.8.1'
|
|
31
39
|
ghenv.Component.Category = 'HB-Radiance'
|
|
32
40
|
ghenv.Component.SubCategory = '0 :: Basic Properties'
|
|
33
41
|
ghenv.Component.AdditionalHelpFromDocStrings = '5'
|
|
@@ -42,6 +50,11 @@ try: # import core honeybee dependencies
|
|
|
42
50
|
except ImportError as e:
|
|
43
51
|
raise ImportError('\nFailed to import honeybee:\n\t{}'.format(e))
|
|
44
52
|
|
|
53
|
+
try: # import honeybee_radiance dependencies
|
|
54
|
+
from honeybee_radiance.writer import _filter_by_pattern
|
|
55
|
+
except ImportError as e:
|
|
56
|
+
raise ImportError('\nFailed to import honeybee_radiance:\n\t{}'.format(e))
|
|
57
|
+
|
|
45
58
|
try: # import ladybug_rhino dependencies
|
|
46
59
|
from ladybug_rhino.fromgeometry import from_point3d, from_mesh3d
|
|
47
60
|
from ladybug_rhino.grasshopper import all_required_inputs, list_to_data_tree
|
|
@@ -54,7 +67,11 @@ if all_required_inputs(ghenv.Component):
|
|
|
54
67
|
'Expected Honeybee Model. Got {}.'.format(type(_model))
|
|
55
68
|
# get the honeybee-radiance objects
|
|
56
69
|
views = _model.properties.radiance.views
|
|
70
|
+
if view_filter_ is not None:
|
|
71
|
+
views = _filter_by_pattern(views, view_filter_)
|
|
57
72
|
grids = _model.properties.radiance.sensor_grids
|
|
73
|
+
if grid_filter_ is not None:
|
|
74
|
+
grids = _filter_by_pattern(grids, grid_filter_)
|
|
58
75
|
|
|
59
76
|
# get the visualizable attributes
|
|
60
77
|
points = [[from_point3d(Point3D.from_array(s.pos)) for s in sg] for sg in grids]
|
|
Binary file
|
|
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
|
|
@@ -39,7 +39,7 @@ honeybee_grasshopper_radiance/src/HB Exterior Modifier Subset.py,sha256=D63Sxk_a
|
|
|
39
39
|
honeybee_grasshopper_radiance/src/HB Extract HDR.py,sha256=qp2wdIGXqAkHUs2Jr6w5JdjpCL9PHuP-cF4WEsNyc2c,9067
|
|
40
40
|
honeybee_grasshopper_radiance/src/HB False Color.py,sha256=LTQ2mDpJdx7Yzl1UaPMfjedUu3LXK_lAuqQ8Y44TAek,10148
|
|
41
41
|
honeybee_grasshopper_radiance/src/HB Get Dynamic Groups.py,sha256=qRumvNWJw9-z7WxuYqyJtdI8L3xeug8j4DfYnSrxTds,2191
|
|
42
|
-
honeybee_grasshopper_radiance/src/HB Get Grids and Views.py,sha256=
|
|
42
|
+
honeybee_grasshopper_radiance/src/HB Get Grids and Views.py,sha256=TbkpoHUQiFVoCI5DxfVq_TU9UkQ0NHLO_ezp_ArHP_8,3501
|
|
43
43
|
honeybee_grasshopper_radiance/src/HB Glare Postprocess.py,sha256=cUci0AwlAcVH4505nmMbHpCkVFyZy9eGNDzPxXRKCUM,10101
|
|
44
44
|
honeybee_grasshopper_radiance/src/HB Glass Modifier 3.py,sha256=xdYBijQ1ZTEzjdwvN7l_zMXVqwRJfCq-vVts9wRd-1M,2447
|
|
45
45
|
honeybee_grasshopper_radiance/src/HB Glass Modifier.py,sha256=VY5RmO1RrtnNA90YQ3P0lcSXdtmpYjlYBW44t7X8_lg,2244
|
|
@@ -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
|
|
@@ -121,7 +121,7 @@ honeybee_grasshopper_radiance/user_objects/HB Extract HDR.ghuser,sha256=buUshUoR
|
|
|
121
121
|
honeybee_grasshopper_radiance/user_objects/HB Face Radiance Attributes.ghuser,sha256=yU2xi4DpW03dN22Fp1uLcSx0cW9KDZ2nxa78WY9F2eg,2444
|
|
122
122
|
honeybee_grasshopper_radiance/user_objects/HB False Color.ghuser,sha256=11kvIk0XwugcILQz4gQ9u93rv6V6tWvQ_nuAz_dfnqA,9391
|
|
123
123
|
honeybee_grasshopper_radiance/user_objects/HB Get Dynamic Groups.ghuser,sha256=k9hbsvzdmfXx639l7POH9uiT89QcZ0hMWLUFIru8rGY,4744
|
|
124
|
-
honeybee_grasshopper_radiance/user_objects/HB Get Grids and Views.ghuser,sha256=
|
|
124
|
+
honeybee_grasshopper_radiance/user_objects/HB Get Grids and Views.ghuser,sha256=zHFgOGErjY8EuQInM0Ju1ep5AWAF3Rx76wX8hoBjTaM,5465
|
|
125
125
|
honeybee_grasshopper_radiance/user_objects/HB Glare Postprocess.ghuser,sha256=rrcpUBnYJA5w_NeyQ1CqjTBhfRRD8_KRizhVT_Im3VE,7101
|
|
126
126
|
honeybee_grasshopper_radiance/user_objects/HB Glass Modifier 3.ghuser,sha256=DyxxddjE5cJhw6O5Q7bn865-OfL8VlxqaDkt-YQRMUM,4767
|
|
127
127
|
honeybee_grasshopper_radiance/user_objects/HB Glass Modifier.ghuser,sha256=tc79qklvRkgdllmoxCwhkZFurbRadglPvQZ5rnJvEZ0,4122
|
|
@@ -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.5.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
|
|
167
|
+
honeybee_grasshopper_radiance-1.34.5.dist-info/METADATA,sha256=Pd-rCm2rPhxEtjgVVVix9QaMP3npQ65eESruVRF3rEk,2767
|
|
168
|
+
honeybee_grasshopper_radiance-1.34.5.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
|
|
169
|
+
honeybee_grasshopper_radiance-1.34.5.dist-info/top_level.txt,sha256=BBzJ4nJKMDfzWMqymIH91kdsQlHSptnGHSk8i6_KZ_4,30
|
|
170
|
+
honeybee_grasshopper_radiance-1.34.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|