honeybee-core 1.61.30__py2.py3-none-any.whl → 1.61.32__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/model.py +21 -17
- honeybee/room.py +20 -28
- {honeybee_core-1.61.30.dist-info → honeybee_core-1.61.32.dist-info}/METADATA +3 -3
- {honeybee_core-1.61.30.dist-info → honeybee_core-1.61.32.dist-info}/RECORD +8 -8
- {honeybee_core-1.61.30.dist-info → honeybee_core-1.61.32.dist-info}/LICENSE +0 -0
- {honeybee_core-1.61.30.dist-info → honeybee_core-1.61.32.dist-info}/WHEEL +0 -0
- {honeybee_core-1.61.30.dist-info → honeybee_core-1.61.32.dist-info}/entry_points.txt +0 -0
- {honeybee_core-1.61.30.dist-info → honeybee_core-1.61.32.dist-info}/top_level.txt +0 -0
honeybee/model.py
CHANGED
|
@@ -181,7 +181,7 @@ class Model(_Base):
|
|
|
181
181
|
rooms = []
|
|
182
182
|
for r in data['rooms']:
|
|
183
183
|
try:
|
|
184
|
-
rooms.append(Room.from_dict(r, tol
|
|
184
|
+
rooms.append(Room.from_dict(r, tol))
|
|
185
185
|
except Exception as e:
|
|
186
186
|
invalid_dict_error(r, e)
|
|
187
187
|
orphaned_faces = None # import orphaned faces
|
|
@@ -2239,7 +2239,7 @@ class Model(_Base):
|
|
|
2239
2239
|
msgs.append(self.check_sub_faces_valid(tol, ang_tol, False, detailed))
|
|
2240
2240
|
msgs.append(self.check_sub_faces_overlapping(tol, False, detailed))
|
|
2241
2241
|
msgs.append(self.check_upside_down_faces(ang_tol, False, detailed))
|
|
2242
|
-
msgs.append(self.check_rooms_solid(tol,
|
|
2242
|
+
msgs.append(self.check_rooms_solid(tol, raise_exception=False, detailed=detailed))
|
|
2243
2243
|
|
|
2244
2244
|
# perform checks related to adjacency relationships
|
|
2245
2245
|
msgs.append(self.check_room_volume_collisions(tol, False, detailed))
|
|
@@ -2619,9 +2619,7 @@ class Model(_Base):
|
|
|
2619
2619
|
tolerance: tolerance: The maximum difference between x, y, and z values
|
|
2620
2620
|
at which face vertices are considered equivalent. If None, the Model
|
|
2621
2621
|
tolerance will be used. (Default: None).
|
|
2622
|
-
angle_tolerance:
|
|
2623
|
-
allowed to differ from one another in order to consider them colinear.
|
|
2624
|
-
If None, the Model angle_tolerance will be used. (Default: None).
|
|
2622
|
+
angle_tolerance: Deprecated input that is no longer used.
|
|
2625
2623
|
raise_exception: Boolean to note whether a ValueError should be raised
|
|
2626
2624
|
if the room geometry does not form a closed solid. (Default: True).
|
|
2627
2625
|
detailed: Boolean for whether the returned object is a detailed list of
|
|
@@ -2631,12 +2629,10 @@ class Model(_Base):
|
|
|
2631
2629
|
A string with the message or a list with a dictionary if detailed is True.
|
|
2632
2630
|
"""
|
|
2633
2631
|
tolerance = self.tolerance if tolerance is None else tolerance
|
|
2634
|
-
angle_tolerance = self.angle_tolerance \
|
|
2635
|
-
if angle_tolerance is None else angle_tolerance
|
|
2636
2632
|
detailed = False if raise_exception else detailed
|
|
2637
2633
|
msgs = []
|
|
2638
2634
|
for room in self._rooms:
|
|
2639
|
-
msg = room.check_solid(tolerance,
|
|
2635
|
+
msg = room.check_solid(tolerance, raise_exception=False, detailed=detailed)
|
|
2640
2636
|
if detailed:
|
|
2641
2637
|
msgs.extend(msg)
|
|
2642
2638
|
elif msg != '':
|
|
@@ -3497,11 +3493,6 @@ class Model(_Base):
|
|
|
3497
3493
|
json_output: Boolean to note whether the output validation report
|
|
3498
3494
|
should be formatted as a JSON object instead of plain text.
|
|
3499
3495
|
"""
|
|
3500
|
-
# first get the function to call on this class
|
|
3501
|
-
check_func = getattr(Model, check_function, None)
|
|
3502
|
-
assert check_func is not None, \
|
|
3503
|
-
'Honeybee Model class has no method {}'.format(check_function)
|
|
3504
|
-
|
|
3505
3496
|
# process the input model if it's not already serialized
|
|
3506
3497
|
report = ''
|
|
3507
3498
|
if isinstance(model, str):
|
|
@@ -3518,8 +3509,22 @@ class Model(_Base):
|
|
|
3518
3509
|
elif not isinstance(model, Model):
|
|
3519
3510
|
report = 'Input Model for validation is not a Model object, ' \
|
|
3520
3511
|
'file path to a Model or a Model HBJSON string.'
|
|
3512
|
+
|
|
3513
|
+
# get the function to call to do checks
|
|
3514
|
+
if '.' in check_function: # nested attribute
|
|
3515
|
+
attributes = check_function.split('.') # get all the sub-attributes
|
|
3516
|
+
check_func = model
|
|
3517
|
+
for attribute in attributes:
|
|
3518
|
+
if check_func is None:
|
|
3519
|
+
continue
|
|
3520
|
+
check_func = getattr(check_func, attribute, None)
|
|
3521
|
+
else:
|
|
3522
|
+
check_func = getattr(model, check_function, None)
|
|
3523
|
+
assert check_func is not None, \
|
|
3524
|
+
'Honeybee Model class has no method {}'.format(check_function)
|
|
3525
|
+
|
|
3521
3526
|
# process the arguments and options
|
|
3522
|
-
args = [
|
|
3527
|
+
args = [] if check_args is None else [] + list(check_args)
|
|
3523
3528
|
kwargs = {'raise_exception': False}
|
|
3524
3529
|
|
|
3525
3530
|
# create the report
|
|
@@ -3530,9 +3535,8 @@ class Model(_Base):
|
|
|
3530
3535
|
ver_msg = 'Validating Model using honeybee-core=={} and ' \
|
|
3531
3536
|
'honeybee-schema=={}'.format(c_ver, s_ver)
|
|
3532
3537
|
# run the check function
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
report = check_func(*args, **kwargs)
|
|
3538
|
+
kwargs['detailed'] = False
|
|
3539
|
+
report = check_func(*args, **kwargs)
|
|
3536
3540
|
# format the results of the check
|
|
3537
3541
|
if report == '':
|
|
3538
3542
|
full_msg = ver_msg + '\nCongratulations! Your Model is valid!'
|
honeybee/room.py
CHANGED
|
@@ -47,10 +47,7 @@ class Room(_BaseWithShade):
|
|
|
47
47
|
used in determining whether the faces form a closed volume. Default
|
|
48
48
|
is 0, which makes no attempt to evaluate whether the Room volume
|
|
49
49
|
is closed.
|
|
50
|
-
angle_tolerance:
|
|
51
|
-
allowed to differ from one another in order to consider them colinear.
|
|
52
|
-
Default is 0, which makes no attempt to evaluate whether the Room
|
|
53
|
-
volume is closed.
|
|
50
|
+
angle_tolerance: Deprecated input that is no longer used.
|
|
54
51
|
|
|
55
52
|
Properties:
|
|
56
53
|
* identifier
|
|
@@ -89,7 +86,7 @@ class Room(_BaseWithShade):
|
|
|
89
86
|
'_exclude_floor_area',
|
|
90
87
|
'_parent')
|
|
91
88
|
|
|
92
|
-
def __init__(self, identifier, faces, tolerance=0, angle_tolerance=
|
|
89
|
+
def __init__(self, identifier, faces, tolerance=0, angle_tolerance=None):
|
|
93
90
|
"""Initialize Room."""
|
|
94
91
|
_BaseWithShade.__init__(self, identifier) # process the identifier
|
|
95
92
|
|
|
@@ -108,9 +105,8 @@ class Room(_BaseWithShade):
|
|
|
108
105
|
# try to get a closed volume between the faces
|
|
109
106
|
room_polyface = Polyface3D.from_faces(
|
|
110
107
|
tuple(face.geometry for face in faces), tolerance)
|
|
111
|
-
if not room_polyface.is_solid
|
|
112
|
-
|
|
113
|
-
room_polyface = room_polyface.merge_overlapping_edges(tolerance, ang_tol)
|
|
108
|
+
if not room_polyface.is_solid:
|
|
109
|
+
room_polyface = room_polyface.merge_overlapping_edges(tolerance)
|
|
114
110
|
# replace honeybee face geometry with versions that are facing outwards
|
|
115
111
|
if room_polyface.is_solid:
|
|
116
112
|
for i, correct_face3d in enumerate(room_polyface.faces):
|
|
@@ -134,7 +130,7 @@ class Room(_BaseWithShade):
|
|
|
134
130
|
self._properties = RoomProperties(self) # properties for extensions
|
|
135
131
|
|
|
136
132
|
@classmethod
|
|
137
|
-
def from_dict(cls, data, tolerance=0, angle_tolerance=
|
|
133
|
+
def from_dict(cls, data, tolerance=0, angle_tolerance=None):
|
|
138
134
|
"""Initialize an Room from a dictionary.
|
|
139
135
|
|
|
140
136
|
Args:
|
|
@@ -144,10 +140,7 @@ class Room(_BaseWithShade):
|
|
|
144
140
|
used in determining whether the faces form a closed volume. Default
|
|
145
141
|
is 0, which makes no attempt to evaluate whether the Room volume
|
|
146
142
|
is closed.
|
|
147
|
-
angle_tolerance:
|
|
148
|
-
allowed to differ from one another in order to consider them colinear.
|
|
149
|
-
Default is 0, which makes no attempt to evaluate whether the Room
|
|
150
|
-
volume is closed.
|
|
143
|
+
angle_tolerance: Deprecated input that is no longer used.
|
|
151
144
|
"""
|
|
152
145
|
try:
|
|
153
146
|
# check the type of dictionary
|
|
@@ -161,7 +154,7 @@ class Room(_BaseWithShade):
|
|
|
161
154
|
faces.append(Face.from_dict(f_dict))
|
|
162
155
|
except Exception as e:
|
|
163
156
|
invalid_dict_error(f_dict, e)
|
|
164
|
-
room = cls(data['identifier'], faces, tolerance
|
|
157
|
+
room = cls(data['identifier'], faces, tolerance)
|
|
165
158
|
if 'display_name' in data and data['display_name'] is not None:
|
|
166
159
|
room.display_name = data['display_name']
|
|
167
160
|
if 'user_data' in data and data['user_data'] is not None:
|
|
@@ -1265,7 +1258,8 @@ class Room(_BaseWithShade):
|
|
|
1265
1258
|
suitable for objects in meters.
|
|
1266
1259
|
angle_tolerance: The max angle in degrees that the plane normals can
|
|
1267
1260
|
differ from one another in order for them to be considered
|
|
1268
|
-
coplanar.
|
|
1261
|
+
coplanar. This is used to reassign sub-faces to split room
|
|
1262
|
+
geometry. (Default: 1 degree).
|
|
1269
1263
|
|
|
1270
1264
|
Returns:
|
|
1271
1265
|
A list containing only the new Faces that were created as part of the
|
|
@@ -1329,7 +1323,7 @@ class Room(_BaseWithShade):
|
|
|
1329
1323
|
room_polyface = Polyface3D.from_faces(
|
|
1330
1324
|
tuple(face.geometry for face in all_faces), tolerance)
|
|
1331
1325
|
if not room_polyface.is_solid:
|
|
1332
|
-
room_polyface = room_polyface.merge_overlapping_edges(tolerance
|
|
1326
|
+
room_polyface = room_polyface.merge_overlapping_edges(tolerance)
|
|
1333
1327
|
# replace honeybee face geometry with versions that are facing outwards
|
|
1334
1328
|
if room_polyface.is_solid:
|
|
1335
1329
|
for i, correct_face3d in enumerate(room_polyface.faces):
|
|
@@ -1376,7 +1370,7 @@ class Room(_BaseWithShade):
|
|
|
1376
1370
|
return False
|
|
1377
1371
|
return True
|
|
1378
1372
|
|
|
1379
|
-
def check_solid(self, tolerance=0.01, angle_tolerance=
|
|
1373
|
+
def check_solid(self, tolerance=0.01, angle_tolerance=None, raise_exception=True,
|
|
1380
1374
|
detailed=False):
|
|
1381
1375
|
"""Check whether the Room is a closed solid to within the input tolerances.
|
|
1382
1376
|
|
|
@@ -1384,9 +1378,7 @@ class Room(_BaseWithShade):
|
|
|
1384
1378
|
tolerance: tolerance: The maximum difference between x, y, and z values
|
|
1385
1379
|
at which face vertices are considered equivalent. Default: 0.01,
|
|
1386
1380
|
suitable for objects in meters.
|
|
1387
|
-
angle_tolerance:
|
|
1388
|
-
allowed to differ from one another in order to consider them colinear.
|
|
1389
|
-
Default: 1 degree.
|
|
1381
|
+
angle_tolerance: Deprecated input that is no longer used.
|
|
1390
1382
|
raise_exception: Boolean to note whether a ValueError should be raised
|
|
1391
1383
|
if the room geometry does not form a closed solid.
|
|
1392
1384
|
detailed: Boolean for whether the returned object is a detailed list of
|
|
@@ -1401,13 +1393,12 @@ class Room(_BaseWithShade):
|
|
|
1401
1393
|
self._geometry = Polyface3D.from_faces(face_geometries, tolerance)
|
|
1402
1394
|
if self.geometry.is_solid:
|
|
1403
1395
|
return [] if detailed else ''
|
|
1404
|
-
|
|
1405
|
-
self._geometry = self.geometry.merge_overlapping_edges(tolerance, ang_tol)
|
|
1396
|
+
self._geometry = self.geometry.merge_overlapping_edges(tolerance)
|
|
1406
1397
|
if self.geometry.is_solid:
|
|
1407
1398
|
return [] if detailed else ''
|
|
1408
|
-
msg = 'Room "{}" is not closed to within {} tolerance
|
|
1409
|
-
'
|
|
1410
|
-
self.full_id, tolerance,
|
|
1399
|
+
msg = 'Room "{}" is not closed to within {} tolerance.' \
|
|
1400
|
+
'\n {} naked edges found\n {} non-manifold edges found'.format(
|
|
1401
|
+
self.full_id, tolerance,
|
|
1411
1402
|
len(self._geometry.naked_edges), len(self._geometry.non_manifold_edges))
|
|
1412
1403
|
full_msg = self._validation_message(
|
|
1413
1404
|
msg, raise_exception, detailed, '000106',
|
|
@@ -1786,7 +1777,7 @@ class Room(_BaseWithShade):
|
|
|
1786
1777
|
room_polyface = Polyface3D.from_faces(
|
|
1787
1778
|
tuple(face.geometry for face in all_faces), tolerance)
|
|
1788
1779
|
if not room_polyface.is_solid:
|
|
1789
|
-
room_polyface = room_polyface.merge_overlapping_edges(tolerance
|
|
1780
|
+
room_polyface = room_polyface.merge_overlapping_edges(tolerance)
|
|
1790
1781
|
# replace honeybee face geometry with versions that are facing outwards
|
|
1791
1782
|
if room_polyface.is_solid:
|
|
1792
1783
|
for i, correct_face3d in enumerate(room_polyface.faces):
|
|
@@ -1821,7 +1812,8 @@ class Room(_BaseWithShade):
|
|
|
1821
1812
|
suitable for objects in meters.
|
|
1822
1813
|
angle_tolerance: The max angle in degrees that the plane normals can
|
|
1823
1814
|
differ from one another in order for them to be considered
|
|
1824
|
-
coplanar.
|
|
1815
|
+
coplanar. This is used to reassign sub-faces after the room
|
|
1816
|
+
geometry is split. (Default: 1 degree).
|
|
1825
1817
|
|
|
1826
1818
|
Returns:
|
|
1827
1819
|
A list containing only the new Faces that were created as part of the
|
|
@@ -1900,7 +1892,7 @@ class Room(_BaseWithShade):
|
|
|
1900
1892
|
room_polyface = Polyface3D.from_faces(
|
|
1901
1893
|
tuple(face.geometry for face in all_faces), tolerance)
|
|
1902
1894
|
if not room_polyface.is_solid:
|
|
1903
|
-
room_polyface = room_polyface.merge_overlapping_edges(tolerance
|
|
1895
|
+
room_polyface = room_polyface.merge_overlapping_edges(tolerance)
|
|
1904
1896
|
# replace honeybee face geometry with versions that are facing outwards
|
|
1905
1897
|
if room_polyface.is_solid:
|
|
1906
1898
|
for i, correct_face3d in enumerate(room_polyface.faces):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: honeybee-core
|
|
3
|
-
Version: 1.61.
|
|
3
|
+
Version: 1.61.32
|
|
4
4
|
Summary: A library to create 3D building geometry for various types of environmental simulation.
|
|
5
5
|
Home-page: https://github.com/ladybug-tools/honeybee-core
|
|
6
6
|
Author: Ladybug Tools
|
|
@@ -14,8 +14,8 @@ Classifier: License :: OSI Approved :: GNU Affero General Public License v3
|
|
|
14
14
|
Classifier: Operating System :: OS Independent
|
|
15
15
|
Description-Content-Type: text/markdown
|
|
16
16
|
License-File: LICENSE
|
|
17
|
-
Requires-Dist: ladybug-core==0.44.
|
|
18
|
-
Requires-Dist: ladybug-geometry-polyskel==1.7.
|
|
17
|
+
Requires-Dist: ladybug-core==0.44.20
|
|
18
|
+
Requires-Dist: ladybug-geometry-polyskel==1.7.31
|
|
19
19
|
Requires-Dist: honeybee-schema==1.59.0; python_version >= "3.7"
|
|
20
20
|
|
|
21
21
|

|
|
@@ -16,10 +16,10 @@ honeybee/extensionutil.py,sha256=DDQYhM7tFD3avRSCOjwTzLqX9ldUxl5GzY79V3_sATE,964
|
|
|
16
16
|
honeybee/face.py,sha256=RTd5NGqV-RXHqLEpKpANXp9Wi2HcDRp2AtEbPy2pqmc,108049
|
|
17
17
|
honeybee/facetype.py,sha256=vCtWZKHp21RH-Yzs8zsHJHuFhJvczNh0yFl8wDe_RWY,4489
|
|
18
18
|
honeybee/logutil.py,sha256=2gn-6RcWqFLvwdFzBHPqUwFqTj_R3iwHKALrl-2eL7M,2564
|
|
19
|
-
honeybee/model.py,sha256=
|
|
19
|
+
honeybee/model.py,sha256=oGuhSSBimZ-MEJKyidh6_poi7twUgeEJKUzbr_j7qcQ,175868
|
|
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=5z6rSqsP231N3FYcRxSzntKfR8inEDIJJjJ-BaQcV3A,150943
|
|
23
23
|
honeybee/search.py,sha256=OiXibGGVb1ff4gTn_768i-sehB-zAYG12c0o3B0RjKE,4718
|
|
24
24
|
honeybee/shade.py,sha256=GSlceN2kpo8NOc_QkvvxEhKozRytOS8InZ1Ge0fPuko,19746
|
|
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.32.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
|
|
44
|
+
honeybee_core-1.61.32.dist-info/METADATA,sha256=e7FRoipS-OFp_ztDtU9j72So1mFM5JLwK64KeUczuIA,3317
|
|
45
|
+
honeybee_core-1.61.32.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
|
|
46
|
+
honeybee_core-1.61.32.dist-info/entry_points.txt,sha256=r3YqOm40goBroH3ccUhpwQjvTwu10JWLd0HIRHI1J8E,47
|
|
47
|
+
honeybee_core-1.61.32.dist-info/top_level.txt,sha256=8ve7puCRLUA9XDEGc1Mcs-UX9sFjpPV8MeTaIMwQ_Tg,9
|
|
48
|
+
honeybee_core-1.61.32.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|