honeybee-core 1.61.24__py2.py3-none-any.whl → 1.61.25__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/room.py +37 -11
- {honeybee_core-1.61.24.dist-info → honeybee_core-1.61.25.dist-info}/METADATA +1 -1
- {honeybee_core-1.61.24.dist-info → honeybee_core-1.61.25.dist-info}/RECORD +7 -7
- {honeybee_core-1.61.24.dist-info → honeybee_core-1.61.25.dist-info}/LICENSE +0 -0
- {honeybee_core-1.61.24.dist-info → honeybee_core-1.61.25.dist-info}/WHEEL +0 -0
- {honeybee_core-1.61.24.dist-info → honeybee_core-1.61.25.dist-info}/entry_points.txt +0 -0
- {honeybee_core-1.61.24.dist-info → honeybee_core-1.61.25.dist-info}/top_level.txt +0 -0
honeybee/room.py
CHANGED
|
@@ -2325,29 +2325,55 @@ class Room(_BaseWithShade):
|
|
|
2325
2325
|
A string with the message or a list with a dictionary if detailed is True.
|
|
2326
2326
|
"""
|
|
2327
2327
|
# create Polygon2Ds from the floors of the rooms
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
for
|
|
2332
|
-
|
|
2328
|
+
b_polys, h_polys = [], []
|
|
2329
|
+
for room in rooms:
|
|
2330
|
+
rb_polys, rh_polys = [], []
|
|
2331
|
+
for flr in room.floors:
|
|
2332
|
+
flr_geo = flr.geometry
|
|
2333
|
+
if flr_geo.is_horizontal(tolerance):
|
|
2334
|
+
b_poly = Polygon2D(Point2D(p.x, p.y) for p in flr_geo.boundary)
|
|
2335
|
+
rb_polys.append((b_poly, flr_geo[0].z))
|
|
2336
|
+
if flr_geo.has_holes:
|
|
2337
|
+
h_poly = [Polygon2D(Point2D(p.x, p.y) for p in hole)
|
|
2338
|
+
for hole in flr_geo.holes]
|
|
2339
|
+
rh_polys.append(h_poly)
|
|
2340
|
+
else:
|
|
2341
|
+
rh_polys.append(None)
|
|
2342
|
+
b_polys.append(rb_polys)
|
|
2343
|
+
h_polys.append(rh_polys)
|
|
2333
2344
|
|
|
2334
2345
|
# find the number of overlaps across the Rooms
|
|
2335
2346
|
msgs = []
|
|
2336
|
-
for i, (room_1, polys_1) in enumerate(zip(rooms,
|
|
2347
|
+
for i, (room_1, polys_1, hp1) in enumerate(zip(rooms, b_polys, h_polys)):
|
|
2337
2348
|
overlap_rooms = []
|
|
2338
2349
|
if len(polys_1) == 0:
|
|
2339
2350
|
continue
|
|
2340
2351
|
try:
|
|
2341
|
-
|
|
2352
|
+
zip_obj = zip(rooms[i + 1:], b_polys[i + 1:], h_polys[i + 1:])
|
|
2353
|
+
for room_2, polys_2, hp2 in zip_obj:
|
|
2342
2354
|
collision_found = False
|
|
2343
|
-
for ply_1, z1 in polys_1:
|
|
2355
|
+
for j, (ply_1, z1) in enumerate(polys_1):
|
|
2344
2356
|
if collision_found:
|
|
2345
2357
|
break
|
|
2346
|
-
for ply_2, z2 in polys_2:
|
|
2358
|
+
for k, (ply_2, z2) in enumerate(polys_2):
|
|
2347
2359
|
if collision_found:
|
|
2348
2360
|
break
|
|
2349
|
-
if abs(z1 - z2) < tolerance
|
|
2350
|
-
|
|
2361
|
+
if abs(z1 - z2) < tolerance and \
|
|
2362
|
+
ply_1.polygon_relationship(ply_2, tolerance) >= 0:
|
|
2363
|
+
# check that one room is not inside the hole of another
|
|
2364
|
+
inside_hole = False
|
|
2365
|
+
if hp1[j] is not None:
|
|
2366
|
+
for h in hp1[j]:
|
|
2367
|
+
if h.polygon_relationship(ply_2, tolerance) == 1:
|
|
2368
|
+
inside_hole = True
|
|
2369
|
+
break
|
|
2370
|
+
if not inside_hole and hp2[k] is not None:
|
|
2371
|
+
for h in hp2[k]:
|
|
2372
|
+
if h.polygon_relationship(ply_1, tolerance) == 1:
|
|
2373
|
+
inside_hole = True
|
|
2374
|
+
break
|
|
2375
|
+
# if the room is not in a hole, then they overlap
|
|
2376
|
+
if not inside_hole:
|
|
2351
2377
|
overlap_rooms.append(room_2)
|
|
2352
2378
|
collision_found = True
|
|
2353
2379
|
break
|
|
@@ -19,7 +19,7 @@ honeybee/logutil.py,sha256=2gn-6RcWqFLvwdFzBHPqUwFqTj_R3iwHKALrl-2eL7M,2564
|
|
|
19
19
|
honeybee/model.py,sha256=RZhj195_Nr5jlUauEOo7H5ZdNZDdKyBb2kwhDxRB1oI,175099
|
|
20
20
|
honeybee/orientation.py,sha256=GogGblASW9OU-fobfDaQ7w5yRbEAFdJJuHwg2fadhKI,5046
|
|
21
21
|
honeybee/properties.py,sha256=fnlT71in22HpFQGD8ta5kXNnSZVXwXq5cNgvD-hrMRg,33462
|
|
22
|
-
honeybee/room.py,sha256=
|
|
22
|
+
honeybee/room.py,sha256=lZZR_ZIpu3ZatnlRSZe4mjirkfJo8FCwRQmgsuR-6d8,150193
|
|
23
23
|
honeybee/search.py,sha256=OiXibGGVb1ff4gTn_768i-sehB-zAYG12c0o3B0RjKE,4718
|
|
24
24
|
honeybee/shade.py,sha256=G_ujmsPQeKvcc0O1ICiFRhVkjypkKBbgY9wJKck-9uU,19393
|
|
25
25
|
honeybee/shademesh.py,sha256=oldugnwhu-ibX9f0hfxpO-DvgM8U7S-dYwUjBSVzo4g,13273
|
|
@@ -40,9 +40,9 @@ honeybee/writer/model.py,sha256=N7F_jksf-5TrdVecuxTaFWxnPVFLmQs7k8g27TsdB7Q,177
|
|
|
40
40
|
honeybee/writer/room.py,sha256=kFghgStTU1SEJSLigXB0VjOWhZtgs4uXuAqdwd4yRQo,174
|
|
41
41
|
honeybee/writer/shade.py,sha256=EpgX-vMc-s21TnMvNWvWTKyT8iAnxu1nFVXzjY1oyF8,177
|
|
42
42
|
honeybee/writer/shademesh.py,sha256=Y41bLogJ7dwpvMe5cAWVRDRVqJEwo9e5hFJQjlt6UX8,189
|
|
43
|
-
honeybee_core-1.61.
|
|
44
|
-
honeybee_core-1.61.
|
|
45
|
-
honeybee_core-1.61.
|
|
46
|
-
honeybee_core-1.61.
|
|
47
|
-
honeybee_core-1.61.
|
|
48
|
-
honeybee_core-1.61.
|
|
43
|
+
honeybee_core-1.61.25.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
|
|
44
|
+
honeybee_core-1.61.25.dist-info/METADATA,sha256=a747oDPQMZlU9flnMa9Oi6Gr9DnJhG44FRdk9hDaTTw,3317
|
|
45
|
+
honeybee_core-1.61.25.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
|
|
46
|
+
honeybee_core-1.61.25.dist-info/entry_points.txt,sha256=r3YqOm40goBroH3ccUhpwQjvTwu10JWLd0HIRHI1J8E,47
|
|
47
|
+
honeybee_core-1.61.25.dist-info/top_level.txt,sha256=8ve7puCRLUA9XDEGc1Mcs-UX9sFjpPV8MeTaIMwQ_Tg,9
|
|
48
|
+
honeybee_core-1.61.25.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|