honeybee-core 1.64.5__py3-none-any.whl → 1.64.7__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 CHANGED
@@ -16,6 +16,7 @@ except ImportError: # wea are in cPython
16
16
  from ladybug_geometry.geometry2d import Polygon2D
17
17
  from ladybug_geometry.geometry3d import Vector3D, Point3D, Plane, Face3D, \
18
18
  Mesh3D, Polyface3D
19
+ from ladybug_geometry.bounding import overlapping_bounding_boxes
19
20
  from ladybug_geometry.interop.stl import STL
20
21
 
21
22
  from ._base import _Base
@@ -1618,6 +1619,46 @@ class Model(_Base):
1618
1619
 
1619
1620
  return sub_face_frames, sub_face_mullions
1620
1621
 
1622
+ def rooms_relevant_to_edge(self, edge, mullion_thickness=None, tolerance=None):
1623
+ """Get a list of Rooms in the model that are relevant to a given edge.
1624
+
1625
+ This is useful for grouping instances of different edges obtained from
1626
+ the classified edge methods.
1627
+
1628
+ Args:
1629
+ edge: A ladybug-geometry LineSegment3D or Polyline3D for an edge to
1630
+ be evaluated against the Model rooms.
1631
+ mullion_thickness: The maximum difference that apertures can be from
1632
+ the input edge for it to be associated with a given model room.
1633
+ If None, the input edge will only be checked against the model's
1634
+ room Faces and not the Apertures or Doors.
1635
+ tolerance: The maximum difference between point values for them to be
1636
+ considered equivalent. If None, the Model's tolerance will be used.
1637
+
1638
+ Returns:
1639
+ A list of Honeybee Rooms in the model that are relevant to the input
1640
+ edge, either touching a room Face edge within the tolerance or
1641
+ touching an Aperture or Door edge within the mullion_thickness.
1642
+ """
1643
+ tol = tolerance if tolerance is not None else self.tolerance
1644
+ # loop through the rooms and evaluate the edge in terms of it
1645
+ rel_rooms = {}
1646
+ for room in self.rooms:
1647
+ if overlapping_bounding_boxes(room.geometry, edge, tol):
1648
+ for pt in room.geometry.vertices:
1649
+ if edge.distance_to_point(pt) < tol:
1650
+ rel_rooms[room.identifier] = room
1651
+ break
1652
+ else: # if a mullion thickness is specified
1653
+ if mullion_thickness is not None:
1654
+ for sf in room.sub_faces:
1655
+ if overlapping_bounding_boxes(sf.geometry, edge, tol):
1656
+ for sf_pt in sf.geometry.vertices:
1657
+ if edge.distance_to_point(sf_pt) < tol:
1658
+ rel_rooms[room.identifier] = room
1659
+ break
1660
+ return list(rel_rooms.values())
1661
+
1621
1662
  def add_prefix(self, prefix):
1622
1663
  """Change the identifier of this object and child objects by inserting a prefix.
1623
1664
 
honeybee/room.py CHANGED
@@ -65,6 +65,7 @@ class Room(_BaseWithShade):
65
65
  * floors
66
66
  * roof_ceilings
67
67
  * air_boundaries
68
+ * sub_faces
68
69
  * doors
69
70
  * apertures
70
71
  * exterior_apertures
@@ -367,6 +368,11 @@ class Room(_BaseWithShade):
367
368
  """Get a tuple of all of the AirBoundary Faces of the Room."""
368
369
  return tuple(face for face in self._faces if isinstance(face.type, AirBoundary))
369
370
 
371
+ @property
372
+ def sub_faces(self):
373
+ """Get a tuple of all Apertures and Doors of the Room."""
374
+ return self.apertures + self.doors
375
+
370
376
  @property
371
377
  def doors(self):
372
378
  """Get a tuple of all Doors of the Room."""
@@ -641,7 +647,7 @@ class Room(_BaseWithShade):
641
647
  underground, interior = [], []
642
648
 
643
649
  # get all of the edges in a way that colinear edges are broken down
644
- base_edges = list(self.geometry.internal_edges)
650
+ base_edges = list(self.geometry.edges)
645
651
  base_vertices = self.geometry.vertices
646
652
  edges = []
647
653
  for i, edge in enumerate(base_edges):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: honeybee-core
3
- Version: 1.64.5
3
+ Version: 1.64.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
@@ -18,8 +18,8 @@ Classifier: Programming Language :: Python :: Implementation :: IronPython
18
18
  Classifier: Operating System :: OS Independent
19
19
  Description-Content-Type: text/markdown
20
20
  License-File: LICENSE
21
- Requires-Dist: ladybug-core==0.44.27
22
- Requires-Dist: ladybug-geometry-polyskel==1.7.34
21
+ Requires-Dist: ladybug-core==0.44.28
22
+ Requires-Dist: ladybug-geometry-polyskel==1.7.35
23
23
  Requires-Dist: honeybee-schema==1.59.1; python_version >= "3.7"
24
24
  Dynamic: author
25
25
  Dynamic: author-email
@@ -16,10 +16,10 @@ honeybee/extensionutil.py,sha256=DDQYhM7tFD3avRSCOjwTzLqX9ldUxl5GzY79V3_sATE,964
16
16
  honeybee/face.py,sha256=BOL2tlFLErxY27euixVWFzL1z-xtABtzvMmLIpzMqcE,111961
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=PayrO3hEEQfYDlsbqsnD14oGSYjY0GlL45G2aGTOLw0,202484
19
+ honeybee/model.py,sha256=Y-uLvOebXXfGc2QrswKyShcVtvGe7tvUDCk9rPdzEGk,204717
20
20
  honeybee/orientation.py,sha256=GogGblASW9OU-fobfDaQ7w5yRbEAFdJJuHwg2fadhKI,5046
21
21
  honeybee/properties.py,sha256=ok976fbUdXzLDR2XiPNf8Q5ejfOM-PArqm5CVUbFiCc,34316
22
- honeybee/room.py,sha256=aYazfgBpD_Dd8Ntzz9gZEXWBqGT8wQiYeYpG0q0DuKI,169055
22
+ honeybee/room.py,sha256=ptwpQPx6FpWgu7A0XhM2rekZY6dXMZCC62kwpn00JAY,169215
23
23
  honeybee/search.py,sha256=KOIeQjYdj0yhRWPmF5kiFiH8Ei0WbzuiU-capnwYVeM,5060
24
24
  honeybee/shade.py,sha256=2zuW1lR5wfe-UyAosuCX-3tII6CKONq7wt8Ac_jXU6c,20698
25
25
  honeybee/shademesh.py,sha256=WnpYkt04zuB8w-6OETNP7ZfzJarykEkQig6YdNkuVOw,14069
@@ -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.64.5.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
44
- honeybee_core-1.64.5.dist-info/METADATA,sha256=EQK3SpOa7CKu1-kV6pwpNGyatktZ4_qbyqUKKvoZBYA,3729
45
- honeybee_core-1.64.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
46
- honeybee_core-1.64.5.dist-info/entry_points.txt,sha256=r3YqOm40goBroH3ccUhpwQjvTwu10JWLd0HIRHI1J8E,47
47
- honeybee_core-1.64.5.dist-info/top_level.txt,sha256=8ve7puCRLUA9XDEGc1Mcs-UX9sFjpPV8MeTaIMwQ_Tg,9
48
- honeybee_core-1.64.5.dist-info/RECORD,,
43
+ honeybee_core-1.64.7.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
44
+ honeybee_core-1.64.7.dist-info/METADATA,sha256=ZfDHj-nJOexgS06Fg5_adpQXl_aws4kg9Ozgq-0lV14,3729
45
+ honeybee_core-1.64.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
46
+ honeybee_core-1.64.7.dist-info/entry_points.txt,sha256=r3YqOm40goBroH3ccUhpwQjvTwu10JWLd0HIRHI1J8E,47
47
+ honeybee_core-1.64.7.dist-info/top_level.txt,sha256=8ve7puCRLUA9XDEGc1Mcs-UX9sFjpPV8MeTaIMwQ_Tg,9
48
+ honeybee_core-1.64.7.dist-info/RECORD,,