honeybee-core 1.61.32__py2.py3-none-any.whl → 1.61.33__py2.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/room.py CHANGED
@@ -1662,6 +1662,44 @@ class Room(_BaseWithShade):
1662
1662
  msg, raise_exception, detailed, '000107',
1663
1663
  error_type='Degenerate Room Volume')
1664
1664
 
1665
+ def remove_duplicate_faces(self, tolerance=0.01):
1666
+ """Remove duplicate face geometries from the Room.
1667
+
1668
+ Such duplicate faces can sometimes happen as a result of performing many
1669
+ coplanar splits.
1670
+
1671
+ Args:
1672
+ tolerance: The minimum difference between the coordinate values of two
1673
+ faces at which they can be considered adjacent. Default: 0.01,
1674
+ suitable for objects in meters.
1675
+
1676
+ Returns:
1677
+ A list containing only the duplicate Faces that were removed.
1678
+ """
1679
+ # first make a list of faces without any duplicate geometries
1680
+ new_faces, removed_faces = [self._faces[0]], []
1681
+ for face in self._faces[1:]:
1682
+ for e_face in new_faces:
1683
+ if face.geometry.is_centered_adjacent(e_face.geometry, tolerance):
1684
+ tol_area = math.sqrt(face.geometry.area) * tolerance
1685
+ if abs(face.geometry.area - e_face.area) < tol_area:
1686
+ removed_faces.append(face)
1687
+ break # duplicate face found
1688
+ else: # the first face with this type of plane
1689
+ new_faces.append(face)
1690
+ if len(removed_faces) == 0:
1691
+ return removed_faces # nothing has been removed
1692
+
1693
+ # make a new polyface from the updated faces
1694
+ room_polyface = Polyface3D.from_faces(
1695
+ tuple(face.geometry for face in new_faces), tolerance)
1696
+ if not room_polyface.is_solid:
1697
+ room_polyface = room_polyface.merge_overlapping_edges(tolerance)
1698
+ # reset the faces and geometry of the room with the new faces
1699
+ self._faces = tuple(new_faces)
1700
+ self._geometry = room_polyface
1701
+ return removed_faces
1702
+
1665
1703
  def merge_coplanar_faces(
1666
1704
  self, tolerance=0.01, angle_tolerance=1, orthogonal_only=False):
1667
1705
  """Merge coplanar Faces of this Room.
@@ -1941,6 +1979,7 @@ class Room(_BaseWithShade):
1941
1979
  for i, room in enumerate(rooms):
1942
1980
  other_rooms = room_geos[:i] + room_geos[i + 1:]
1943
1981
  room.coplanar_split(other_rooms, tolerance, angle_tolerance)
1982
+ room.remove_duplicate_faces(tolerance)
1944
1983
 
1945
1984
  @staticmethod
1946
1985
  def solve_adjacency(rooms, tolerance=0.01, remove_mismatched_sub_faces=False):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: honeybee-core
3
- Version: 1.61.32
3
+ Version: 1.61.33
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
@@ -19,7 +19,7 @@ honeybee/logutil.py,sha256=2gn-6RcWqFLvwdFzBHPqUwFqTj_R3iwHKALrl-2eL7M,2564
19
19
  honeybee/model.py,sha256=oGuhSSBimZ-MEJKyidh6_poi7twUgeEJKUzbr_j7qcQ,175868
20
20
  honeybee/orientation.py,sha256=GogGblASW9OU-fobfDaQ7w5yRbEAFdJJuHwg2fadhKI,5046
21
21
  honeybee/properties.py,sha256=fnlT71in22HpFQGD8ta5kXNnSZVXwXq5cNgvD-hrMRg,33462
22
- honeybee/room.py,sha256=5z6rSqsP231N3FYcRxSzntKfR8inEDIJJjJ-BaQcV3A,150943
22
+ honeybee/room.py,sha256=eVmfUv_9R0Tfkgcc2sKlJG60hEYZbpR6ZH20O7xK52k,152735
23
23
  honeybee/search.py,sha256=OiXibGGVb1ff4gTn_768i-sehB-zAYG12c0o3B0RjKE,4718
24
24
  honeybee/shade.py,sha256=GSlceN2kpo8NOc_QkvvxEhKozRytOS8InZ1Ge0fPuko,19746
25
25
  honeybee/shademesh.py,sha256=oldugnwhu-ibX9f0hfxpO-DvgM8U7S-dYwUjBSVzo4g,13273
@@ -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.61.32.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
44
- honeybee_core-1.61.32.dist-info/METADATA,sha256=e7FRoipS-OFp_ztDtU9j72So1mFM5JLwK64KeUczuIA,3317
45
- honeybee_core-1.61.32.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
46
- honeybee_core-1.61.32.dist-info/entry_points.txt,sha256=r3YqOm40goBroH3ccUhpwQjvTwu10JWLd0HIRHI1J8E,47
47
- honeybee_core-1.61.32.dist-info/top_level.txt,sha256=8ve7puCRLUA9XDEGc1Mcs-UX9sFjpPV8MeTaIMwQ_Tg,9
48
- honeybee_core-1.61.32.dist-info/RECORD,,
43
+ honeybee_core-1.61.33.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
44
+ honeybee_core-1.61.33.dist-info/METADATA,sha256=AvK29igv9UAsKHY_yNvrQ7pU-yIO2UI-DNsRbslkwxw,3317
45
+ honeybee_core-1.61.33.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
46
+ honeybee_core-1.61.33.dist-info/entry_points.txt,sha256=r3YqOm40goBroH3ccUhpwQjvTwu10JWLd0HIRHI1J8E,47
47
+ honeybee_core-1.61.33.dist-info/top_level.txt,sha256=8ve7puCRLUA9XDEGc1Mcs-UX9sFjpPV8MeTaIMwQ_Tg,9
48
+ honeybee_core-1.61.33.dist-info/RECORD,,