honeybee-radiance-postprocess 0.4.390__py2.py3-none-any.whl → 0.4.392__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.
@@ -7,6 +7,7 @@ import click
7
7
  import numpy as np
8
8
 
9
9
  from honeybee.model import Model
10
+ from honeybee.room import Room
10
11
  from ladybug_geometry.geometry3d.face import Face3D
11
12
  from ladybug_geometry.geometry3d.pointvector import Vector3D
12
13
 
@@ -28,6 +29,12 @@ def abnt():
28
29
  )
29
30
  @click.argument('model-file', type=click.Path(
30
31
  exists=True, file_okay=True, dir_okay=False, resolve_path=True))
32
+ @click.option(
33
+ '--ground-level', '-gl', help='A value to define the height of the ground '
34
+ 'level. This will make sure that rooms below this height will not be '
35
+ 'counted as ground level rooms.',
36
+ default=0, show_default=True, type=click.FLOAT
37
+ )
31
38
  @click.option(
32
39
  '--room-center/--grid-center', '-rc/-gc', help='Flag to note whether the '
33
40
  'evaluation of the center is at the room center or the grid center.',
@@ -38,7 +45,7 @@ def abnt():
38
45
  exists=False, file_okay=False, dir_okay=True, resolve_path=True, path_type=Path)
39
46
  )
40
47
  def abnt_nbr_15575(
41
- folder, model_file, room_center, sub_folder
48
+ folder, model_file, ground_level, room_center, sub_folder
42
49
  ):
43
50
  """Calculate metrics for ABNT NBR 15575.
44
51
 
@@ -102,6 +109,14 @@ def abnt_nbr_15575(
102
109
  try:
103
110
  folder = Path(folder)
104
111
  hb_model: Model = Model.from_file(model_file)
112
+ grouped_rooms, floor_heights = Room.group_by_floor_height(hb_model.rooms)
113
+
114
+ # pick the first group >= to ground level
115
+ for gr, fh in zip(grouped_rooms, floor_heights):
116
+ if fh >= ground_level:
117
+ ground_level_rooms = gr
118
+ break
119
+
105
120
  sensor_grids = hb_model.properties.radiance.sensor_grids
106
121
  sg_full_identifier = {sg.full_identifier: sg for sg in sensor_grids}
107
122
 
@@ -139,16 +154,22 @@ def abnt_nbr_15575(
139
154
  x_coords = sensor_points[:, 0]
140
155
  y_coords = sensor_points[:, 1]
141
156
 
157
+ room = hb_model.rooms_by_identifier([sensor_grid.room_identifier])[0]
158
+
142
159
  pof_sensor_grid = \
143
160
  pof_sensor_grids.get(grid_info['full_id'], None)
144
161
  # if pof is not calculated for this grid
145
162
  if pof_sensor_grid is None:
146
163
  if room_center:
147
- room = hb_model.rooms_by_identifier(
148
- [sensor_grid.room_identifier]
164
+ floor_face = Face3D.join_coplanar_faces(
165
+ room.horizontal_floor_boundaries(), 0.05
149
166
  )[0]
150
- pof_sensor_grids[grid_info['full_id']] = \
151
- room.center + Vector3D(0, 0, 0.75)
167
+ if floor_face.is_convex:
168
+ pof_sensor_grids[grid_info['full_id']] = \
169
+ floor_face.centroid + Vector3D(0, 0, 0.75)
170
+ else:
171
+ pof_sensor_grids[grid_info['full_id']] = \
172
+ floor_face.pole_of_inaccessibility(0.01) + Vector3D(0, 0, 0.75)
152
173
  else:
153
174
  faces_3d = [Face3D(face_vertices) for face_vertices in sensor_grid.mesh.face_vertices]
154
175
  face_3d_union = Face3D.join_coplanar_faces(faces_3d, 0.05)
@@ -164,11 +185,16 @@ def abnt_nbr_15575(
164
185
  y = pof_sensor_grids[grid_info['full_id']].y
165
186
  f_xy = perform_interpolation(x, y, x_coords, y_coords, pit_values)
166
187
 
188
+ if room in ground_level_rooms:
189
+ minimo = 48
190
+ else:
191
+ minimo = 60
192
+
167
193
  if f_xy >= 120:
168
194
  level = 'Superior'
169
195
  elif f_xy >= 90:
170
196
  level = 'Intermediário'
171
- elif f_xy >= 60: # add check for ground floor (48 lux)
197
+ elif f_xy >= minimo: # add check for ground floor (48 lux)
172
198
  level = 'Mínimo'
173
199
  else:
174
200
  level = 'Não atende'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: honeybee-radiance-postprocess
3
- Version: 0.4.390
3
+ Version: 0.4.392
4
4
  Summary: Postprocessing of Radiance results and matrices
5
5
  Home-page: https://github.com/ladybug-tools/honeybee-radiance-postprocess
6
6
  Author: Ladybug Tools
@@ -14,7 +14,7 @@ honeybee_radiance_postprocess/type_hints.py,sha256=4R0kZgacQrqzoh8Tq7f8MVzUDzynV
14
14
  honeybee_radiance_postprocess/util.py,sha256=-J5k1dhvyYJkb42jvTS_xxtokfGbmcucVPXdMWU1jUk,5098
15
15
  honeybee_radiance_postprocess/vis_metadata.py,sha256=7ywIgdiuNKcctxifhpy7-Q2oaSX2ngQBeA0Kh7q1Gg0,1780
16
16
  honeybee_radiance_postprocess/cli/__init__.py,sha256=4RkpR91GPXWatDE4I_27ce-N4FwolQoO6WO7H24DMXE,777
17
- honeybee_radiance_postprocess/cli/abnt.py,sha256=mN2cT3zkEsM4bLVbnGx2dPBVPEE_AjnBq_wLTXaf-uE,11366
17
+ honeybee_radiance_postprocess/cli/abnt.py,sha256=kenlfNCRDJTMBCtTraFHwYcI3eSwtt22t_cJzw_IWp8,12462
18
18
  honeybee_radiance_postprocess/cli/grid.py,sha256=6peLEAPVe-iw05_wdRpFruZLqO8myvC-_QT5W1q5sk8,10677
19
19
  honeybee_radiance_postprocess/cli/leed.py,sha256=QBR6AMJJWuZ0TevyMi2tXCWMLdS-ZSqtVTZDgqxwa7M,3112
20
20
  honeybee_radiance_postprocess/cli/mtxop.py,sha256=UZJnjNpPjDmShy1-Mxos4H2vTUqk_yP3ZyaC1_LLFeI,5015
@@ -27,9 +27,9 @@ honeybee_radiance_postprocess/results/__init__.py,sha256=1agBQbfT4Tf8KqSZzlfKYX8
27
27
  honeybee_radiance_postprocess/results/annual_daylight.py,sha256=o4Y5kbD3a4X4KRfsbOlWzgrnNKU365GcivM6qQGUGXU,31605
28
28
  honeybee_radiance_postprocess/results/annual_irradiance.py,sha256=5zwrr4MNeHUebbSRpSBbscPOZUs2AHmYCQfIIbdYImY,8298
29
29
  honeybee_radiance_postprocess/results/results.py,sha256=jkjsxTuvVfBus6tM2UjQE3ZKPooLInWEd2guqO61v9E,53600
30
- honeybee_radiance_postprocess-0.4.390.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
31
- honeybee_radiance_postprocess-0.4.390.dist-info/METADATA,sha256=k-Zbx7iamcpcUYrX-SPVXfGVwynl2NLnIzaoAojTD-8,2245
32
- honeybee_radiance_postprocess-0.4.390.dist-info/WHEEL,sha256=unfA4MOaH0icIyIA5oH6E2sn2Hq5zKtLlHsWapZGwes,110
33
- honeybee_radiance_postprocess-0.4.390.dist-info/entry_points.txt,sha256=gFtVPx6UItXt27GfEZZO00eOZChJJEL6JwGSAB_O3rs,96
34
- honeybee_radiance_postprocess-0.4.390.dist-info/top_level.txt,sha256=4-sFbzy7ewP2EDqJV3jeFlAFx7SuxtoBBELWaKAnLdA,30
35
- honeybee_radiance_postprocess-0.4.390.dist-info/RECORD,,
30
+ honeybee_radiance_postprocess-0.4.392.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
31
+ honeybee_radiance_postprocess-0.4.392.dist-info/METADATA,sha256=PwxoGim-iaHYI3IJNDWXBJd6Pvjeq6Dm6NCVQGt0R3A,2245
32
+ honeybee_radiance_postprocess-0.4.392.dist-info/WHEEL,sha256=unfA4MOaH0icIyIA5oH6E2sn2Hq5zKtLlHsWapZGwes,110
33
+ honeybee_radiance_postprocess-0.4.392.dist-info/entry_points.txt,sha256=gFtVPx6UItXt27GfEZZO00eOZChJJEL6JwGSAB_O3rs,96
34
+ honeybee_radiance_postprocess-0.4.392.dist-info/top_level.txt,sha256=4-sFbzy7ewP2EDqJV3jeFlAFx7SuxtoBBELWaKAnLdA,30
35
+ honeybee_radiance_postprocess-0.4.392.dist-info/RECORD,,