honeybee-core 1.62.5__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.
Files changed (111) hide show
  1. {honeybee_core-1.62.5/honeybee_core.egg-info → honeybee_core-1.62.7}/PKG-INFO +1 -1
  2. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/room.py +53 -2
  3. {honeybee_core-1.62.5 → honeybee_core-1.62.7/honeybee_core.egg-info}/PKG-INFO +1 -1
  4. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/room_test.py +35 -0
  5. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/.github/workflows/ci.yaml +0 -0
  6. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/.github/workflows/dependency-release.yaml +0 -0
  7. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/.gitignore +0 -0
  8. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/.releaserc.json +0 -0
  9. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/CODE_OF_CONDUCT.md +0 -0
  10. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/CONTRIBUTING.md +0 -0
  11. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/LICENSE +0 -0
  12. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/MANIFEST.in +0 -0
  13. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/README.md +0 -0
  14. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/deploy.sh +0 -0
  15. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/dev-requirements.txt +0 -0
  16. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/docs/_build/.nojekyll +0 -0
  17. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/docs/_build/README.md +0 -0
  18. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/docs/_build/docs/README.md +0 -0
  19. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/docs/_static/custom.css +0 -0
  20. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/docs/_templates/layout.html +0 -0
  21. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/docs/cli/index.rst +0 -0
  22. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/docs/conf.py +0 -0
  23. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/docs/index.rst +0 -0
  24. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/__init__.py +0 -0
  25. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/__main__.py +0 -0
  26. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/_base.py +0 -0
  27. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/_basewithshade.py +0 -0
  28. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/_lockable.py +0 -0
  29. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/altnumber.py +0 -0
  30. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/aperture.py +0 -0
  31. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/boundarycondition.py +0 -0
  32. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/checkdup.py +0 -0
  33. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/cli/__init__.py +0 -0
  34. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/cli/compare.py +0 -0
  35. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/cli/create.py +0 -0
  36. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/cli/edit.py +0 -0
  37. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/cli/lib.py +0 -0
  38. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/cli/setconfig.py +0 -0
  39. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/cli/validate.py +0 -0
  40. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/colorobj.py +0 -0
  41. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/config.json +0 -0
  42. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/config.py +0 -0
  43. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/dictutil.py +0 -0
  44. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/door.py +0 -0
  45. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/extensionutil.py +0 -0
  46. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/face.py +0 -0
  47. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/facetype.py +0 -0
  48. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/logutil.py +0 -0
  49. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/model.py +0 -0
  50. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/orientation.py +0 -0
  51. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/properties.py +0 -0
  52. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/search.py +0 -0
  53. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/shade.py +0 -0
  54. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/shademesh.py +0 -0
  55. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/typing.py +0 -0
  56. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/units.py +0 -0
  57. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/writer/__init__.py +0 -0
  58. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/writer/aperture.py +0 -0
  59. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/writer/door.py +0 -0
  60. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/writer/face.py +0 -0
  61. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/writer/model.py +0 -0
  62. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/writer/room.py +0 -0
  63. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/writer/shade.py +0 -0
  64. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee/writer/shademesh.py +0 -0
  65. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee_core.egg-info/SOURCES.txt +0 -0
  66. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee_core.egg-info/dependency_links.txt +0 -0
  67. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee_core.egg-info/entry_points.txt +0 -0
  68. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee_core.egg-info/requires.txt +0 -0
  69. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/honeybee_core.egg-info/top_level.txt +0 -0
  70. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/requirements.txt +0 -0
  71. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/setup.cfg +0 -0
  72. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/setup.py +0 -0
  73. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/__init__.py +0 -0
  74. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/aperture_test.py +0 -0
  75. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/boundary_condition_test.py +0 -0
  76. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/cli_compare_test.py +0 -0
  77. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/cli_create_test.py +0 -0
  78. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/cli_edit_test.py +0 -0
  79. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/cli_validate_test.py +0 -0
  80. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/colorobj_test.py +0 -0
  81. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/config_test.py +0 -0
  82. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/dictutil_test.py +0 -0
  83. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/door_test.py +0 -0
  84. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/face_test.py +0 -0
  85. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/facetype_test.py +0 -0
  86. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/json/ShoeBox.json +0 -0
  87. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/json/bad_geometry_model.hbjson +0 -0
  88. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/json/colliding_room_volumes.hbjson +0 -0
  89. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/json/compare_model_1.hbjson +0 -0
  90. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/json/compare_model_2.hbjson +0 -0
  91. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/json/complex_polyfaces.json +0 -0
  92. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/json/minor_geometry/existing_model.hbjson +0 -0
  93. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/json/minor_geometry/updated_model.hbjson +0 -0
  94. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/json/mismatched_area_adj.hbjson +0 -0
  95. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/json/model_with_adiabatic.hbjson +0 -0
  96. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/json/model_with_holes.hbjson +0 -0
  97. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/json/model_without_adjacency.hbjson +0 -0
  98. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/json/nonascii_face.json +0 -0
  99. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/json/polygons_for_gap_boundary.json +0 -0
  100. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/json/room_for_window_offset.hbjson +0 -0
  101. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/json/single_family_home.hbjson +0 -0
  102. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/lockable_test.py +0 -0
  103. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/model_test.py +0 -0
  104. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/orientation_test.py +0 -0
  105. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/search_test.py +0 -0
  106. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/shade_test.py +0 -0
  107. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/shademesh_test.py +0 -0
  108. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/stl/cube_ascii.stl +0 -0
  109. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/stl/cube_binary.stl +0 -0
  110. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/typing_test.py +0 -0
  111. {honeybee_core-1.62.5 → honeybee_core-1.62.7}/tests/units_test.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: honeybee-core
3
- Version: 1.62.5
3
+ Version: 1.62.7
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
@@ -1866,14 +1866,22 @@ class Room(_BaseWithShade):
1866
1866
  try:
1867
1867
  nf.add_aperture(ap)
1868
1868
  except AssertionError: # probably adiabatic
1869
- nf.boundary_condition = boundary_conditions.outdoors
1869
+ if not isinstance(nf.boundary_condition, Outdoors):
1870
+ nf.boundary_condition = \
1871
+ boundary_conditions.outdoors
1872
+ if isinstance(nf.type, AirBoundary):
1873
+ nf.type = get_type_from_normal(nf.normal)
1870
1874
  nf.add_aperture(ap)
1871
1875
  for dr in doors:
1872
1876
  if nf.geometry.is_sub_face(dr.geometry, tol, a_tol):
1873
1877
  try:
1874
1878
  nf.add_door(dr)
1875
1879
  except AssertionError: # probably adiabatic
1876
- nf.boundary_condition = boundary_conditions.outdoors
1880
+ if not isinstance(nf.boundary_condition, Outdoors):
1881
+ nf.boundary_condition = \
1882
+ boundary_conditions.outdoors
1883
+ if isinstance(nf.type, AirBoundary):
1884
+ nf.type = get_type_from_normal(nf.normal)
1877
1885
  nf.add_door(dr)
1878
1886
  if i == 0: # add all assigned shades to this face
1879
1887
  nf.add_indoor_shades(in_shades)
@@ -2331,6 +2339,49 @@ class Room(_BaseWithShade):
2331
2339
  floor_heights.append(flrh)
2332
2340
  return grouped_rooms, floor_heights
2333
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
+
2334
2385
  @staticmethod
2335
2386
  def stories_by_floor_height(rooms, min_difference=2.0):
2336
2387
  """Assign story properties to a set of Rooms using their floor heights.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: honeybee-core
3
- Version: 1.62.5
3
+ Version: 1.62.7
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
@@ -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