honeybee-core 1.64.1__py3-none-any.whl → 1.64.2__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
@@ -13,7 +13,9 @@ try: # check if we are in IronPython
13
13
  except ImportError: # wea are in cPython
14
14
  import pickle
15
15
 
16
- from ladybug_geometry.geometry3d import Vector3D, Point3D, Plane, Face3D, Mesh3D
16
+ from ladybug_geometry.geometry2d import Polygon2D
17
+ from ladybug_geometry.geometry3d import Vector3D, Point3D, Plane, Face3D, \
18
+ Mesh3D, Polyface3D
17
19
  from ladybug_geometry.interop.stl import STL
18
20
 
19
21
  from ._base import _Base
@@ -1533,6 +1535,71 @@ class Model(_Base):
1533
1535
  return roof_to_exterior, slab_to_exterior, exposed_floor_to_exterior_wall, \
1534
1536
  exterior_wall_to_wall, roof_ridge, exposed_floor_to_floor, underground
1535
1537
 
1538
+ def classified_sub_face_edges(
1539
+ self, mullion_thickness=None, tolerance=None, angle_tolerance=None
1540
+ ):
1541
+ """Get classified edges around this Model's Apertures and Doors.
1542
+
1543
+ The edges returned by this method will only exist along the exterior
1544
+ sub-faces.
1545
+
1546
+ Args:
1547
+ mullion_thickness: The maximum difference that apertures can be from
1548
+ one another for the edges to be considered a mullion rather than
1549
+ a frame. If None, the Model's tolerance will be used.
1550
+ tolerance: The maximum difference between point values for them to be
1551
+ considered equivalent. If None, the Model's tolerance will be used.
1552
+ angle_tolerance: The max angle difference in degrees where sub-face
1553
+ normals are no longer considered coplanar. If None, the Model
1554
+ angle_tolerance will be used. (Default: None).
1555
+
1556
+ Returns:
1557
+ A tuple with three items where each item is a list containing
1558
+ LineSegment3D surrounding different sub-face conditions.
1559
+
1560
+ - window_frames - Apertures meet their parent exterior wall or roof.
1561
+
1562
+ - window_mullions - Apertures meet one another.
1563
+
1564
+ - door_frames - Doors meet their parent exterior wall or roof.
1565
+ """
1566
+ # set up lists to be populated
1567
+ window_frames, window_mullions = [], []
1568
+ tol = tolerance if tolerance is not None else self.tolerance
1569
+ a_tol = math.radians(angle_tolerance) if angle_tolerance is not None else \
1570
+ math.radians(self.angle_tolerance)
1571
+ mul_thick = tol if mullion_thickness is None else mullion_thickness
1572
+
1573
+ # group the apertures by the plane in which they exist
1574
+ apertures = self.apertures
1575
+ coplanar_dict = {apertures[0].geometry.plane: [apertures[0]]}
1576
+ for ap in apertures[1:]:
1577
+ if isinstance(ap.boundary_condition, Outdoors):
1578
+ for pln, f_list in coplanar_dict.items():
1579
+ if ap.geometry.plane.is_coplanar_tolerance(pln, tol, a_tol):
1580
+ f_list.append(ap)
1581
+ break
1582
+ else: # the first face with this type of plane
1583
+ coplanar_dict[ap.geometry.plane] = [ap]
1584
+
1585
+ # for each group, intersect their edges and extract edges from a Polyface3D
1586
+ for plane, aps in coplanar_dict.items():
1587
+ # intersect edges that are close enough to one another within thickness
1588
+ polygons = []
1589
+ for ap in aps:
1590
+ pts_2d = [plane.xyz_to_xy(pt) for pt in ap.geometry.boundary]
1591
+ polygons.append(Polygon2D(pts_2d))
1592
+ polygons = Polygon2D.intersect_polygon_segments(polygons, mul_thick)
1593
+ faces = []
1594
+ for poly in polygons:
1595
+ faces.append(Face3D([plane.xy_to_xyz(pt) for pt in poly]))
1596
+ # create a joined Polyface3D and classify the edges
1597
+ ap_polyface = Polyface3D.from_faces(faces, mul_thick)
1598
+ window_frames.extend(ap_polyface.naked_edges)
1599
+ window_mullions.extend(ap_polyface.internal_edges)
1600
+
1601
+ return window_frames, window_mullions, self.exterior_door_edges
1602
+
1536
1603
  def add_prefix(self, prefix):
1537
1604
  """Change the identifier of this object and child objects by inserting a prefix.
1538
1605
 
@@ -1650,7 +1717,7 @@ class Model(_Base):
1650
1717
 
1651
1718
  Args:
1652
1719
  start_integer: The starting integer that will be used to set a lower
1653
- limit on the
1720
+ limit on the integers assigned to the geometry elements.
1654
1721
  repair_surface_bcs: A Boolean to note whether all Surface boundary
1655
1722
  conditions across the model should be updated with the new
1656
1723
  identifiers that were generated from the display names. (Default: True).
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: honeybee-core
3
- Version: 1.64.1
3
+ Version: 1.64.2
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
@@ -16,7 +16,7 @@ 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=ajsXa4uAwU7Srml4QJ_aKcf-_hPSaQ2wx7_3U5HBJp0,198311
19
+ honeybee/model.py,sha256=hlZ8HJpq4YTlLFII5-VlcohKKzFpNl88i0DXj-y6zSA,201639
20
20
  honeybee/orientation.py,sha256=GogGblASW9OU-fobfDaQ7w5yRbEAFdJJuHwg2fadhKI,5046
21
21
  honeybee/properties.py,sha256=ok976fbUdXzLDR2XiPNf8Q5ejfOM-PArqm5CVUbFiCc,34316
22
22
  honeybee/room.py,sha256=ZrjABLErBTdTHcDRvPdt4W8-0REyPjQLtnu0rnrML0U,168284
@@ -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.1.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
44
- honeybee_core-1.64.1.dist-info/METADATA,sha256=iLC7XbnZvDuIgb927jQbB2jHpv6_jBuN8SiCeeYVXsI,3729
45
- honeybee_core-1.64.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
46
- honeybee_core-1.64.1.dist-info/entry_points.txt,sha256=r3YqOm40goBroH3ccUhpwQjvTwu10JWLd0HIRHI1J8E,47
47
- honeybee_core-1.64.1.dist-info/top_level.txt,sha256=8ve7puCRLUA9XDEGc1Mcs-UX9sFjpPV8MeTaIMwQ_Tg,9
48
- honeybee_core-1.64.1.dist-info/RECORD,,
43
+ honeybee_core-1.64.2.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
44
+ honeybee_core-1.64.2.dist-info/METADATA,sha256=uik9BH2MG0is9st_FBqDrbwW4M_Ljf4YNTi7kAAlbTw,3729
45
+ honeybee_core-1.64.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
46
+ honeybee_core-1.64.2.dist-info/entry_points.txt,sha256=r3YqOm40goBroH3ccUhpwQjvTwu10JWLd0HIRHI1J8E,47
47
+ honeybee_core-1.64.2.dist-info/top_level.txt,sha256=8ve7puCRLUA9XDEGc1Mcs-UX9sFjpPV8MeTaIMwQ_Tg,9
48
+ honeybee_core-1.64.2.dist-info/RECORD,,