topologicpy 0.8.73__py3-none-any.whl → 0.8.74__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.
topologicpy/Cell.py CHANGED
@@ -913,6 +913,7 @@ class Cell():
913
913
 
914
914
  """
915
915
  from topologicpy.Topology import Topology
916
+ import math
916
917
 
917
918
  if not Topology.IsInstance(cell, "Cell"):
918
919
  print("Cell.ContainmentStatus - Error: The input cell parameter is not a valid topologic cell. Returning None.")
@@ -920,14 +921,28 @@ class Cell():
920
921
  if not Topology.IsInstance(vertex, "Vertex"):
921
922
  print("Cell.ContainmentStatus - Error: The input vertex parameter is not a valid topologic vertex. Returning None.")
922
923
  return None
924
+
925
+ # topologic.CellUtility.Contains does not seem to respect the input tolerance. Thus we need to send eight additional vertices
926
+ # to check if any are contained and take the average result.
927
+
928
+ test_vertices = [vertex]
929
+ if tolerance > 0:
930
+ test_cell = Cell.Prism(origin=vertex, width=tolerance*2, length=tolerance*2, height=tolerance*2, tolerance=tolerance)
931
+ test_vertices.extend(Topology.Vertices(test_cell))
923
932
  try:
924
- status = topologic.CellUtility.Contains(cell, vertex, tolerance) # Hook to Core
925
- if status == 0:
926
- return 0
927
- elif status == 1:
928
- return 1
929
- else:
930
- return 2
933
+ av_results = []
934
+ for v in test_vertices:
935
+
936
+ result = topologic.CellUtility.Contains(cell, v, tolerance) # Hook to Core
937
+ if result == 0:
938
+ status = 0
939
+ elif result == 1:
940
+ status = 1
941
+ else:
942
+ status = 2
943
+ av_results.append(status)
944
+ return min(av_results)
945
+
931
946
  except:
932
947
  print("Cell.ContainmentStatus - Error: Could not determine containment status. Returning None.")
933
948
  return None
topologicpy/Vertex.py CHANGED
@@ -1325,8 +1325,8 @@ class Vertex():
1325
1325
  else:
1326
1326
  cells = collect_cells(topology)
1327
1327
  faces = [] if cells else collect_faces(topology)
1328
- edges = [] if faces else collect_edges(topology)
1329
- vertices = [] if edges else collect_vertices(topology)
1328
+ edges = [] if faces or cells else collect_edges(topology)
1329
+ vertices = [] if edges or faces or cells else collect_vertices(topology)
1330
1330
  if not cells and not faces and not edges and not vertices:
1331
1331
  return False
1332
1332
 
topologicpy/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = '0.8.73'
1
+ __version__ = '0.8.74'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: topologicpy
3
- Version: 0.8.73
3
+ Version: 0.8.74
4
4
  Summary: An AI-Powered Spatial Modelling and Analysis Software Library for Architecture, Engineering, and Construction.
5
5
  Author-email: Wassim Jabi <wassim.jabi@gmail.com>
6
6
  License: AGPL v3 License
@@ -2,7 +2,7 @@ topologicpy/ANN.py,sha256=gpflv4lFypOW789vO7mSkMLaMF_ZftVOCqCvtGr6-JA,47873
2
2
  topologicpy/Aperture.py,sha256=wNn5miB_IrGCBYuQ18HXQYRva20dUC3id4AJCulL7to,2723
3
3
  topologicpy/BVH.py,sha256=ts0Ru24ILjjfHa54SYNhMc8Jkyxwej1DV0Jv7P_6BoU,22513
4
4
  topologicpy/CSG.py,sha256=09la1-xzS9vr-WnV7tpJ0I-mkZ-XY0MRSd5iB50Nfgw,15556
5
- topologicpy/Cell.py,sha256=xkt9lfutgSwr_1lah1U5n48UnrLIggznNKUmEe2FA2g,177505
5
+ topologicpy/Cell.py,sha256=8HeL2sVgvBWwsWsFD6OkyCIQf3S4JPBWc_xev0Oh1i4,178199
6
6
  topologicpy/CellComplex.py,sha256=Kbz63rGeE08bJfMXFvB-AptoKHiaCK5OtiV1wz8Y-Fk,68081
7
7
  topologicpy/Cluster.py,sha256=G49AuhJHQ1s819cB5MtVdmAGgkag19IC3dRP1ub1Wh4,58608
8
8
  topologicpy/Color.py,sha256=hzSmgBWhiuYc55RSipkQNIgGtgyhC5BqY8AakNYEK-U,24486
@@ -28,12 +28,12 @@ topologicpy/Speckle.py,sha256=-eiTqJugd7pHiHpD3pDUcDO6CGhVyPV14HFRzaqEoaw,18187
28
28
  topologicpy/Sun.py,sha256=8S6dhCKfOhUGVny-jEk87Q08anLYMB1JEBKRGCklvbQ,36670
29
29
  topologicpy/Topology.py,sha256=BC9JYfxComyAzmXrPdhmXlaFBGmZ_x7-oHl579E4qUY,474458
30
30
  topologicpy/Vector.py,sha256=pEC8YY3TeHGfGdeNgvdHjgMDwxGabp5aWjwYC1HSvMk,42236
31
- topologicpy/Vertex.py,sha256=rdtuOvgySIamN_xTKrETUQYu0fukXHR9EDJ91WeZLMI,90855
31
+ topologicpy/Vertex.py,sha256=oBlBXNrB0ov-lA6uvvPNIiRCZwKa92SS_K5vfp8Elec,90882
32
32
  topologicpy/Wire.py,sha256=gjgQUGHdBdXUIijgZc_VIW0E39w-smaVhhdl0jF63fQ,230466
33
33
  topologicpy/__init__.py,sha256=RMftibjgAnHB1vdL-muo71RwMS4972JCxHuRHOlU428,928
34
- topologicpy/version.py,sha256=6R_YGb083s4RIeitSxsh0BGKzotjy9BcSCbEAIQwb9I,23
35
- topologicpy-0.8.73.dist-info/licenses/LICENSE,sha256=FK0vJ73LuE8PYJAn7LutsReWR47-Ooovw2dnRe5yV6Q,681
36
- topologicpy-0.8.73.dist-info/METADATA,sha256=-GgQ5YJnlTUt5r8E0HUKhSTb6Da1CSIGWq7iFcYTUQE,10535
37
- topologicpy-0.8.73.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
38
- topologicpy-0.8.73.dist-info/top_level.txt,sha256=J30bDzW92Ob7hw3zA8V34Jlp-vvsfIkGzkr8sqvb4Uw,12
39
- topologicpy-0.8.73.dist-info/RECORD,,
34
+ topologicpy/version.py,sha256=0GBumWosBLrQf5ksbXd1cy8lfG5KK7ZxVU4oNea8mU4,23
35
+ topologicpy-0.8.74.dist-info/licenses/LICENSE,sha256=FK0vJ73LuE8PYJAn7LutsReWR47-Ooovw2dnRe5yV6Q,681
36
+ topologicpy-0.8.74.dist-info/METADATA,sha256=M7FzwXZzuTCTCHrXLwtS-i-APB3DVw3lFld3gbmedHo,10535
37
+ topologicpy-0.8.74.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
38
+ topologicpy-0.8.74.dist-info/top_level.txt,sha256=J30bDzW92Ob7hw3zA8V34Jlp-vvsfIkGzkr8sqvb4Uw,12
39
+ topologicpy-0.8.74.dist-info/RECORD,,