topologicpy 0.4.96__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.
- {topologicpy-0.4.96/src/topologicpy.egg-info → topologicpy-0.4.98}/PKG-INFO +1 -1
- {topologicpy-0.4.96 → topologicpy-0.4.98}/pyproject.toml +1 -1
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/Cell.py +84 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/Cluster.py +5 -2
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/Graph.py +3 -12
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/Shell.py +3 -4
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/Topology.py +12 -7
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/Vertex.py +8 -2
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/Wire.py +18 -14
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/__init__.py +1 -1
- {topologicpy-0.4.96 → topologicpy-0.4.98/src/topologicpy.egg-info}/PKG-INFO +1 -1
- {topologicpy-0.4.96 → topologicpy-0.4.98}/LICENSE +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/MANIFEST.in +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/README.md +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/setup.cfg +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/Aperture.py +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/CellComplex.py +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/Color.py +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/Context.py +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/DGL.py +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/Dictionary.py +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/Edge.py +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/EnergyModel.py +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/Face.py +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/Grid.py +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/Helper.py +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/Honeybee.py +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/Matrix.py +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/Neo4j.py +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/Plotly.py +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/Polyskel.py +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/Speckle.py +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/Vector.py +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/__init__.py +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/libTKBO-6bdf205d.so.7.7.0 +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/libTKBRep-2960a069.so.7.7.0 +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/libTKBool-c44b74bd.so.7.7.0 +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/libTKFillet-9a670ba0.so.7.7.0 +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/libTKG2d-8f31849e.so.7.7.0 +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/libTKG3d-4c6bce57.so.7.7.0 +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/libTKGeomAlgo-26066fd9.so.7.7.0 +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/libTKGeomBase-2116cabe.so.7.7.0 +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/libTKMath-72572fa8.so.7.7.0 +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/libTKMesh-2a060427.so.7.7.0 +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/libTKOffset-6cab68ff.so.7.7.0 +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/libTKPrim-eb1262b3.so.7.7.0 +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/libTKShHealing-e67e5cc7.so.7.7.0 +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/libTKTopAlgo-e4c96c33.so.7.7.0 +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/libTKernel-fb7fe3b7.so.7.7.0 +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/libgcc_s-32c1665e.so.1 +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/libstdc++-672d7b41.so.6.0.30 +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/topologic.cpython-310-x86_64-linux-gnu.so +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/topologic.cpython-311-x86_64-linux-gnu.so +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/topologic.cpython-38-x86_64-linux-gnu.so +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/topologic.cpython-39-x86_64-linux-gnu.so +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic.libs/libTKBO-6bdf205d.so.7.7.0 +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic.libs/libTKBRep-2960a069.so.7.7.0 +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic.libs/libTKBool-c44b74bd.so.7.7.0 +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic.libs/libTKFillet-9a670ba0.so.7.7.0 +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic.libs/libTKG2d-8f31849e.so.7.7.0 +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic.libs/libTKG3d-4c6bce57.so.7.7.0 +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic.libs/libTKGeomAlgo-26066fd9.so.7.7.0 +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic.libs/libTKGeomBase-2116cabe.so.7.7.0 +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic.libs/libTKMath-72572fa8.so.7.7.0 +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic.libs/libTKMesh-2a060427.so.7.7.0 +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic.libs/libTKOffset-6cab68ff.so.7.7.0 +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic.libs/libTKPrim-eb1262b3.so.7.7.0 +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic.libs/libTKShHealing-e67e5cc7.so.7.7.0 +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic.libs/libTKTopAlgo-e4c96c33.so.7.7.0 +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic.libs/libTKernel-fb7fe3b7.so.7.7.0 +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic.libs/libgcc_s-32c1665e.so.1 +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic.libs/libstdc++-672d7b41.so.6.0.30 +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/macos/topologic/__init__.py +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKBO-f6b191de.dll +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKBRep-e56a600e.dll +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKBool-7b8d47ae.dll +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKFillet-0ddbf0a8.dll +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKG2d-2e2dee3d.dll +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKG3d-6674513d.dll +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKGeomAlgo-d240e370.dll +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKGeomBase-df87aba5.dll +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKMath-45bd625a.dll +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKMesh-d6e826b1.dll +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKOffset-79b9cc94.dll +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKPrim-aa430a86.dll +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKShHealing-bb48be89.dll +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKTopAlgo-7d0d1e22.dll +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKernel-08c8cfbb.dll +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/__init__.py +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/topologic.cp310-win_amd64.pyd +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/topologic.cp311-win_amd64.pyd +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/topologic.cp38-win_amd64.pyd +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/topologic.cp39-win_amd64.pyd +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy.egg-info/SOURCES.txt +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy.egg-info/dependency_links.txt +0 -0
- {topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy.egg-info/requires.txt +0 -0
- {topologicpy-0.4.96 → 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.
|
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
|
@@ -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
|
-
|
192
|
-
|
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.
|
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.
|
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
|
@@ -659,18 +659,18 @@ class Shell(Topology):
|
|
659
659
|
|
660
660
|
"""
|
661
661
|
|
662
|
-
from topologicpy.
|
662
|
+
from topologicpy.Vertex import Vertex
|
663
663
|
|
664
664
|
if not isinstance(shell, topologic.Shell):
|
665
665
|
return None
|
666
666
|
if not isinstance(vertex, topologic.Vertex):
|
667
667
|
return None
|
668
668
|
boundary = Shell.ExternalBoundary(shell, tolerance=tolerance)
|
669
|
-
if
|
669
|
+
if Vertex.IsInternal(vertex, boundary, tolerance=tolerance):
|
670
670
|
return True
|
671
671
|
internal_boundaries = Shell.InternalBoundaries(shell, tolerance=tolerance)
|
672
672
|
for ib in internal_boundaries:
|
673
|
-
if
|
673
|
+
if Vertex.IsInternal(vertex, ib, tolerance=tolerance):
|
674
674
|
return True
|
675
675
|
return False
|
676
676
|
|
@@ -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:
|
@@ -914,7 +914,15 @@ class Topology():
|
|
914
914
|
return None
|
915
915
|
# Edge:
|
916
916
|
elif isinstance(topologyA, topologic.Edge):
|
917
|
-
if isinstance(topologyB, topologic.
|
917
|
+
if isinstance(topologyB, topologic.Wire):
|
918
|
+
vertices = Topology.Vertices(topologyB)
|
919
|
+
edges = Topology.Edges(topologyB)
|
920
|
+
intersections = [topologyA.Intersect(x) for x in vertices]
|
921
|
+
intersections += [topologyA.Intersect(x) for x in edges]
|
922
|
+
intersections = [x for x in intersections if not x == None]
|
923
|
+
if len(intersections) == 0:
|
924
|
+
return None
|
925
|
+
elif isinstance(topologyB, topologic.Shell):
|
918
926
|
vertices = Topology.Vertices(topologyB)
|
919
927
|
edges = Topology.Edges(topologyB)
|
920
928
|
faces = Topology.Faces(topologyB)
|
@@ -3599,7 +3607,6 @@ class Topology():
|
|
3599
3607
|
return_topology = Cell.ByFaces(faces, tolerance=tolerance)
|
3600
3608
|
if return_topology == None:
|
3601
3609
|
return_topology = CellComplex.ByFaces(faces, tolerance=tolerance)
|
3602
|
-
#print("Return Topology:", return_topology)
|
3603
3610
|
if return_topology == None:
|
3604
3611
|
print("Topology.Fix - Error: Desired topologyType cannot be achieved. Returning original topology.")
|
3605
3612
|
return topology
|
@@ -4389,7 +4396,6 @@ class Topology():
|
|
4389
4396
|
return [a,b,c,d]
|
4390
4397
|
|
4391
4398
|
if not isinstance(topology, topologic.Topology):
|
4392
|
-
print("Topology.IsPlanar", topology)
|
4393
4399
|
print("Topology.IsPlanar - Error: the input topology parameter is not a valid topology. Returning None.")
|
4394
4400
|
return None
|
4395
4401
|
vertices = Topology.Vertices(topology)
|
@@ -5138,7 +5144,7 @@ class Topology():
|
|
5138
5144
|
|
5139
5145
|
"""
|
5140
5146
|
if not len(verticesA) == len(verticesB):
|
5141
|
-
print("
|
5147
|
+
print("Topology.ReplaceVertices - Error: The input parameters verticesA and verticesB must be the same length")
|
5142
5148
|
return None
|
5143
5149
|
from topologicpy.Vertex import Vertex
|
5144
5150
|
geom = Topology.Geometry(topology, mantissa=mantissa)
|
@@ -5186,6 +5192,7 @@ class Topology():
|
|
5186
5192
|
|
5187
5193
|
"""
|
5188
5194
|
from topologicpy.Vertex import Vertex
|
5195
|
+
from topologicpy.Dictionary import Dictionary
|
5189
5196
|
|
5190
5197
|
def rotate_vertex_3d(vertex, axis, angle_degrees, origin):
|
5191
5198
|
vertex = np.array(vertex) # Vertex to be rotated
|
@@ -5208,12 +5215,11 @@ class Topology():
|
|
5208
5215
|
translated_vertex = vertex - origin
|
5209
5216
|
rotated_vertex = np.dot(rotation_matrix, translated_vertex) + origin
|
5210
5217
|
|
5211
|
-
rotated_vertex = [v for v in rotated_vertex]
|
5218
|
+
rotated_vertex = [v for v in rotated_vertex]
|
5212
5219
|
return rotated_vertex
|
5213
5220
|
|
5214
5221
|
if not isinstance(topology, topologic.Topology):
|
5215
5222
|
print("Topology.Rotate - Error: The input topology parameter is not a valid topologic topology. Returning None.")
|
5216
|
-
print("The topology is", topology)
|
5217
5223
|
return None
|
5218
5224
|
if not origin:
|
5219
5225
|
origin = Vertex.ByCoordinates(0,0,0)
|
@@ -6468,7 +6474,6 @@ class Topology():
|
|
6468
6474
|
for i, sink in enumerate(sink_items):
|
6469
6475
|
mapItem = sinkMap[sink.ID]
|
6470
6476
|
newDict = Dictionary.ByKeysValues(mapItem.sinkKeys, mapItem.sinkValues)
|
6471
|
-
# print("newDict", Dictionary.Keys(newDict), Dictionary.Values(newDict))
|
6472
6477
|
_ = sinks[i].SetDictionary(newDict)
|
6473
6478
|
return {"sources": sources, "sinks": sinks}
|
6474
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
|
-
|
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):
|
@@ -2906,6 +2906,21 @@ class Wire(Topology):
|
|
2906
2906
|
|
2907
2907
|
"""
|
2908
2908
|
from topologicpy.Vertex import Vertex
|
2909
|
+
def compute_u(u):
|
2910
|
+
def count_decimal_places(number):
|
2911
|
+
try:
|
2912
|
+
# Convert the number to a string to analyze decimal places
|
2913
|
+
num_str = str(number)
|
2914
|
+
# Split the number into integer and decimal parts
|
2915
|
+
integer_part, decimal_part = num_str.split('.')
|
2916
|
+
# Return the length of the decimal part
|
2917
|
+
return len(decimal_part)
|
2918
|
+
except ValueError:
|
2919
|
+
# If there's no decimal part, return 0
|
2920
|
+
return 0
|
2921
|
+
dp = count_decimal_places(u)
|
2922
|
+
u = -(int(u) - u)
|
2923
|
+
return round(u,dp)
|
2909
2924
|
|
2910
2925
|
if not isinstance(wire, topologic.Wire):
|
2911
2926
|
print("Wire.VertexByDistance - Error: The input wire parameter is not a valid topologic wire. Returning None.")
|
@@ -2918,9 +2933,6 @@ class Wire(Topology):
|
|
2918
2933
|
return Wire.StartVertex(wire)
|
2919
2934
|
if abs(distance - wire_length) < tolerance:
|
2920
2935
|
return Wire.EndVertex(wire)
|
2921
|
-
if abs(distance) > wire_length:
|
2922
|
-
print("Wire.VertexByDistance - Error: The input distance parameter is larger than the wire's length. Returning None.")
|
2923
|
-
return None
|
2924
2936
|
if not Wire.IsManifold(wire):
|
2925
2937
|
print("Wire.VertexAtParameter - Error: The input wire parameter is non-manifold. Returning None.")
|
2926
2938
|
return None
|
@@ -2929,18 +2941,9 @@ class Wire(Topology):
|
|
2929
2941
|
if not isinstance(origin, topologic.Vertex):
|
2930
2942
|
print("Wire.VertexByDistance - Error: The input origin parameter is not a valid topologic vertex. Returning None.")
|
2931
2943
|
return None
|
2932
|
-
if not
|
2944
|
+
if not Vertex.IsInternal(origin, wire, tolerance=tolerance):
|
2933
2945
|
print("Wire.VertexByDistance - Error: The input origin parameter is not internal to the input wire parameter. Returning None.")
|
2934
2946
|
return None
|
2935
|
-
if distance < 0:
|
2936
|
-
if Wire.VertexDistance(wire, Wire.StartVertex(wire), origin) < abs(distance):
|
2937
|
-
print("Wire.VertexByDistance - Error: The resulting vertex would fall outside the wire. Returning None.")
|
2938
|
-
return None
|
2939
|
-
else:
|
2940
|
-
if Wire.VertexDistance(wire, Wire.EndVertex(wire), origin) < distance:
|
2941
|
-
print("Wire.VertexByDistance - Error: The resulting vertex would fall outside the wire. Returning None.")
|
2942
|
-
return None
|
2943
|
-
|
2944
2947
|
if Vertex.Distance(Wire.StartVertex(wire), origin) < tolerance:
|
2945
2948
|
u = distance/wire_length
|
2946
2949
|
elif Vertex.Distance(Wire.EndVertex(wire), origin) < tolerance:
|
@@ -2948,7 +2951,8 @@ class Wire(Topology):
|
|
2948
2951
|
else:
|
2949
2952
|
d = Wire.VertexDistance(wire, origin) + distance
|
2950
2953
|
u = d/wire_length
|
2951
|
-
|
2954
|
+
|
2955
|
+
return Wire.VertexByParameter(wire, u=compute_u(u))
|
2952
2956
|
|
2953
2957
|
@staticmethod
|
2954
2958
|
def VertexByParameter(wire: topologic.Wire, u: float = 0) -> topologic.Vertex:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: topologicpy
|
3
|
-
Version: 0.4.
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/linux/topologic/libgcc_s-32c1665e.so.1
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKBO-f6b191de.dll
RENAMED
File without changes
|
{topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKBRep-e56a600e.dll
RENAMED
File without changes
|
{topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKBool-7b8d47ae.dll
RENAMED
File without changes
|
File without changes
|
{topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKG2d-2e2dee3d.dll
RENAMED
File without changes
|
{topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKG3d-6674513d.dll
RENAMED
File without changes
|
File without changes
|
File without changes
|
{topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKMath-45bd625a.dll
RENAMED
File without changes
|
{topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKMesh-d6e826b1.dll
RENAMED
File without changes
|
File without changes
|
{topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKPrim-aa430a86.dll
RENAMED
File without changes
|
File without changes
|
File without changes
|
{topologicpy-0.4.96 → topologicpy-0.4.98}/src/topologicpy/bin/windows/topologic/TKernel-08c8cfbb.dll
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|