topologicpy 0.4.97__tar.gz → 0.4.98__tar.gz

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.
Files changed (97) hide show
  1. {topologicpy-0.4.97/src/topologicpy.egg-info → topologicpy-0.4.98}/PKG-INFO +1 -1
  2. {topologicpy-0.4.97 → topologicpy-0.4.98}/pyproject.toml +1 -1
  3. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/Cell.py +84 -0
  4. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/Cluster.py +5 -2
  5. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/Graph.py +3 -12
  6. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/Shell.py +0 -1
  7. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/Topology.py +3 -6
  8. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/Vertex.py +8 -2
  9. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/Wire.py +0 -13
  10. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/__init__.py +1 -1
  11. {topologicpy-0.4.97 → topologicpy-0.4.98/src/topologicpy.egg-info}/PKG-INFO +1 -1
  12. {topologicpy-0.4.97 → topologicpy-0.4.98}/LICENSE +0 -0
  13. {topologicpy-0.4.97 → topologicpy-0.4.98}/MANIFEST.in +0 -0
  14. {topologicpy-0.4.97 → topologicpy-0.4.98}/README.md +0 -0
  15. {topologicpy-0.4.97 → topologicpy-0.4.98}/setup.cfg +0 -0
  16. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/Aperture.py +0 -0
  17. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/CellComplex.py +0 -0
  18. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/Color.py +0 -0
  19. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/Context.py +0 -0
  20. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/DGL.py +0 -0
  21. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/Dictionary.py +0 -0
  22. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/Edge.py +0 -0
  23. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/EnergyModel.py +0 -0
  24. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/Face.py +0 -0
  25. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/Grid.py +0 -0
  26. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/Helper.py +0 -0
  27. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/Honeybee.py +0 -0
  28. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/Matrix.py +0 -0
  29. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/Neo4j.py +0 -0
  30. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/Plotly.py +0 -0
  31. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/Polyskel.py +0 -0
  32. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/Speckle.py +0 -0
  33. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/Vector.py +0 -0
  34. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/__init__.py +0 -0
  35. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/libTKBO-6bdf205d.so.7.7.0 +0 -0
  36. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/libTKBRep-2960a069.so.7.7.0 +0 -0
  37. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/libTKBool-c44b74bd.so.7.7.0 +0 -0
  38. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/libTKFillet-9a670ba0.so.7.7.0 +0 -0
  39. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/libTKG2d-8f31849e.so.7.7.0 +0 -0
  40. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/libTKG3d-4c6bce57.so.7.7.0 +0 -0
  41. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/libTKGeomAlgo-26066fd9.so.7.7.0 +0 -0
  42. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/libTKGeomBase-2116cabe.so.7.7.0 +0 -0
  43. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/libTKMath-72572fa8.so.7.7.0 +0 -0
  44. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/libTKMesh-2a060427.so.7.7.0 +0 -0
  45. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/libTKOffset-6cab68ff.so.7.7.0 +0 -0
  46. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/libTKPrim-eb1262b3.so.7.7.0 +0 -0
  47. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/libTKShHealing-e67e5cc7.so.7.7.0 +0 -0
  48. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/libTKTopAlgo-e4c96c33.so.7.7.0 +0 -0
  49. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/libTKernel-fb7fe3b7.so.7.7.0 +0 -0
  50. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/libgcc_s-32c1665e.so.1 +0 -0
  51. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/libstdc++-672d7b41.so.6.0.30 +0 -0
  52. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/topologic.cpython-310-x86_64-linux-gnu.so +0 -0
  53. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/topologic.cpython-311-x86_64-linux-gnu.so +0 -0
  54. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/topologic.cpython-38-x86_64-linux-gnu.so +0 -0
  55. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/topologic.cpython-39-x86_64-linux-gnu.so +0 -0
  56. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic.libs/libTKBO-6bdf205d.so.7.7.0 +0 -0
  57. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic.libs/libTKBRep-2960a069.so.7.7.0 +0 -0
  58. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic.libs/libTKBool-c44b74bd.so.7.7.0 +0 -0
  59. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic.libs/libTKFillet-9a670ba0.so.7.7.0 +0 -0
  60. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic.libs/libTKG2d-8f31849e.so.7.7.0 +0 -0
  61. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic.libs/libTKG3d-4c6bce57.so.7.7.0 +0 -0
  62. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic.libs/libTKGeomAlgo-26066fd9.so.7.7.0 +0 -0
  63. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic.libs/libTKGeomBase-2116cabe.so.7.7.0 +0 -0
  64. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic.libs/libTKMath-72572fa8.so.7.7.0 +0 -0
  65. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic.libs/libTKMesh-2a060427.so.7.7.0 +0 -0
  66. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic.libs/libTKOffset-6cab68ff.so.7.7.0 +0 -0
  67. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic.libs/libTKPrim-eb1262b3.so.7.7.0 +0 -0
  68. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic.libs/libTKShHealing-e67e5cc7.so.7.7.0 +0 -0
  69. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic.libs/libTKTopAlgo-e4c96c33.so.7.7.0 +0 -0
  70. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic.libs/libTKernel-fb7fe3b7.so.7.7.0 +0 -0
  71. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic.libs/libgcc_s-32c1665e.so.1 +0 -0
  72. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic.libs/libstdc++-672d7b41.so.6.0.30 +0 -0
  73. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/macos/topologic/__init__.py +0 -0
  74. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKBO-f6b191de.dll +0 -0
  75. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKBRep-e56a600e.dll +0 -0
  76. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKBool-7b8d47ae.dll +0 -0
  77. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKFillet-0ddbf0a8.dll +0 -0
  78. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKG2d-2e2dee3d.dll +0 -0
  79. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKG3d-6674513d.dll +0 -0
  80. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKGeomAlgo-d240e370.dll +0 -0
  81. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKGeomBase-df87aba5.dll +0 -0
  82. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKMath-45bd625a.dll +0 -0
  83. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKMesh-d6e826b1.dll +0 -0
  84. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKOffset-79b9cc94.dll +0 -0
  85. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKPrim-aa430a86.dll +0 -0
  86. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKShHealing-bb48be89.dll +0 -0
  87. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKTopAlgo-7d0d1e22.dll +0 -0
  88. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKernel-08c8cfbb.dll +0 -0
  89. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/__init__.py +0 -0
  90. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/topologic.cp310-win_amd64.pyd +0 -0
  91. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/topologic.cp311-win_amd64.pyd +0 -0
  92. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/topologic.cp38-win_amd64.pyd +0 -0
  93. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/topologic.cp39-win_amd64.pyd +0 -0
  94. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy.egg-info/SOURCES.txt +0 -0
  95. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy.egg-info/dependency_links.txt +0 -0
  96. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy.egg-info/requires.txt +0 -0
  97. {topologicpy-0.4.97 → topologicpy-0.4.98}/src/topologicpy.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: topologicpy
3
- Version: 0.4.97
3
+ Version: 0.4.98
4
4
  Summary: An Advanced Spatial Modelling and Analysis Software Library for Architecture, Engineering, and Construction.
5
5
  Author-email: Wassim Jabi <wassim.jabi@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/wassimj/TopologicPy
@@ -3,7 +3,7 @@ requires = ["setuptools>=61"]
3
3
  build-backend = "setuptools.build_meta"
4
4
  [project]
5
5
  name = "topologicpy"
6
- version = "0.4.97"
6
+ version = "0.4.98"
7
7
  authors = [
8
8
  { name="Wassim Jabi", email="wassim.jabi@gmail.com" },
9
9
  ]
@@ -1091,6 +1091,90 @@ class Cell(Topology):
1091
1091
  _ = cell.Edges(None, edges)
1092
1092
  return edges
1093
1093
 
1094
+ @staticmethod
1095
+ def Egg(origin: topologic.Vertex = None, height: float = 1.0, uSides: int = 16, vSides: int = 8, direction: list = [0,0,1],
1096
+ placement: str = "center", tolerance: float = 0.0001) -> topologic.Cell:
1097
+ """
1098
+ Creates a sphere.
1099
+
1100
+ Parameters
1101
+ ----------
1102
+ origin : topologic.Vertex , optional
1103
+ The origin location of the sphere. The default is None which results in the sphere being placed at (0,0,0).
1104
+ radius : float , optional
1105
+ The radius of the sphere. The default is 0.5.
1106
+ uSides : int , optional
1107
+ The number of sides along the longitude of the sphere. The default is 16.
1108
+ vSides : int , optional
1109
+ The number of sides along the latitude of the sphere. The default is 8.
1110
+ direction : list , optional
1111
+ The vector representing the up direction of the sphere. The default is [0,0,1].
1112
+ placement : str , optional
1113
+ The description of the placement of the origin of the sphere. This can be "bottom", "center", or "lowerleft". It is case insensitive. The default is "center".
1114
+ tolerance : float , optional
1115
+ The desired tolerance. The default is 0.0001.
1116
+
1117
+ Returns
1118
+ -------
1119
+ topologic.Cell
1120
+ The created sphere.
1121
+
1122
+ """
1123
+
1124
+ from topologicpy.Vertex import Vertex
1125
+ from topologicpy.Topology import Topology
1126
+ from topologicpy.Dictionary import Dictionary
1127
+
1128
+ if not origin:
1129
+ origin = Vertex.ByCoordinates(0,0,0)
1130
+ if not isinstance(origin, topologic.Vertex):
1131
+ print("Cell.Sphere - Error: The input origin parameter is not a valid topologic vertex. Returning None.")
1132
+ return None
1133
+
1134
+ coords = [[0.0, 0.0, -0.5],
1135
+ [0.074748, 0.0, -0.494015],
1136
+ [0.140819, 0.0, -0.473222],
1137
+ [0.204118, 0.0, -0.438358],
1138
+ [0.259512, 0.0, -0.391913],
1139
+ [0.304837, 0.0, -0.335519],
1140
+ [0.338649, 0.0, -0.271416],
1141
+ [0.361307, 0.0, -0.202039],
1142
+ [0.375678, 0.0, -0.129109],
1143
+ [0.381294, 0.0, -0.053696],
1144
+ [0.377694, 0.0, 0.019874],
1145
+ [0.365135, 0.0, 0.091978],
1146
+ [0.341482, 0.0, 0.173973],
1147
+ [0.300154, 0.0, 0.276001],
1148
+ [0.252928, 0.0, 0.355989],
1149
+ [0.206605, 0.0, 0.405813],
1150
+ [0.157529, 0.0, 0.442299],
1151
+ [0.10604, 0.0, 0.472092],
1152
+ [0.05547, 0.0, 0.491784],
1153
+ [0.0, 0.0, 0.5]]
1154
+ verts = [Vertex.ByCoordinates(coord) for coord in coords]
1155
+ c = Wire.ByVertices(verts, close=False)
1156
+ new_verts = []
1157
+ for i in range(vSides+1):
1158
+ new_verts.append(Wire.VertexByParameter(c, i/vSides))
1159
+ c = Wire.ByVertices(new_verts, close=False)
1160
+ egg = Topology.Spin(c, origin=Vertex.Origin(), triangulate=False, direction=[0,0,1], degree=360, sides=uSides, tolerance=tolerance)
1161
+ if egg.Type() == topologic.CellComplex.Type():
1162
+ egg = egg.ExternalBoundary()
1163
+ if egg.Type() == topologic.Shell.Type():
1164
+ egg = topologic.Cell.ByShell(egg)
1165
+ egg = Topology.Scale(egg, origin=Vertex.Origin(), x=height, y=height, z=height)
1166
+ if placement.lower() == "bottom":
1167
+ egg = Topology.Translate(egg, 0, 0, height/2)
1168
+ elif placement.lower() == "lowerleft":
1169
+ bb = Cell.BoundingBox(egg)
1170
+ d = Topology.Dictionary(bb)
1171
+ width = Dictionary.ValueAtKey(d, 'width')
1172
+ length = Dictionary.ValueAtKey(d, 'length')
1173
+ egg = Topology.Translate(egg, width*0.5, length*0.5, height*0.5)
1174
+ egg = Topology.Orient(egg, origin=Vertex.Origin(), dirA=[0,0,1], dirB=direction)
1175
+ egg = Topology.Place(egg, originA=Vertex.Origin(), originB=origin)
1176
+ return egg
1177
+
1094
1178
  @staticmethod
1095
1179
  def ExternalBoundary(cell: topologic.Cell) -> topologic.Shell:
1096
1180
  """
@@ -188,8 +188,11 @@ class Cluster(Topology):
188
188
  if len(keys) > 0:
189
189
  dictionaries.append(d)
190
190
  if len(dictionaries) > 0:
191
- d = Dictionary.ByMergedDictionaries(dictionaries)
192
- cluster = Topology.SetDictionary(cluster, d)
191
+ if len(dictionaries) > 1:
192
+ d = Dictionary.ByMergedDictionaries(dictionaries)
193
+ else:
194
+ d = dictionaries[0]
195
+ cluster = Topology.SetDictionary(cluster, d)
193
196
  return cluster
194
197
 
195
198
  @staticmethod
@@ -675,7 +675,7 @@ class Graph:
675
675
  import random
676
676
 
677
677
  if not isinstance(adjacencyMatrix, list):
678
- print("Graph.BYAdjacencyMatrix - Error: The input adjacencyMatrix parameter is not a valid list. Returning None.")
678
+ print("Graph.ByAdjacencyMatrix - Error: The input adjacencyMatrix parameter is not a valid list. Returning None.")
679
679
  return None
680
680
  # Add vertices with random coordinates
681
681
  vertices = []
@@ -692,7 +692,7 @@ class Graph:
692
692
 
693
693
  # Create the graph using vertices and edges
694
694
  if len(vertices) == 0:
695
- print("Graph.BYAdjacencyMatrix - Error: The graph does not contain any vertices. Returning None.")
695
+ print("Graph.ByAdjacencyMatrix - Error: The graph does not contain any vertices. Returning None.")
696
696
  return None
697
697
 
698
698
  return Graph.ByVerticesEdges(vertices, edges)
@@ -960,13 +960,9 @@ class Graph:
960
960
  graphs = []
961
961
  for i, vertices, in enumerate(vertices_ds):
962
962
  edges = edges_ds[i]
963
- print("2. Length of Vertices:", len(vertices))
964
- print("2. Length of Edges:", len(edges))
965
963
  g = Graph.ByVerticesEdges(vertices, edges)
966
964
  temp_v = Graph.Vertices(g)
967
965
  temp_e = Graph.Edges(g)
968
- print("3. Length of Vertices:", len(temp_v))
969
- print("3. Length of Edges:", len(temp_e))
970
966
  if isinstance(g, topologic.Graph):
971
967
  if len(graphFeaturesKeys) == 0:
972
968
  values = [graph_ids[i], graph_labels[i], graph_features[i]]
@@ -3154,10 +3150,8 @@ class Graph:
3154
3150
  # If the maximum number of colors are not provided, compute it using the graph's chromatic number.
3155
3151
  if maxColors == None:
3156
3152
  maxColors = Graph.ChromaticNumber(temp_graph)
3157
- print("MaxColors:", maxColors)
3158
3153
  colors = [0] * len(vertices)
3159
3154
  colors = graph_coloring(adj_mat, maxColors, colors)
3160
- print("Colors:", colors)
3161
3155
  for i, v in enumerate(vertices):
3162
3156
  d = Topology.Dictionary(v)
3163
3157
  d = Dictionary.SetValueAtKey(d, newKey, colors[i])
@@ -3314,7 +3308,7 @@ class Graph:
3314
3308
  else:
3315
3309
  returnList.append((n-1)/top_dist)
3316
3310
  except:
3317
- print("Could not use tqdm")
3311
+ print("Graph.ClosenessCentrality - Warning: Could not use tqdm.")
3318
3312
  for va in vertices:
3319
3313
  top_dist = 0
3320
3314
  for vb in graphVertices:
@@ -3889,7 +3883,6 @@ class Graph:
3889
3883
  if not nodeMaskKey == None:
3890
3884
  if not nd == None:
3891
3885
  keys = Dictionary.Keys(nd)
3892
- print("keys", keys)
3893
3886
  else:
3894
3887
  keys = []
3895
3888
  flag = True
@@ -4791,8 +4784,6 @@ class Graph:
4791
4784
 
4792
4785
 
4793
4786
  # Calculate the global clustering coefficient
4794
- print("Total Triangles:", total_triangles )
4795
- print("Total Possible Triangles:", total_possible_triangles )
4796
4787
  global_clustering_coeff = 3.0 * total_triangles / total_possible_triangles if total_possible_triangles > 0 else 0.0
4797
4788
 
4798
4789
  return global_clustering_coeff
@@ -1295,7 +1295,6 @@ class Shell(Topology):
1295
1295
  if not roof:
1296
1296
  return None
1297
1297
  shell = Shell.Skeleton(flat_face, tolerance=tolerance)
1298
- print(shell)
1299
1298
  faces = Shell.Faces(shell)
1300
1299
  Topology.Show(shell)
1301
1300
  if not faces:
@@ -3607,7 +3607,6 @@ class Topology():
3607
3607
  return_topology = Cell.ByFaces(faces, tolerance=tolerance)
3608
3608
  if return_topology == None:
3609
3609
  return_topology = CellComplex.ByFaces(faces, tolerance=tolerance)
3610
- #print("Return Topology:", return_topology)
3611
3610
  if return_topology == None:
3612
3611
  print("Topology.Fix - Error: Desired topologyType cannot be achieved. Returning original topology.")
3613
3612
  return topology
@@ -4397,7 +4396,6 @@ class Topology():
4397
4396
  return [a,b,c,d]
4398
4397
 
4399
4398
  if not isinstance(topology, topologic.Topology):
4400
- print("Topology.IsPlanar", topology)
4401
4399
  print("Topology.IsPlanar - Error: the input topology parameter is not a valid topology. Returning None.")
4402
4400
  return None
4403
4401
  vertices = Topology.Vertices(topology)
@@ -5146,7 +5144,7 @@ class Topology():
5146
5144
 
5147
5145
  """
5148
5146
  if not len(verticesA) == len(verticesB):
5149
- print("Error - Topology.ReplaceVertices: VerticesA and VerticesB must be the same length")
5147
+ print("Topology.ReplaceVertices - Error: The input parameters verticesA and verticesB must be the same length")
5150
5148
  return None
5151
5149
  from topologicpy.Vertex import Vertex
5152
5150
  geom = Topology.Geometry(topology, mantissa=mantissa)
@@ -5194,6 +5192,7 @@ class Topology():
5194
5192
 
5195
5193
  """
5196
5194
  from topologicpy.Vertex import Vertex
5195
+ from topologicpy.Dictionary import Dictionary
5197
5196
 
5198
5197
  def rotate_vertex_3d(vertex, axis, angle_degrees, origin):
5199
5198
  vertex = np.array(vertex) # Vertex to be rotated
@@ -5216,12 +5215,11 @@ class Topology():
5216
5215
  translated_vertex = vertex - origin
5217
5216
  rotated_vertex = np.dot(rotation_matrix, translated_vertex) + origin
5218
5217
 
5219
- rotated_vertex = [v for v in rotated_vertex]
5218
+ rotated_vertex = [v for v in rotated_vertex]
5220
5219
  return rotated_vertex
5221
5220
 
5222
5221
  if not isinstance(topology, topologic.Topology):
5223
5222
  print("Topology.Rotate - Error: The input topology parameter is not a valid topologic topology. Returning None.")
5224
- print("The topology is", topology)
5225
5223
  return None
5226
5224
  if not origin:
5227
5225
  origin = Vertex.ByCoordinates(0,0,0)
@@ -6476,7 +6474,6 @@ class Topology():
6476
6474
  for i, sink in enumerate(sink_items):
6477
6475
  mapItem = sinkMap[sink.ID]
6478
6476
  newDict = Dictionary.ByKeysValues(mapItem.sinkKeys, mapItem.sinkValues)
6479
- # print("newDict", Dictionary.Keys(newDict), Dictionary.Values(newDict))
6480
6477
  _ = sinks[i].SetDictionary(newDict)
6481
6478
  return {"sources": sources, "sinks": sinks}
6482
6479
 
@@ -698,10 +698,16 @@ class Vertex(Topology):
698
698
  fused_vertices.append(fused_vertex)
699
699
 
700
700
  return fused_vertices
701
-
702
701
  def count_decimal_points(vertex):
703
702
  # Count the number of decimal points in the coordinates
704
- return max(len(str(coord).split('.')[1]) for coord in vertex)
703
+ decimals_list = []
704
+ for coord in vertex:
705
+ coord_str = str(coord)
706
+ if '.' in coord_str:
707
+ decimals_list.append(len(coord_str.split('.')[1]))
708
+ elif 'e' in coord_str:
709
+ decimals_list.append(int(coord_str.split('e')[1].replace('-','')))
710
+ return max(decimals_list)
705
711
 
706
712
 
707
713
  if not isinstance(vertices, list):
@@ -2933,9 +2933,6 @@ class Wire(Topology):
2933
2933
  return Wire.StartVertex(wire)
2934
2934
  if abs(distance - wire_length) < tolerance:
2935
2935
  return Wire.EndVertex(wire)
2936
- # if abs(distance) > wire_length:
2937
- # print("Wire.VertexByDistance - Error: The input distance parameter is larger than the wire's length. Returning None.")
2938
- # return None
2939
2936
  if not Wire.IsManifold(wire):
2940
2937
  print("Wire.VertexAtParameter - Error: The input wire parameter is non-manifold. Returning None.")
2941
2938
  return None
@@ -2947,16 +2944,6 @@ class Wire(Topology):
2947
2944
  if not Vertex.IsInternal(origin, wire, tolerance=tolerance):
2948
2945
  print("Wire.VertexByDistance - Error: The input origin parameter is not internal to the input wire parameter. Returning None.")
2949
2946
  return None
2950
- # if distance < 0:
2951
- # if Wire.VertexDistance(wire, Wire.StartVertex(wire), origin) < abs(distance):
2952
- # print("Wire.VertexByDistance - Error: The resulting vertex would fall outside the wire. Returning None.")
2953
- # return None
2954
- # else:
2955
- # if Wire.VertexDistance(wire, Wire.EndVertex(wire), origin) < distance:
2956
- # print("Wire.VertexDistance:", Wire.VertexDistance(wire, Wire.EndVertex(wire), origin))
2957
- # print("Wire.VertexByDistance - Error: The resulting vertex would fall outside the wire. Returning None.")
2958
- # return None
2959
-
2960
2947
  if Vertex.Distance(Wire.StartVertex(wire), origin) < tolerance:
2961
2948
  u = distance/wire_length
2962
2949
  elif Vertex.Distance(Wire.EndVertex(wire), origin) < tolerance:
@@ -18,7 +18,7 @@ import sys
18
18
  import os, re
19
19
  from sys import platform
20
20
 
21
- __version__ = '0.4.97'
21
+ __version__ = '0.4.98'
22
22
  __version_info__ = tuple([ int(num) for num in __version__.split('.')])
23
23
 
24
24
  if platform == 'win32':
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: topologicpy
3
- Version: 0.4.97
3
+ Version: 0.4.98
4
4
  Summary: An Advanced Spatial Modelling and Analysis Software Library for Architecture, Engineering, and Construction.
5
5
  Author-email: Wassim Jabi <wassim.jabi@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/wassimj/TopologicPy
File without changes
File without changes
File without changes
File without changes