honeybee-core 1.62.6__tar.gz → 1.62.7__tar.gz
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_core-1.62.6/honeybee_core.egg-info → honeybee_core-1.62.7}/PKG-INFO +1 -1
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/room.py +43 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7/honeybee_core.egg-info}/PKG-INFO +1 -1
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/room_test.py +35 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/.github/workflows/ci.yaml +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/.github/workflows/dependency-release.yaml +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/.gitignore +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/.releaserc.json +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/CODE_OF_CONDUCT.md +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/CONTRIBUTING.md +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/LICENSE +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/MANIFEST.in +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/README.md +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/deploy.sh +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/dev-requirements.txt +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/docs/_build/.nojekyll +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/docs/_build/README.md +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/docs/_build/docs/README.md +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/docs/_static/custom.css +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/docs/_templates/layout.html +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/docs/cli/index.rst +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/docs/conf.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/docs/index.rst +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/__init__.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/__main__.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/_base.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/_basewithshade.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/_lockable.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/altnumber.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/aperture.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/boundarycondition.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/checkdup.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/cli/__init__.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/cli/compare.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/cli/create.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/cli/edit.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/cli/lib.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/cli/setconfig.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/cli/validate.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/colorobj.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/config.json +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/config.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/dictutil.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/door.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/extensionutil.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/face.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/facetype.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/logutil.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/model.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/orientation.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/properties.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/search.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/shade.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/shademesh.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/typing.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/units.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/writer/__init__.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/writer/aperture.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/writer/door.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/writer/face.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/writer/model.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/writer/room.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/writer/shade.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee/writer/shademesh.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee_core.egg-info/SOURCES.txt +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee_core.egg-info/dependency_links.txt +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee_core.egg-info/entry_points.txt +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee_core.egg-info/requires.txt +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/honeybee_core.egg-info/top_level.txt +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/requirements.txt +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/setup.cfg +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/setup.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/__init__.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/aperture_test.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/boundary_condition_test.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/cli_compare_test.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/cli_create_test.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/cli_edit_test.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/cli_validate_test.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/colorobj_test.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/config_test.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/dictutil_test.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/door_test.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/face_test.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/facetype_test.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/json/ShoeBox.json +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/json/bad_geometry_model.hbjson +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/json/colliding_room_volumes.hbjson +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/json/compare_model_1.hbjson +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/json/compare_model_2.hbjson +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/json/complex_polyfaces.json +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/json/minor_geometry/existing_model.hbjson +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/json/minor_geometry/updated_model.hbjson +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/json/mismatched_area_adj.hbjson +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/json/model_with_adiabatic.hbjson +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/json/model_with_holes.hbjson +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/json/model_without_adjacency.hbjson +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/json/nonascii_face.json +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/json/polygons_for_gap_boundary.json +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/json/room_for_window_offset.hbjson +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/json/single_family_home.hbjson +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/lockable_test.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/model_test.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/orientation_test.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/search_test.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/shade_test.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/shademesh_test.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/stl/cube_ascii.stl +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/stl/cube_binary.stl +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/typing_test.py +0 -0
- {honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/units_test.py +0 -0
|
@@ -2339,6 +2339,49 @@ class Room(_BaseWithShade):
|
|
|
2339
2339
|
floor_heights.append(flrh)
|
|
2340
2340
|
return grouped_rooms, floor_heights
|
|
2341
2341
|
|
|
2342
|
+
@staticmethod
|
|
2343
|
+
def group_by_story(rooms):
|
|
2344
|
+
"""Group Rooms according to their story property.
|
|
2345
|
+
|
|
2346
|
+
The returned room groups will be sorted from the lowest average floor
|
|
2347
|
+
to the highest average floor height.
|
|
2348
|
+
|
|
2349
|
+
Args:
|
|
2350
|
+
rooms: A list of honeybee rooms to be grouped by story.
|
|
2351
|
+
|
|
2352
|
+
Returns:
|
|
2353
|
+
A tuple with three items.
|
|
2354
|
+
|
|
2355
|
+
- grouped_rooms - A list of lists of honeybee rooms with each sub-list
|
|
2356
|
+
representing a different story.
|
|
2357
|
+
|
|
2358
|
+
- story_names - A list of story names with one value for each
|
|
2359
|
+
sub-list of the output grouped_rooms.
|
|
2360
|
+
|
|
2361
|
+
- floor_heights - A list of floor heights with one floor height
|
|
2362
|
+
for each sub-list of the output grouped_rooms.
|
|
2363
|
+
"""
|
|
2364
|
+
# group the rooms by story
|
|
2365
|
+
story_dict = {}
|
|
2366
|
+
for room in rooms:
|
|
2367
|
+
try:
|
|
2368
|
+
story_dict[room.story].append(room)
|
|
2369
|
+
except KeyError:
|
|
2370
|
+
story_dict[room.story] = [room]
|
|
2371
|
+
# sort the stories by average floor height
|
|
2372
|
+
grouped_rooms, story_names, floor_heights = [], [], []
|
|
2373
|
+
for s_name, g_rooms in story_dict.items():
|
|
2374
|
+
grouped_rooms.append(g_rooms)
|
|
2375
|
+
story_names.append(s_name)
|
|
2376
|
+
weighted_sum = sum(r.average_floor_height * r.floor_area for r in g_rooms)
|
|
2377
|
+
total_area = sum(r.floor_area for r in g_rooms)
|
|
2378
|
+
avg_flr = weighted_sum / total_area
|
|
2379
|
+
floor_heights.append(avg_flr)
|
|
2380
|
+
zip_obj = zip(floor_heights, grouped_rooms, story_names)
|
|
2381
|
+
floor_heights, grouped_rooms, story_names = \
|
|
2382
|
+
(list(t) for t in zip(*sorted(zip_obj, key=lambda x: x[0])))
|
|
2383
|
+
return grouped_rooms, story_names, floor_heights
|
|
2384
|
+
|
|
2342
2385
|
@staticmethod
|
|
2343
2386
|
def stories_by_floor_height(rooms, min_difference=2.0):
|
|
2344
2387
|
"""Assign story properties to a set of Rooms using their floor heights.
|
|
@@ -714,6 +714,41 @@ def test_group_by_orientation():
|
|
|
714
714
|
assert orientations == [0.0, 90.0, 180.0, 270.0]
|
|
715
715
|
|
|
716
716
|
|
|
717
|
+
def test_group_by_story():
|
|
718
|
+
"""Test the group_by_story method."""
|
|
719
|
+
pts_1 = (Point3D(0, 0), Point3D(15, 0), Point3D(10, 5), Point3D(5, 5))
|
|
720
|
+
pts_2 = (Point3D(15, 0), Point3D(15, 15), Point3D(10, 10), Point3D(10, 5))
|
|
721
|
+
pts_3 = (Point3D(0, 15), Point3D(5, 10), Point3D(10, 10), Point3D(15, 15))
|
|
722
|
+
pts_4 = (Point3D(0, 0), Point3D(5, 5), Point3D(5, 10), Point3D(0, 15))
|
|
723
|
+
pts_5 = (Point3D(5, 5), Point3D(10, 5), Point3D(10, 10), Point3D(5, 10))
|
|
724
|
+
pf_1 = Polyface3D.from_offset_face(Face3D(pts_1), 3)
|
|
725
|
+
pf_2 = Polyface3D.from_offset_face(Face3D(pts_2), 3)
|
|
726
|
+
pf_3 = Polyface3D.from_offset_face(Face3D(pts_3), 3)
|
|
727
|
+
pf_4 = Polyface3D.from_offset_face(Face3D(pts_4), 3)
|
|
728
|
+
pf_5 = Polyface3D.from_offset_face(Face3D(pts_5), 3)
|
|
729
|
+
room_1 = Room.from_polyface3d('Zone1', pf_1)
|
|
730
|
+
room_2 = Room.from_polyface3d('Zone2', pf_2)
|
|
731
|
+
room_3 = Room.from_polyface3d('Zone3', pf_3)
|
|
732
|
+
room_4 = Room.from_polyface3d('Zone4', pf_4)
|
|
733
|
+
room_5 = Room.from_polyface3d('Zone5', pf_5)
|
|
734
|
+
rooms = [room_1, room_2, room_3, room_4, room_5]
|
|
735
|
+
for rm in rooms:
|
|
736
|
+
rm.story = 'Ground Floor'
|
|
737
|
+
|
|
738
|
+
rooms_basement = [rm.duplicate() for rm in rooms]
|
|
739
|
+
for rm in rooms_basement:
|
|
740
|
+
rm.move(Vector3D(0, 0, -3))
|
|
741
|
+
rm.add_prefix('Basement')
|
|
742
|
+
rm.story = 'Basement'
|
|
743
|
+
Room.solve_adjacency(rooms, 0.01)
|
|
744
|
+
all_rooms = rooms + rooms_basement
|
|
745
|
+
|
|
746
|
+
grouped_rooms, story_names, floor_heights = Room.group_by_story(all_rooms)
|
|
747
|
+
assert floor_heights == [-3.0, 0.0]
|
|
748
|
+
assert story_names == ['Basement', 'Ground Floor']
|
|
749
|
+
assert len(grouped_rooms[0]) == 5
|
|
750
|
+
|
|
751
|
+
|
|
717
752
|
def test_horizontal_boundary():
|
|
718
753
|
"""Test the horizontal_boundary method for a variety of shapes."""
|
|
719
754
|
geo_file = './tests/json/complex_polyfaces.json'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/json/minor_geometry/existing_model.hbjson
RENAMED
|
File without changes
|
{honeybee_core-1.62.6 → honeybee_core-1.62.7}/tests/json/minor_geometry/updated_model.hbjson
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|