honeybee-core 1.62.7__tar.gz → 1.62.8__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.7/honeybee_core.egg-info → honeybee_core-1.62.8}/PKG-INFO +1 -1
  2. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/room.py +75 -1
  3. {honeybee_core-1.62.7 → honeybee_core-1.62.8/honeybee_core.egg-info}/PKG-INFO +1 -1
  4. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/room_test.py +41 -0
  5. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/.github/workflows/ci.yaml +0 -0
  6. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/.github/workflows/dependency-release.yaml +0 -0
  7. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/.gitignore +0 -0
  8. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/.releaserc.json +0 -0
  9. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/CODE_OF_CONDUCT.md +0 -0
  10. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/CONTRIBUTING.md +0 -0
  11. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/LICENSE +0 -0
  12. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/MANIFEST.in +0 -0
  13. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/README.md +0 -0
  14. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/deploy.sh +0 -0
  15. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/dev-requirements.txt +0 -0
  16. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/docs/_build/.nojekyll +0 -0
  17. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/docs/_build/README.md +0 -0
  18. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/docs/_build/docs/README.md +0 -0
  19. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/docs/_static/custom.css +0 -0
  20. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/docs/_templates/layout.html +0 -0
  21. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/docs/cli/index.rst +0 -0
  22. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/docs/conf.py +0 -0
  23. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/docs/index.rst +0 -0
  24. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/__init__.py +0 -0
  25. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/__main__.py +0 -0
  26. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/_base.py +0 -0
  27. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/_basewithshade.py +0 -0
  28. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/_lockable.py +0 -0
  29. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/altnumber.py +0 -0
  30. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/aperture.py +0 -0
  31. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/boundarycondition.py +0 -0
  32. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/checkdup.py +0 -0
  33. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/cli/__init__.py +0 -0
  34. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/cli/compare.py +0 -0
  35. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/cli/create.py +0 -0
  36. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/cli/edit.py +0 -0
  37. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/cli/lib.py +0 -0
  38. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/cli/setconfig.py +0 -0
  39. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/cli/validate.py +0 -0
  40. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/colorobj.py +0 -0
  41. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/config.json +0 -0
  42. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/config.py +0 -0
  43. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/dictutil.py +0 -0
  44. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/door.py +0 -0
  45. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/extensionutil.py +0 -0
  46. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/face.py +0 -0
  47. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/facetype.py +0 -0
  48. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/logutil.py +0 -0
  49. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/model.py +0 -0
  50. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/orientation.py +0 -0
  51. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/properties.py +0 -0
  52. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/search.py +0 -0
  53. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/shade.py +0 -0
  54. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/shademesh.py +0 -0
  55. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/typing.py +0 -0
  56. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/units.py +0 -0
  57. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/writer/__init__.py +0 -0
  58. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/writer/aperture.py +0 -0
  59. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/writer/door.py +0 -0
  60. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/writer/face.py +0 -0
  61. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/writer/model.py +0 -0
  62. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/writer/room.py +0 -0
  63. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/writer/shade.py +0 -0
  64. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee/writer/shademesh.py +0 -0
  65. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee_core.egg-info/SOURCES.txt +0 -0
  66. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee_core.egg-info/dependency_links.txt +0 -0
  67. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee_core.egg-info/entry_points.txt +0 -0
  68. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee_core.egg-info/requires.txt +0 -0
  69. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/honeybee_core.egg-info/top_level.txt +0 -0
  70. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/requirements.txt +0 -0
  71. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/setup.cfg +0 -0
  72. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/setup.py +0 -0
  73. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/__init__.py +0 -0
  74. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/aperture_test.py +0 -0
  75. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/boundary_condition_test.py +0 -0
  76. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/cli_compare_test.py +0 -0
  77. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/cli_create_test.py +0 -0
  78. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/cli_edit_test.py +0 -0
  79. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/cli_validate_test.py +0 -0
  80. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/colorobj_test.py +0 -0
  81. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/config_test.py +0 -0
  82. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/dictutil_test.py +0 -0
  83. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/door_test.py +0 -0
  84. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/face_test.py +0 -0
  85. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/facetype_test.py +0 -0
  86. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/json/ShoeBox.json +0 -0
  87. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/json/bad_geometry_model.hbjson +0 -0
  88. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/json/colliding_room_volumes.hbjson +0 -0
  89. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/json/compare_model_1.hbjson +0 -0
  90. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/json/compare_model_2.hbjson +0 -0
  91. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/json/complex_polyfaces.json +0 -0
  92. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/json/minor_geometry/existing_model.hbjson +0 -0
  93. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/json/minor_geometry/updated_model.hbjson +0 -0
  94. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/json/mismatched_area_adj.hbjson +0 -0
  95. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/json/model_with_adiabatic.hbjson +0 -0
  96. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/json/model_with_holes.hbjson +0 -0
  97. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/json/model_without_adjacency.hbjson +0 -0
  98. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/json/nonascii_face.json +0 -0
  99. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/json/polygons_for_gap_boundary.json +0 -0
  100. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/json/room_for_window_offset.hbjson +0 -0
  101. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/json/single_family_home.hbjson +0 -0
  102. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/lockable_test.py +0 -0
  103. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/model_test.py +0 -0
  104. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/orientation_test.py +0 -0
  105. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/search_test.py +0 -0
  106. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/shade_test.py +0 -0
  107. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/shademesh_test.py +0 -0
  108. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/stl/cube_ascii.stl +0 -0
  109. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/stl/cube_binary.stl +0 -0
  110. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/tests/typing_test.py +0 -0
  111. {honeybee_core-1.62.7 → honeybee_core-1.62.8}/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.7
3
+ Version: 1.62.8
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
@@ -2031,6 +2031,80 @@ class Room(_BaseWithShade):
2031
2031
  self._geometry = room_polyface
2032
2032
  return new_faces
2033
2033
 
2034
+ @staticmethod
2035
+ def join_adjacent_rooms(rooms, tolerance=0.01):
2036
+ """Get Rooms merged across their adjacent Surface boundary conditions.
2037
+
2038
+ When the input rooms form a continuous volume across their adjacencies,
2039
+ a list with only a single joined Room will be returned. Otherwise, there
2040
+ will be more than one Room in the result for each contiguous volume
2041
+ across the adjacencies.
2042
+
2043
+ In all cases, the Room with the highest volume in the contiguous group
2044
+ will set the properties of the joined Room, including multiplier, zone,
2045
+ story, exclude_floor_area, and all extension attributes
2046
+
2047
+ Args:
2048
+ rooms: A list of Rooms which will be merged into one (or more) Rooms
2049
+ across their adjacent Faces.
2050
+ tolerance: The minimum difference between the coordinate values of two
2051
+ faces at which they can be considered adjacent. (Default: 0.01,
2052
+ suitable for objects in meters).
2053
+ """
2054
+ # group the rooms according to their adjacency
2055
+ adj_groups = Room.group_by_adjacency(rooms)
2056
+ joined_rooms = []
2057
+
2058
+ # create the joined Rooms from each group
2059
+ for adj_group in adj_groups:
2060
+ # first check to see if the group has any adjacencies at all
2061
+ if len(adj_group) == 1:
2062
+ joined_rooms.append(adj_group[0])
2063
+ continue
2064
+ # determine the primary room that will set the properties of the new Room
2065
+ volumes = [r.volume for r in adj_group]
2066
+ sort_inds = [i for _, i in sorted(zip(volumes, range(len(volumes))))]
2067
+ primary_room = adj_group[sort_inds[-1]]
2068
+ # gather all of the adjacent faces to be eliminated in the new Room
2069
+ all_adjacencies, remove_faces = {}, set()
2070
+ for room in adj_group:
2071
+ for face in room.faces:
2072
+ if isinstance(face.boundary_condition, Surface):
2073
+ bc_obj = face.boundary_condition.boundary_condition_object
2074
+ all_adjacencies[bc_obj] = face.identifier
2075
+ if face.identifier in all_adjacencies:
2076
+ remove_faces.add(face.identifier)
2077
+ remove_faces.add(all_adjacencies[face.identifier])
2078
+ # gather the faces forming a contiguous volume and make the new room
2079
+ new_faces, new_indoor_shades, new_outdoor_shades = [], [], []
2080
+ for room in adj_group:
2081
+ new_indoor_shades.extend((s.duplicate() for s in room.indoor_shades))
2082
+ new_outdoor_shades.extend((s.duplicate() for s in room.outdoor_shades))
2083
+ for face in room.faces:
2084
+ if face.identifier not in remove_faces:
2085
+ new_faces.append(face.duplicate())
2086
+ # create the new room and assign any shades
2087
+ new_r = Room(primary_room.identifier, new_faces, tolerance)
2088
+ new_r._outdoor_shades = new_outdoor_shades
2089
+ new_r._indoor_shades = new_indoor_shades
2090
+ for oshd in new_outdoor_shades:
2091
+ oshd._parent = new_r
2092
+ for ishd in new_indoor_shades:
2093
+ ishd._parent = new_r
2094
+ ishd._is_indoor = True
2095
+ # transfer the primary room properties to the new room
2096
+ new_r._display_name = primary_room._display_name
2097
+ new_r._user_data = None if primary_room.user_data is None \
2098
+ else primary_room.user_data.copy()
2099
+ new_r._multiplier = primary_room.multiplier
2100
+ new_r._zone = primary_room._zone
2101
+ new_r._story = primary_room._story
2102
+ new_r._exclude_floor_area = primary_room.exclude_floor_area
2103
+ new_r._properties._duplicate_extension_attr(primary_room._properties)
2104
+ joined_rooms.append(new_r)
2105
+
2106
+ return joined_rooms
2107
+
2034
2108
  @staticmethod
2035
2109
  def intersect_adjacency(rooms, tolerance=0.01, angle_tolerance=1):
2036
2110
  """Intersect the Faces of an array of Rooms to ensure matching adjacencies.
@@ -3201,7 +3275,7 @@ class Room(_BaseWithShade):
3201
3275
  # loop through the rooms and find air boundary adjacencies
3202
3276
  for room in all_rooms:
3203
3277
  adj_ids = adj_finding_function(room)
3204
- if len(adj_ids) == 0: # a room that is its own solar enclosure
3278
+ if len(adj_ids) == 0: # a room with no adjacencies
3205
3279
  adj_network.append([room])
3206
3280
  else: # there are other adjacent rooms to find
3207
3281
  local_network = [room]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: honeybee-core
3
- Version: 1.62.7
3
+ Version: 1.62.8
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
@@ -605,6 +605,47 @@ def test_find_adjacency():
605
605
  assert len(adj_faces[0]) == 2
606
606
 
607
607
 
608
+ def test_join_adjacent_rooms():
609
+ """Test the join_adjacent_rooms method."""
610
+ pts_1 = (Point3D(0, 0), Point3D(15, 0), Point3D(10, 5), Point3D(5, 5))
611
+ pts_2 = (Point3D(15, 0), Point3D(15, 15), Point3D(10, 10), Point3D(10, 5))
612
+ pts_3 = (Point3D(0, 15), Point3D(5, 10), Point3D(10, 10), Point3D(15, 15))
613
+ pts_4 = (Point3D(0, 0), Point3D(5, 5), Point3D(5, 10), Point3D(0, 15))
614
+ pts_5 = (Point3D(5, 5), Point3D(10, 5), Point3D(10, 10), Point3D(5, 10))
615
+ pf_1 = Polyface3D.from_offset_face(Face3D(pts_1), 3)
616
+ pf_2 = Polyface3D.from_offset_face(Face3D(pts_2), 3)
617
+ pf_3 = Polyface3D.from_offset_face(Face3D(pts_3), 3)
618
+ pf_4 = Polyface3D.from_offset_face(Face3D(pts_4), 3)
619
+ pf_5 = Polyface3D.from_offset_face(Face3D(pts_5), 3)
620
+ room_1 = Room.from_polyface3d('Zone1', pf_1)
621
+ room_2 = Room.from_polyface3d('Zone2', pf_2)
622
+ room_3 = Room.from_polyface3d('Zone3', pf_3)
623
+ room_4 = Room.from_polyface3d('Zone4', pf_4)
624
+ room_5 = Room.from_polyface3d('Zone5', pf_5)
625
+
626
+ rooms = [room_1, room_2, room_3, room_4, room_5]
627
+ rooms_basement = [rm.duplicate() for rm in rooms]
628
+ for rm in rooms_basement:
629
+ rm.move(Vector3D(0, 0, -3))
630
+ rm.add_prefix('Basement')
631
+ Room.solve_adjacency(rooms, 0.01)
632
+ rooms_flr_2 = [rm.duplicate() for rm in rooms]
633
+ for rm in rooms_flr_2:
634
+ rm.move(Vector3D(0, 0, 3))
635
+ rm.add_prefix('Floor2')
636
+ all_rooms = rooms + rooms_flr_2 + rooms_basement
637
+
638
+ joined_rooms = Room.join_adjacent_rooms(all_rooms)
639
+
640
+ assert len(joined_rooms) == 7
641
+ for r in joined_rooms:
642
+ assert isinstance(r, Room)
643
+ assert sum(r.volume for r in joined_rooms) == \
644
+ pytest.approx(sum(r.volume for r in all_rooms), rel=1e-3)
645
+ assert sum(r.floor_area for r in joined_rooms) == \
646
+ pytest.approx(sum(r.floor_area for r in all_rooms), rel=1e-3)
647
+
648
+
608
649
  def test_group_by_adjacency():
609
650
  """Test the group_by_adjacency method."""
610
651
  pts_1 = (Point3D(0, 0), Point3D(15, 0), Point3D(10, 5), Point3D(5, 5))
File without changes
File without changes
File without changes
File without changes
File without changes