honeybee-core 1.64.1__py3-none-any.whl → 1.64.3__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 +89 -4
- {honeybee_core-1.64.1.dist-info → honeybee_core-1.64.3.dist-info}/METADATA +1 -1
- {honeybee_core-1.64.1.dist-info → honeybee_core-1.64.3.dist-info}/RECORD +7 -7
- {honeybee_core-1.64.1.dist-info → honeybee_core-1.64.3.dist-info}/WHEEL +0 -0
- {honeybee_core-1.64.1.dist-info → honeybee_core-1.64.3.dist-info}/entry_points.txt +0 -0
- {honeybee_core-1.64.1.dist-info → honeybee_core-1.64.3.dist-info}/licenses/LICENSE +0 -0
- {honeybee_core-1.64.1.dist-info → honeybee_core-1.64.3.dist-info}/top_level.txt +0 -0
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.
|
|
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
|
|
@@ -1476,7 +1478,7 @@ class Model(_Base):
|
|
|
1476
1478
|
)
|
|
1477
1479
|
return shades
|
|
1478
1480
|
|
|
1479
|
-
def classified_envelope_edges(self, tolerance=None, exclude_coplanar=
|
|
1481
|
+
def classified_envelope_edges(self, tolerance=None, exclude_coplanar=True):
|
|
1480
1482
|
"""Get classified edges of this Model's envelope based on Faces they adjoin.
|
|
1481
1483
|
|
|
1482
1484
|
The edges returned by this method will only exist along the exterior
|
|
@@ -1488,7 +1490,7 @@ class Model(_Base):
|
|
|
1488
1490
|
considered equivalent. If None, the Model's tolerance will be used.
|
|
1489
1491
|
exclude_coplanar: Boolean to note whether edges falling between two
|
|
1490
1492
|
coplanar Faces in the building envelope should be included
|
|
1491
|
-
in the result (False) or excluded from it (True). (Default:
|
|
1493
|
+
in the result (False) or excluded from it (True). (Default: True).
|
|
1492
1494
|
|
|
1493
1495
|
Returns:
|
|
1494
1496
|
A tuple with eight items where each item is a list containing
|
|
@@ -1533,6 +1535,89 @@ 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
|
+
- door_mullions - Doors meet one another.
|
|
1567
|
+
"""
|
|
1568
|
+
# set up variables to be used for all sub_faces
|
|
1569
|
+
tol = tolerance if tolerance is not None else self.tolerance
|
|
1570
|
+
a_tol = math.radians(angle_tolerance) if angle_tolerance is not None else \
|
|
1571
|
+
math.radians(self.angle_tolerance)
|
|
1572
|
+
mul_thick = tol if mullion_thickness is None else mullion_thickness
|
|
1573
|
+
|
|
1574
|
+
# get the edges of the sub_faces
|
|
1575
|
+
window_frames, window_mullions = \
|
|
1576
|
+
self._classify_mullions(self.apertures, mul_thick, tol, a_tol)
|
|
1577
|
+
door_frames, door_mullions = \
|
|
1578
|
+
self._classify_mullions(self.doors, mul_thick, tol, a_tol)
|
|
1579
|
+
return window_frames, window_mullions, door_frames, door_mullions
|
|
1580
|
+
|
|
1581
|
+
@staticmethod
|
|
1582
|
+
def _classify_mullions(sub_faces, mul_thick, tol, a_tol):
|
|
1583
|
+
"""Organize subface edges depending on whether they are frames or mullions."""
|
|
1584
|
+
sub_face_frames, sub_face_mullions = [], []
|
|
1585
|
+
# group the apertures by the plane in which they exist
|
|
1586
|
+
coplanar_dict = {}
|
|
1587
|
+
sub_faces = [sf for sf in sub_faces
|
|
1588
|
+
if isinstance(sf.boundary_condition, Outdoors)]
|
|
1589
|
+
if len(sub_faces) != 0:
|
|
1590
|
+
coplanar_dict = {sub_faces[0].geometry.plane: [sub_faces[0]]}
|
|
1591
|
+
for sf in sub_faces[1:]:
|
|
1592
|
+
for pln, f_list in coplanar_dict.items():
|
|
1593
|
+
if sf.geometry.plane.is_coplanar_tolerance(pln, tol, a_tol):
|
|
1594
|
+
f_list.append(sf)
|
|
1595
|
+
break
|
|
1596
|
+
else: # the first face with this type of plane
|
|
1597
|
+
coplanar_dict[sf.geometry.plane] = [sf]
|
|
1598
|
+
|
|
1599
|
+
# for each group, intersect their edges and extract edges from a Polyface3D
|
|
1600
|
+
for plane, sfs in coplanar_dict.items():
|
|
1601
|
+
# intersect edges that are close enough to one another within thickness
|
|
1602
|
+
polygons = []
|
|
1603
|
+
for sf in sfs:
|
|
1604
|
+
pts_2d = [plane.xyz_to_xy(pt) for pt in sf.geometry.boundary]
|
|
1605
|
+
try:
|
|
1606
|
+
poly = Polygon2D(pts_2d).remove_colinear_vertices(mul_thick)
|
|
1607
|
+
polygons.append(poly)
|
|
1608
|
+
except AssertionError:
|
|
1609
|
+
pass # too small of a geometry
|
|
1610
|
+
polygons = Polygon2D.intersect_polygon_segments(polygons, mul_thick)
|
|
1611
|
+
faces = []
|
|
1612
|
+
for poly in polygons:
|
|
1613
|
+
faces.append(Face3D([plane.xy_to_xyz(pt) for pt in poly], plane))
|
|
1614
|
+
# create a joined Polyface3D and classify the edges
|
|
1615
|
+
ap_polyface = Polyface3D.from_faces(faces, mul_thick)
|
|
1616
|
+
sub_face_frames.extend(ap_polyface.naked_edges)
|
|
1617
|
+
sub_face_mullions.extend(ap_polyface.internal_edges)
|
|
1618
|
+
|
|
1619
|
+
return sub_face_frames, sub_face_mullions
|
|
1620
|
+
|
|
1536
1621
|
def add_prefix(self, prefix):
|
|
1537
1622
|
"""Change the identifier of this object and child objects by inserting a prefix.
|
|
1538
1623
|
|
|
@@ -1650,7 +1735,7 @@ class Model(_Base):
|
|
|
1650
1735
|
|
|
1651
1736
|
Args:
|
|
1652
1737
|
start_integer: The starting integer that will be used to set a lower
|
|
1653
|
-
limit on the
|
|
1738
|
+
limit on the integers assigned to the geometry elements.
|
|
1654
1739
|
repair_surface_bcs: A Boolean to note whether all Surface boundary
|
|
1655
1740
|
conditions across the model should be updated with the new
|
|
1656
1741
|
identifiers that were generated from the display names. (Default: True).
|
|
@@ -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=
|
|
19
|
+
honeybee/model.py,sha256=PayrO3hEEQfYDlsbqsnD14oGSYjY0GlL45G2aGTOLw0,202484
|
|
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.
|
|
44
|
-
honeybee_core-1.64.
|
|
45
|
-
honeybee_core-1.64.
|
|
46
|
-
honeybee_core-1.64.
|
|
47
|
-
honeybee_core-1.64.
|
|
48
|
-
honeybee_core-1.64.
|
|
43
|
+
honeybee_core-1.64.3.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
|
|
44
|
+
honeybee_core-1.64.3.dist-info/METADATA,sha256=RDOQENQugPT9babE1OeoB7zH--L49aqf04L2pJJE1Lw,3729
|
|
45
|
+
honeybee_core-1.64.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
46
|
+
honeybee_core-1.64.3.dist-info/entry_points.txt,sha256=r3YqOm40goBroH3ccUhpwQjvTwu10JWLd0HIRHI1J8E,47
|
|
47
|
+
honeybee_core-1.64.3.dist-info/top_level.txt,sha256=8ve7puCRLUA9XDEGc1Mcs-UX9sFjpPV8MeTaIMwQ_Tg,9
|
|
48
|
+
honeybee_core-1.64.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|