topologicpy 0.4.55__py3-none-any.whl → 0.4.57__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.
Files changed (50) hide show
  1. topologicpy/Cell.py +95 -22
  2. topologicpy/CellComplex.py +36 -5
  3. topologicpy/DGL.py +4 -1
  4. topologicpy/Edge.py +1 -1
  5. topologicpy/Face.py +86 -64
  6. topologicpy/Graph.py +37 -34
  7. topologicpy/Helper.py +83 -44
  8. topologicpy/Plotly.py +15 -14
  9. topologicpy/Shell.py +70 -28
  10. topologicpy/Topology.py +155 -174
  11. topologicpy/Wire.py +64 -146
  12. topologicpy/__init__.py +22 -22
  13. topologicpy/bin/linux/topologic/__init__.py +2 -2
  14. topologicpy/bin/linux/topologic/topologic.cpython-310-x86_64-linux-gnu.so +0 -0
  15. topologicpy/bin/linux/topologic/topologic.cpython-311-x86_64-linux-gnu.so +0 -0
  16. topologicpy/bin/linux/topologic/topologic.cpython-38-x86_64-linux-gnu.so +0 -0
  17. topologicpy/bin/linux/topologic/topologic.cpython-39-x86_64-linux-gnu.so +0 -0
  18. topologicpy/bin/linux/topologic.libs/libTKBO-6bdf205d.so.7.7.0 +0 -0
  19. topologicpy/bin/linux/topologic.libs/libTKBRep-2960a069.so.7.7.0 +0 -0
  20. topologicpy/bin/linux/topologic.libs/libTKBool-c44b74bd.so.7.7.0 +0 -0
  21. topologicpy/bin/linux/topologic.libs/libTKFillet-9a670ba0.so.7.7.0 +0 -0
  22. topologicpy/bin/linux/topologic.libs/libTKG2d-8f31849e.so.7.7.0 +0 -0
  23. topologicpy/bin/linux/topologic.libs/libTKG3d-4c6bce57.so.7.7.0 +0 -0
  24. topologicpy/bin/linux/topologic.libs/libTKGeomAlgo-26066fd9.so.7.7.0 +0 -0
  25. topologicpy/bin/linux/topologic.libs/libTKGeomBase-2116cabe.so.7.7.0 +0 -0
  26. topologicpy/bin/linux/topologic.libs/libTKMath-72572fa8.so.7.7.0 +0 -0
  27. topologicpy/bin/linux/topologic.libs/libTKMesh-2a060427.so.7.7.0 +0 -0
  28. topologicpy/bin/linux/topologic.libs/libTKOffset-6cab68ff.so.7.7.0 +0 -0
  29. topologicpy/bin/linux/topologic.libs/libTKPrim-eb1262b3.so.7.7.0 +0 -0
  30. topologicpy/bin/linux/topologic.libs/libTKShHealing-e67e5cc7.so.7.7.0 +0 -0
  31. topologicpy/bin/linux/topologic.libs/libTKTopAlgo-e4c96c33.so.7.7.0 +0 -0
  32. topologicpy/bin/linux/topologic.libs/libTKernel-fb7fe3b7.so.7.7.0 +0 -0
  33. topologicpy/bin/linux/topologic.libs/libgcc_s-32c1665e.so.1 +0 -0
  34. topologicpy/bin/linux/topologic.libs/libstdc++-672d7b41.so.6.0.30 +0 -0
  35. topologicpy/bin/macos/topologic/__init__.py +2 -2
  36. topologicpy/bin/windows/topologic/topologic.cp310-win_amd64.pyd +0 -0
  37. topologicpy/bin/windows/topologic/topologic.cp311-win_amd64.pyd +0 -0
  38. topologicpy/bin/windows/topologic/topologic.cp38-win_amd64.pyd +0 -0
  39. topologicpy/bin/windows/topologic/topologic.cp39-win_amd64.pyd +0 -0
  40. {topologicpy-0.4.55.dist-info → topologicpy-0.4.57.dist-info}/METADATA +1 -1
  41. {topologicpy-0.4.55.dist-info → topologicpy-0.4.57.dist-info}/RECORD +44 -48
  42. topologicpy/bin/linux/topologic.libs/libgcc_s-b928ac34.so.1 +0 -0
  43. topologicpy/bin/linux/topologic.libs/libstdc++-e9ef912c.so.6.0.32 +0 -0
  44. topologicpy/bin/macos/topologic/topologic.cpython-310-darwin.so +0 -0
  45. topologicpy/bin/macos/topologic/topologic.cpython-311-darwin.so +0 -0
  46. topologicpy/bin/macos/topologic/topologic.cpython-38-darwin.so +0 -0
  47. topologicpy/bin/macos/topologic/topologic.cpython-39-darwin.so +0 -0
  48. {topologicpy-0.4.55.dist-info → topologicpy-0.4.57.dist-info}/LICENSE +0 -0
  49. {topologicpy-0.4.55.dist-info → topologicpy-0.4.57.dist-info}/WHEEL +0 -0
  50. {topologicpy-0.4.55.dist-info → topologicpy-0.4.57.dist-info}/top_level.txt +0 -0
topologicpy/Wire.py CHANGED
@@ -145,7 +145,7 @@ class Wire(topologic.Wire):
145
145
  if not isinstance(topology, topologic.Topology):
146
146
  return None
147
147
 
148
- world_origin = Vertex.ByCoordinates(0,0,0)
148
+ world_origin = Vertex.Origin()
149
149
 
150
150
  vertices = Topology.SubTopologies(topology=topology, subTopologyType="vertex")
151
151
  start = time.time()
@@ -161,11 +161,13 @@ class Wire(topologic.Wire):
161
161
  return None
162
162
  w = Wire.ByVertices(vList)
163
163
  f = Face.ByWire(w, tolerance=tolerance)
164
- f = Face.Flatten(f, tolerance=tolerance)
164
+ f_origin = Topology.Centroid(f)
165
+ normal = Face.Normal(f)
166
+ f = Topology.Flatten(f, origin=f_origin, direction=normal)
165
167
  dictionary = Topology.Dictionary(f)
166
- xTran = Dictionary.ValueAtKey(dictionary,"xTran")
167
- yTran = Dictionary.ValueAtKey(dictionary,"yTran")
168
- zTran = Dictionary.ValueAtKey(dictionary,"zTran")
168
+ xTran = Dictionary.ValueAtKey(dictionary,"x")
169
+ yTran = Dictionary.ValueAtKey(dictionary,"y")
170
+ zTran = Dictionary.ValueAtKey(dictionary,"z")
169
171
  phi = Dictionary.ValueAtKey(dictionary,"phi")
170
172
  theta = Dictionary.ValueAtKey(dictionary,"theta")
171
173
 
@@ -337,14 +339,16 @@ class Wire(topologic.Wire):
337
339
  if not miterThreshold:
338
340
  miterThreshold = offset*math.sqrt(2)
339
341
  flatFace = Face.ByWire(wire, tolerance=tolerance)
340
- flatFace = Face.Flatten(flatFace, tolerance=tolerance)
342
+ origin = Topology.Centroid(flatFace)
343
+ normal = Face.Normal(flatFace)
344
+ flatFace = Topology.Flatten(flatFace, origin=origin, direction=normal)
341
345
 
342
346
  world_origin = Vertex.ByCoordinates(0,0,0)
343
347
  # Retrieve the needed transformations
344
348
  dictionary = Topology.Dictionary(flatFace)
345
- xTran = Dictionary.ValueAtKey(dictionary,"xTran")
346
- yTran = Dictionary.ValueAtKey(dictionary,"yTran")
347
- zTran = Dictionary.ValueAtKey(dictionary,"zTran")
349
+ xTran = Dictionary.ValueAtKey(dictionary,"x")
350
+ yTran = Dictionary.ValueAtKey(dictionary,"y")
351
+ zTran = Dictionary.ValueAtKey(dictionary,"z")
348
352
  phi = Dictionary.ValueAtKey(dictionary,"phi")
349
353
  theta = Dictionary.ValueAtKey(dictionary,"theta")
350
354
 
@@ -533,16 +537,14 @@ class Wire(topologic.Wire):
533
537
  for i in range(len(vertexList)-1):
534
538
  v1 = vertexList[i]
535
539
  v2 = vertexList[i+1]
536
- e = Edge.ByStartVertexEndVertex(v1, v2, tolerance=tolerance)
537
- if e:
540
+ e = Edge.ByStartVertexEndVertex(v1, v2, tolerance=tolerance, verbose=False)
541
+ if isinstance(e, topologic.Edge):
538
542
  edges.append(e)
539
- else:
540
- print(Vertex.Coordinates(v1), Vertex.Coordinates(v2))
541
543
  if close:
542
544
  v1 = vertexList[-1]
543
545
  v2 = vertexList[0]
544
546
  e = Edge.ByStartVertexEndVertex(v1, v2, tolerance=tolerance, verbose=False)
545
- if e:
547
+ if isinstance(e, topologic.Edge):
546
548
  edges.append(e)
547
549
  if len(edges) < 1:
548
550
  print("Wire.ByVertices - Error: The number of edges is less than 1. Returning None.")
@@ -844,11 +846,13 @@ class Wire(topologic.Wire):
844
846
  v = sample(vertices, 3)
845
847
  w = Wire.ByVertices(v)
846
848
  f = Face.ByWire(w, tolerance=tolerance)
847
- f = Face.Flatten(f, tolerance=tolerance)
849
+ origin = Topology.Centroid(f)
850
+ normal = Face.Normal(f)
851
+ f = Topology.Flatten(f, origin=origin, direction=normal)
848
852
  dictionary = Topology.Dictionary(f)
849
- xTran = Dictionary.ValueAtKey(dictionary,"xTran")
850
- yTran = Dictionary.ValueAtKey(dictionary,"yTran")
851
- zTran = Dictionary.ValueAtKey(dictionary,"zTran")
853
+ xTran = Dictionary.ValueAtKey(dictionary,"x")
854
+ yTran = Dictionary.ValueAtKey(dictionary,"y")
855
+ zTran = Dictionary.ValueAtKey(dictionary,"z")
852
856
  phi = Dictionary.ValueAtKey(dictionary,"phi")
853
857
  theta = Dictionary.ValueAtKey(dictionary,"theta")
854
858
 
@@ -984,9 +988,9 @@ class Wire(topologic.Wire):
984
988
  for j in range(len(c)-1):
985
989
  v1 = c[j]
986
990
  v2 = c[j+1]
987
- e = Edge.ByStartVertexEndVertex(v1, v2, tolerance=tolerance)
991
+ e = Edge.ByStartVertexEndVertex(v1, v2, tolerance=tolerance, verbose=False)
988
992
  resultEdges.append(e)
989
- e = Edge.ByStartVertexEndVertex(c[len(c)-1], c[0], tolerance=tolerance)
993
+ e = Edge.ByStartVertexEndVertex(c[len(c)-1], c[0], tolerance=tolerance, verbose=False)
990
994
  resultEdges.append(e)
991
995
  resultWire = Wire.ByEdges(resultEdges, tolerance=tolerance)
992
996
  resultWires.append(resultWire)
@@ -1301,112 +1305,6 @@ class Wire(topologic.Wire):
1301
1305
  sv, ev = Wire.StartEndVertices(wire)
1302
1306
  return ev
1303
1307
 
1304
- @staticmethod
1305
- def Flatten(wire: topologic.Wire, oldLocation: topologic.Vertex =None,
1306
- newLocation: topologic.Vertex = None,
1307
- direction: list = None, tolerance: float = 0.0001):
1308
- """
1309
- Flattens the input wire such that its center of mass is located at the origin and the specified direction is pointed in the positive Z axis.
1310
-
1311
- Parameters
1312
- ----------
1313
- wire : topologic.Wire
1314
- The input wire.
1315
- oldLocation : topologic.Vertex , optional
1316
- The old location to use as the origin of the movement. If set to None, the center of mass of the input topology is used. The default is None.
1317
- newLocation : topologic.Vertex , optional
1318
- The new location at which to place the topology. If set to None, the world origin (0,0,0) is used. The default is None.
1319
- direction : list , optional
1320
- The direction, expressed as a list of [X,Y,Z] that signifies the direction of the wire. If set to None, the positive ZAxis direction is considered the direction of the wire. The default is None.
1321
- tolerance : float , optional
1322
- The desired tolerance. The default is 0.0001.
1323
-
1324
- Returns
1325
- -------
1326
- topologic.Wire
1327
- The flattened wire.
1328
-
1329
- """
1330
- from topologicpy.Vertex import Vertex
1331
- from topologicpy.Edge import Edge
1332
- from topologicpy.Cluster import Cluster
1333
- from topologicpy.Topology import Topology
1334
- from topologicpy.Dictionary import Dictionary
1335
- from topologicpy.Vector import Vector
1336
- def cross(p1, p2, p3):
1337
- a = [p2[0] - p1[0], p2[1] - p1[1], p2[2] - p1[2]]
1338
- b = [p3[0] - p3[0], p3[1] - p1[1], p2[2] - p1[2]]
1339
- c = [a[1]*b[2] - a[2]*b[1],
1340
- a[2]*b[0] - a[0]*b[2],
1341
- a[0]*b[1] - a[1]*b[0]]
1342
- return c
1343
-
1344
- def calc_cross(p1, p2, p3):
1345
- v1 = [p2[0] - p1[0], p2[1] - p1[1], p2[2] - p1[2]]
1346
- v2 = [p3[0] - p3[0], p3[1] - p1[1], p2[2] - p1[2]]
1347
- v3 = np.cross(v1, v2)
1348
- return [x for x in (v3 / np.linalg.norm(v3))]
1349
-
1350
- if not isinstance(wire, topologic.Wire):
1351
- print("Wire.Flatten - Error: The input wire parameter is not a valid topologic Wire. Returning None.")
1352
- return None
1353
- if direction == None:
1354
- vertices = Topology.Vertices(wire)
1355
- v1 = Vertex.Coordinates(Topology.Centroid(wire))
1356
- v2 = Vertex.Coordinates(vertices[0])
1357
- v3 = Vertex.Coordinates(vertices[1])
1358
- direction = cross(v1, v2, v3)
1359
- #direction = Vector.ZAxis()
1360
- if not isinstance(oldLocation, topologic.Vertex):
1361
- oldLocation = Topology.CenterOfMass(wire)
1362
- if not isinstance(newLocation, topologic.Vertex):
1363
- newLocation = Vertex.ByCoordinates(0,0,0)
1364
- cm = oldLocation
1365
- world_origin = newLocation
1366
-
1367
- x1 = Vertex.X(cm)
1368
- y1 = Vertex.Y(cm)
1369
- z1 = Vertex.Z(cm)
1370
- x2 = Vertex.X(cm) + direction[0]
1371
- y2 = Vertex.Y(cm) + direction[1]
1372
- z2 = Vertex.Z(cm) + direction[2]
1373
- dx = x2 - x1
1374
- dy = y2 - y1
1375
- dz = z2 - z1
1376
- dist = math.sqrt(dx**2 + dy**2 + dz**2)
1377
- phi = math.degrees(math.atan2(dy, dx)) # Rotation around Y-Axis
1378
- if dist < 0.0001:
1379
- theta = 0
1380
- else:
1381
- theta = math.degrees(math.acos(dz/dist)) # Rotation around Z-Axis
1382
- flatWire = Topology.Translate(wire, -cm.X(), -cm.Y(), -cm.Z())
1383
- flatWire = Topology.Rotate(flatWire, world_origin, 0, 0, 1, -phi)
1384
- flatWire = Topology.Rotate(flatWire, world_origin, 0, 1, 0, -theta)
1385
- if not isinstance(flatWire, topologic.Wire):
1386
- print("1. Wire.Flatten - Error: The flat wire is not a valid topologic wire.", flatWire)
1387
- return None
1388
- # Ensure flatness. Force Z to be zero
1389
- edges = Wire.Edges(flatWire)
1390
- flatEdges = []
1391
- for edge in edges:
1392
- sv = Edge.StartVertex(edge)
1393
- ev = Edge.EndVertex(edge)
1394
- sv1 = Vertex.ByCoordinates(Vertex.X(sv), Vertex.Y(sv), 0)
1395
- ev1 = Vertex.ByCoordinates(Vertex.X(ev), Vertex.Y(ev), 0)
1396
- e1 = Edge.ByVertices([sv1, ev1], tolerance=tolerance)
1397
- flatEdges.append(e1)
1398
- flatWire = Wire.ByEdges(flatEdges, tolerance=tolerance)
1399
- if not isinstance(flatWire, topologic.Wire):
1400
- print("2. Wire.Flatten - Error: The flat wire is not a valid topologic wire.", flatWire)
1401
- clus = Cluster.ByTopologies(flatEdges)
1402
- flatWire = Topology.SelfMerge(Cluster.ByTopologies(flatEdges), tolerance=tolerance)
1403
- if not isinstance(flatWire, topologic.Wire):
1404
- print("3. Wire.Flatten - Error: The flat wire is not a valid topologic wire. Giving up!", flatWire)
1405
- return None
1406
- dictionary = Dictionary.ByKeysValues(["xTran", "yTran", "zTran", "phi", "theta"], [cm.X(), cm.Y(), cm.Z(), phi, theta])
1407
- flatWire = Topology.SetDictionary(flatWire, dictionary)
1408
- return flatWire
1409
-
1410
1308
  @staticmethod
1411
1309
  def Interpolate(wires: list, n: int = 5, outputType: str = "default", replication: str = "default", tolerance: float = 0.0001) -> topologic.Topology:
1412
1310
  """
@@ -1707,17 +1605,17 @@ class Wire(topologic.Wire):
1707
1605
  scaleFactor = maxDistance/d
1708
1606
  newV = Topology.Scale(aVertex, viewPoint, scaleFactor, scaleFactor, scaleFactor)
1709
1607
  try:
1710
- ray = Edge.ByStartVertexEndVertex(viewPoint, newV, tolerance=tolerance)
1608
+ ray = Edge.ByStartVertexEndVertex(viewPoint, newV, tolerance=tolerance, verbose=False)
1711
1609
  topologyC = ray.Intersect(wire, False)
1712
1610
  vertices = []
1713
1611
  _ = topologyC.Vertices(None, vertices)
1714
1612
  if topologyC:
1715
1613
  try:
1716
- rays.append(Edge.ByStartVertexEndVertex(viewPoint, vertices[0], tolerance=tolerance))
1614
+ rays.append(Edge.ByStartVertexEndVertex(viewPoint, vertices[0], tolerance=tolerance, verbose=False))
1717
1615
  except:
1718
1616
  pass
1719
1617
  try:
1720
- rays.append(Edge.ByStartVertexEndVertex(viewPoint, aVertex, tolerance=tolerance))
1618
+ rays.append(Edge.ByStartVertexEndVertex(viewPoint, aVertex, tolerance=tolerance, verbose=False))
1721
1619
  except:
1722
1620
  pass
1723
1621
  except:
@@ -1873,7 +1771,7 @@ class Wire(topologic.Wire):
1873
1771
  Returns
1874
1772
  -------
1875
1773
  float
1876
- The length of the input wire.
1774
+ The length of the input wire. Test
1877
1775
 
1878
1776
  """
1879
1777
  if not wire:
@@ -2020,7 +1918,7 @@ class Wire(topologic.Wire):
2020
1918
  face : topologic.Face
2021
1919
  The face unto which to project the input wire.
2022
1920
  direction : list, optional
2023
- The vector direction of the projection. If None, the reverse vector of the receiving face normal will be used. The default is None.
1921
+ The vector representing the direction of the projection. If None, the reverse vector of the receiving face normal will be used. The default is None.
2024
1922
  mantissa : int , optional
2025
1923
  The desired length of the mantissa. The default is 4.
2026
1924
  tolerance : float , optional
@@ -2160,19 +2058,36 @@ class Wire(topologic.Wire):
2160
2058
  The created wire without any collinear edges.
2161
2059
 
2162
2060
  """
2061
+ from topologicpy.Vertex import Vertex
2163
2062
  from topologicpy.Edge import Edge
2164
2063
  from topologicpy.Wire import Wire
2064
+ from topologicpy.Cluster import Cluster
2065
+ from topologicpy.Topology import Topology
2066
+
2067
+ def cleanup(wire, tolerance):
2068
+ vertices = Topology.Vertices(wire)
2069
+ vertices = Vertex.Fuse(vertices, tolerance=tolerance)
2070
+ edges = Topology.Edges(wire)
2071
+ new_edges = []
2072
+ for edge in edges:
2073
+ sv = Edge.StartVertex(edge)
2074
+ sv = vertices[Vertex.Index(sv, vertices)]
2075
+ ev = Edge.EndVertex(edge)
2076
+ ev = vertices[Vertex.Index(ev, vertices)]
2077
+ new_edges.append(Edge.ByVertices([sv,ev]))
2078
+ new_wire = Topology.SelfMerge(Cluster.ByTopologies(new_edges))
2079
+ return new_wire
2165
2080
 
2166
2081
  def rce(wire, angTolerance=0.1):
2167
2082
  if not isinstance(wire, topologic.Wire):
2168
- return None
2083
+ return wire
2169
2084
  final_wire = None
2170
2085
  vertices = []
2171
2086
  wire_verts = []
2172
2087
  try:
2173
2088
  _ = wire.Vertices(None, vertices)
2174
2089
  except:
2175
- return None
2090
+ return wire
2176
2091
  for aVertex in vertices:
2177
2092
  edges = []
2178
2093
  _ = aVertex.Edges(wire, edges)
@@ -2183,17 +2098,18 @@ class Wire(topologic.Wire):
2183
2098
  wire_verts.append(aVertex)
2184
2099
  if len(wire_verts) > 2:
2185
2100
  if wire.IsClosed():
2186
- final_wire = Wire.ByVertices(wire_verts, True)
2101
+ final_wire = Wire.ByVertices(wire_verts, close=True)
2187
2102
  else:
2188
- final_wire = Wire.ByVertices(wire_verts, False)
2103
+ final_wire = Wire.ByVertices(wire_verts, close=False)
2189
2104
  elif len(wire_verts) == 2:
2190
- final_wire = Edge.ByStartVertexEndVertex(wire_verts[0], wire_verts[1], tolerance=tolerance)
2105
+ final_wire = Edge.ByStartVertexEndVertex(wire_verts[0], wire_verts[1], tolerance=tolerance, verbose=False)
2191
2106
  return final_wire
2192
2107
 
2193
- if not topologic.Topology.IsManifold(wire, wire):
2194
- wires = Wire.Split(wire)
2108
+ new_wire = cleanup(wire, tolerance=tolerance)
2109
+ if not topologic.Topology.IsManifold(new_wire, new_wire):
2110
+ wires = Wire.Split(new_wire)
2195
2111
  else:
2196
- wires = [wire]
2112
+ wires = [new_wire]
2197
2113
  returnWires = []
2198
2114
  for aWire in wires:
2199
2115
  if not isinstance(aWire, topologic.Wire):
@@ -2207,7 +2123,7 @@ class Wire(topologic.Wire):
2207
2123
  elif isinstance(returnWire, topologic.Wire):
2208
2124
  return returnWire
2209
2125
  else:
2210
- return None
2126
+ return wire
2211
2127
  elif len(returnWires) > 1:
2212
2128
  returnWire = topologic.Cluster.ByTopologies(returnWires).SelfMerge()
2213
2129
  if isinstance(returnWire, topologic.Edge):
@@ -2215,9 +2131,9 @@ class Wire(topologic.Wire):
2215
2131
  elif isinstance(returnWire, topologic.Wire):
2216
2132
  return returnWire
2217
2133
  else:
2218
- return None
2134
+ return wire
2219
2135
  else:
2220
- return None
2136
+ return wire
2221
2137
 
2222
2138
  def Roof(face, degree=45, tolerance=0.001):
2223
2139
  """
@@ -2318,14 +2234,16 @@ class Wire(topologic.Wire):
2318
2234
  degree = abs(degree)
2319
2235
  if degree >= 90-tolerance:
2320
2236
  return None
2321
- flat_face = Face.Flatten(face, tolerance=tolerance)
2237
+ origin = Topology.Centroid(face)
2238
+ normal = Face.Normal(face)
2239
+ flat_face = Topology.Flatten(face, origin=origin, direction=normal)
2322
2240
  d = Topology.Dictionary(flat_face)
2323
2241
  roof = face_to_skeleton(flat_face, degree)
2324
2242
  if not roof:
2325
2243
  return None
2326
- xTran = Dictionary.ValueAtKey(d,"xTran")
2327
- yTran = Dictionary.ValueAtKey(d,"yTran")
2328
- zTran = Dictionary.ValueAtKey(d,"zTran")
2244
+ xTran = Dictionary.ValueAtKey(d,"x")
2245
+ yTran = Dictionary.ValueAtKey(d,"y")
2246
+ zTran = Dictionary.ValueAtKey(d,"z")
2329
2247
  phi = Dictionary.ValueAtKey(d,"phi")
2330
2248
  theta = Dictionary.ValueAtKey(d,"theta")
2331
2249
  roof = Topology.Rotate(roof, origin=Vertex.Origin(), x=0, y=1, z=0, degree=theta)
topologicpy/__init__.py CHANGED
@@ -1,22 +1,22 @@
1
- import sys
2
- import os, re
3
- from sys import platform
4
-
5
- __version__ = '0.4.55'
6
- __version_info__ = tuple([ int(num) for num in __version__.split('.')])
7
-
8
- if platform == 'win32':
9
- os_name = 'windows'
10
- elif platform == "darwin":
11
- os_name = 'macos'
12
- else:
13
- os_name = 'linux'
14
-
15
- sitePackagesFolderName = os.path.join(os.path.dirname(os.path.realpath(__file__)), "bin", os_name)
16
- test1 = os.path.dirname(os.path.realpath(__file__))
17
- topologicFolderName = [filename for filename in os.listdir(sitePackagesFolderName) if filename.startswith("topologic")][0]
18
- topologicPath = os.path.join(sitePackagesFolderName, topologicFolderName)
19
- sys.path.append(topologicPath.replace(".libs",""))
20
-
21
- import topologic
22
-
1
+ import sys
2
+ import os, re
3
+ from sys import platform
4
+
5
+ __version__ = '0.4.57'
6
+ __version_info__ = tuple([ int(num) for num in __version__.split('.')])
7
+
8
+ if platform == 'win32':
9
+ os_name = 'windows'
10
+ elif platform == "darwin":
11
+ os_name = 'macos'
12
+ else:
13
+ os_name = 'linux'
14
+
15
+ sitePackagesFolderName = os.path.join(os.path.dirname(os.path.realpath(__file__)), "bin", os_name)
16
+ test1 = os.path.dirname(os.path.realpath(__file__))
17
+ topologicFolderName = [filename for filename in os.listdir(sitePackagesFolderName) if filename.startswith("topologic")][0]
18
+ topologicPath = os.path.join(sitePackagesFolderName, topologicFolderName)
19
+ sys.path.append(topologicPath.replace(".libs",""))
20
+
21
+ import topologic
22
+
@@ -1,2 +1,2 @@
1
- # re-export the extension module
2
- from .topologic import *
1
+ # re-export the extension module
2
+ from .topologic import *
@@ -1,2 +1,2 @@
1
- # re-export the extension module
2
- from .topologic import *
1
+ # re-export the extension module
2
+ from .topologic import *
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: topologicpy
3
- Version: 0.4.55
3
+ Version: 0.4.57
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
@@ -1,56 +1,52 @@
1
1
  topologicpy/Aperture.py,sha256=jNrvM_5dnVGF6yvSfJCF0L1QXtgGoSv5od6T5vR8LJE,2087
2
- topologicpy/Cell.py,sha256=qYaNKk8h8ntjpSQj0AxhCUejmw9dz5KHmVsk9dMqUEI,78104
3
- topologicpy/CellComplex.py,sha256=2wfO31k2G_PgtKr1rgau1nFM-A5eYZWs1yJOsjxfTxc,35157
2
+ topologicpy/Cell.py,sha256=CQonJvie6NPozdrd5CVHeWCSMVSgT055KLkdzm77uMY,81025
3
+ topologicpy/CellComplex.py,sha256=eogmYhuhhndghZZ1j0HGcHbcAjS3P7gPf6EcsxOg3ts,36504
4
4
  topologicpy/Cluster.py,sha256=62rTLxyV10Df6M62rIUW7HOBz76EFfBWlmCP5bX9sjQ,39042
5
5
  topologicpy/Color.py,sha256=YRWPvyWjhIMUxG4cqWL-KBwmAtw07cFY6l_ftlex_3s,9741
6
6
  topologicpy/Context.py,sha256=j5TnPQlpK9NSGPnxy_7D_0Q7in-DyDQG_qNAlG_C0IM,2265
7
- topologicpy/DGL.py,sha256=-1GfZA9HmXywDjFIQwPcld5NL7YcnfTvgfqpvLsR28c,136209
7
+ topologicpy/DGL.py,sha256=8YxKxrEZ8V8OQOvQr8fO1nu45LiTfGWm_lJh770eP7w,136517
8
8
  topologicpy/Dictionary.py,sha256=rgXmYrDWhoaMsir3kg7mHv-dtZqWqvp9vDMqYp3MvPI,24067
9
- topologicpy/Edge.py,sha256=3uNGBEskfYtOrKJwRj00ofHfBJTtLWA8rZdp807910I,44352
9
+ topologicpy/Edge.py,sha256=-xGhloh6FtbPNwMdlAMi1Eu11_uzIq3ZdYRalgk1Zjo,44367
10
10
  topologicpy/EnergyModel.py,sha256=a1fcI8ZAewyFWsoLv3Vu84FCEPXXp4ubOE2-O7FgnOc,50923
11
- topologicpy/Face.py,sha256=TNEyGyLS7xyTy0LlubcjJCKGhVL7vDU-8xxvi3s4iug,85141
12
- topologicpy/Graph.py,sha256=7XLe1KRbFasQCR3shHIkARAc8OstpZwHX7DOb86ttLs,261279
11
+ topologicpy/Face.py,sha256=qxaLLHLR-mIQZFEzT776enieWhySU6SSc3nX2Rawg98,86054
12
+ topologicpy/Graph.py,sha256=V1B0I25hNy5tUItiodv-3z9DRHkszLbT3wwyS4_tHp4,261732
13
13
  topologicpy/Grid.py,sha256=77WRTTqGxxIuUHorrH74JHeBS4E7v27ydzckIdu3K54,16661
14
- topologicpy/Helper.py,sha256=P9rfZijjPpx-aeLYtKpIngyn5ypbOIyelJV0TDk6pJ0,9472
14
+ topologicpy/Helper.py,sha256=QKlt2nmpgFgmpgdKnb9aKd0G-_RNrCV6ED84QiW3E3s,12541
15
15
  topologicpy/Honeybee.py,sha256=rlYWSILN1vJGg6ElEe7iMJ597Jv_VN6WNXUOc6Emuwk,19234
16
16
  topologicpy/Matrix.py,sha256=GHd_o714eEWbTOhRM5X-fXcgsV5yYJJSj6xFdnkwC14,7625
17
17
  topologicpy/Neo4j.py,sha256=FWGGmr_1uBFHG8ADgTF9AmXVIQwiZol2s7nunwq73a4,18568
18
- topologicpy/Plotly.py,sha256=VpoPZRfyozPpGtD0_ZlfFcgJQnuFT7hx4-pKZldXVxA,92025
18
+ topologicpy/Plotly.py,sha256=C1Gu-KX6gq9syAHQ-jg61fhu4uwbt839Nup1nrr6oGw,91917
19
19
  topologicpy/Polyskel.py,sha256=jz5k5H6p4QRWe3bbMnyYbP9Iji6EQ1wdk3qQvcnbg08,15156
20
- topologicpy/Shell.py,sha256=hODYrClZ79nwaMJKVFhbYRAlcHzV0_zw8U7HOhWA-60,79297
20
+ topologicpy/Shell.py,sha256=fyq_k1VsvZ5AYdDSXnggqNNTHggRXsqabVEpuabZ6Uo,80984
21
21
  topologicpy/Speckle.py,sha256=D6jk1uiHJeLHz478-hn8aWJCgbW9NFEkll84gRJbveA,14041
22
- topologicpy/Topology.py,sha256=0pw_lUVMQll-F9JYSMndOWbgDM1C-hz2j0ER_s9ci2I,284885
22
+ topologicpy/Topology.py,sha256=5ljh5sLJ8O-hA1oPnidOS8WtR2nzlfQLDiXIf77vstU,284827
23
23
  topologicpy/Vector.py,sha256=AWBPEaoDqcVM_TullugMvYBQ71MQZ0RCEYPG1_yccRk,18357
24
24
  topologicpy/Vertex.py,sha256=FAAXsvV424Rwl6cgNPjBnzSLqhd1Ngk60w_zJut1X8k,54133
25
- topologicpy/Wire.py,sha256=VN3AKfik0MdwaoQQEt_FA4UH05ACj2uCx6ai8zHESbA,132638
26
- topologicpy/__init__.py,sha256=8nqKVSFG7Xw3qgJakhjk6bHsgdDRmkyJ6FmvXMxMJWw,691
27
- topologicpy/bin/linux/topologic/__init__.py,sha256=qdj8gyp_GtYre27ZdFiVdLzLViOgX62woBZLTy9K91c,58
28
- topologicpy/bin/linux/topologic/topologic.cpython-310-x86_64-linux-gnu.so,sha256=ZhbYcLLnMSQ_qxjNGrTSybAezRU1kWbSL5WrXCN5sGM,1832928
29
- topologicpy/bin/linux/topologic/topologic.cpython-311-x86_64-linux-gnu.so,sha256=L4bHV93f6plcdgo0jfH8aPEpYRF2kyQEUaD6R0MP8sc,1832928
30
- topologicpy/bin/linux/topologic/topologic.cpython-38-x86_64-linux-gnu.so,sha256=kPTPEkdH5sM-PCrRc_uoxGI2iMLVOpMVX_IGZ6XBpGQ,1832872
31
- topologicpy/bin/linux/topologic/topologic.cpython-39-x86_64-linux-gnu.so,sha256=1ybCISBQsx4X3YURuXuwPQp8d29BHMRyqOlh9z3jUFM,1832920
32
- topologicpy/bin/linux/topologic.libs/libTKBO-6bdf205d.so.7.7.0,sha256=LR2iZgQeJySNeQAXrr-sULfipgE9hn-EFCIcb-PkHKc,2996488
33
- topologicpy/bin/linux/topologic.libs/libTKBRep-2960a069.so.7.7.0,sha256=Wdl_OJKOSog4rA_chjY8Fnpa58r5Gibmtq9-JDCG9g8,1378768
34
- topologicpy/bin/linux/topologic.libs/libTKBool-c44b74bd.so.7.7.0,sha256=b7JBB4jbbaGvj7jCixizu9jKs-aR2YNHWYdMUQn06FA,4697232
35
- topologicpy/bin/linux/topologic.libs/libTKFillet-9a670ba0.so.7.7.0,sha256=ao7DcEO_YOBGBkeO-tBEhQ3PknpXkhnFfvOxPwnNCg0,3263456
36
- topologicpy/bin/linux/topologic.libs/libTKG2d-8f31849e.so.7.7.0,sha256=L7qFyqYq-OmcmF_IGAezdllpgrYkNJ4rwHJytALnrrE,488728
37
- topologicpy/bin/linux/topologic.libs/libTKG3d-4c6bce57.so.7.7.0,sha256=COE3W2gRtTNgVuZmDsQe41y1lMu0n-ExGc9cPhzWHno,1492008
38
- topologicpy/bin/linux/topologic.libs/libTKGeomAlgo-26066fd9.so.7.7.0,sha256=J5M50uRulgj2t3PmJD70IZDRXZsOPj-87Ttjd8ZK1vE,6640056
39
- topologicpy/bin/linux/topologic.libs/libTKGeomBase-2116cabe.so.7.7.0,sha256=dOmUKviLBXBQXFX8N3J4q7kTvjM48gzf6TlG4CLO8hk,6145208
40
- topologicpy/bin/linux/topologic.libs/libTKMath-72572fa8.so.7.7.0,sha256=SCy8FmGMZeqMpi3_TmHJE5EFwGiLvQsNiJNqsvcdG_c,3148000
41
- topologicpy/bin/linux/topologic.libs/libTKMesh-2a060427.so.7.7.0,sha256=4BbPD7CVtR2zk8yGF1GGWXKlmiYgw526um85bjvZcq4,1247848
42
- topologicpy/bin/linux/topologic.libs/libTKOffset-6cab68ff.so.7.7.0,sha256=KIu6jVMhhd5Hy5PYg6RtFXJ_1KOgqfDrVh-e_sGUYU8,1840000
43
- topologicpy/bin/linux/topologic.libs/libTKPrim-eb1262b3.so.7.7.0,sha256=UY5xUbMq-TG9P57lKJJ_u9LLZBErokGOb9oawdq2m5Q,499240
44
- topologicpy/bin/linux/topologic.libs/libTKShHealing-e67e5cc7.so.7.7.0,sha256=AcCtgoxq3VEHyfaJhWw8hIuLGih_o2i_m7i1aM-yP1w,3087048
45
- topologicpy/bin/linux/topologic.libs/libTKTopAlgo-e4c96c33.so.7.7.0,sha256=I0DemcmUMYAGYB15uNb2e-r8AiR-lJ9Z-7IEyXtnV7s,3584832
46
- topologicpy/bin/linux/topologic.libs/libTKernel-fb7fe3b7.so.7.7.0,sha256=wWykqfPyHlsX-A2kDIn7iuHM3anTr0xpA0qXCx25Bpw,2081416
47
- topologicpy/bin/linux/topologic.libs/libgcc_s-b928ac34.so.1,sha256=8vcBW7lZO2I7IANo9Q_q01RfKzz_R22aogy2Du0hbhc,120160
48
- topologicpy/bin/linux/topologic.libs/libstdc++-e9ef912c.so.6.0.32,sha256=6dtSENa14guSLijTNp-v-huqrJrFepqlrFiWFCBMUMs,2312512
49
- topologicpy/bin/macos/topologic/__init__.py,sha256=qdj8gyp_GtYre27ZdFiVdLzLViOgX62woBZLTy9K91c,58
50
- topologicpy/bin/macos/topologic/topologic.cpython-310-darwin.so,sha256=9ftVT8NVFvDTYWtpRnAMPg3K6C12YpILlWBUkXxBn5Q,1859872
51
- topologicpy/bin/macos/topologic/topologic.cpython-311-darwin.so,sha256=Aq5D2yt2EvCrYMCclfhXKpV3DulgnCl6s5fFa0ARuQg,1859872
52
- topologicpy/bin/macos/topologic/topologic.cpython-38-darwin.so,sha256=RyfEOK4kL8hwOIw_eoQoQPYlD6nlfUy5On1w-WV2olU,1859680
53
- topologicpy/bin/macos/topologic/topologic.cpython-39-darwin.so,sha256=h4n7Fcxv7_mvU9CdiH2Gp7lcX_e93oQxTPEoqXK28Fw,1859872
25
+ topologicpy/Wire.py,sha256=GkWF4l0TbC1lwbgmQLsedQT2Ysg9l0PliFuNV63RLPs,128720
26
+ topologicpy/__init__.py,sha256=BQovc3_o87dO7mtblnFZsaK98FheNxenNMf0oDosxF8,713
27
+ topologicpy/bin/linux/topologic/__init__.py,sha256=XlFReDf3FWlYdM9uXtanYPIafgPb6GVTQczS_xJAXD0,60
28
+ topologicpy/bin/linux/topologic/topologic.cpython-310-x86_64-linux-gnu.so,sha256=uvar01STZ8qu1c8fRmtYdVnK8evxBv305QScASXY9go,1852112
29
+ topologicpy/bin/linux/topologic/topologic.cpython-311-x86_64-linux-gnu.so,sha256=42yjVWetFu_qn6-eZcDxgd_A8SQN_wHqkdw91txKt9U,1852112
30
+ topologicpy/bin/linux/topologic/topologic.cpython-38-x86_64-linux-gnu.so,sha256=wSCWs8aVd1trazRKRh7Rj2PNhp7uzNI_7AO92dPDyw4,1847960
31
+ topologicpy/bin/linux/topologic/topologic.cpython-39-x86_64-linux-gnu.so,sha256=_MEJoP2J1PrandjnxrBf3eahVfnFYUnA4eqIQt6VyLc,1852104
32
+ topologicpy/bin/linux/topologic.libs/libTKBO-6bdf205d.so.7.7.0,sha256=ANok9DQKcnWcLd9T_LAt-i-X4nsYYy16q9kQlcTre1E,2996488
33
+ topologicpy/bin/linux/topologic.libs/libTKBRep-2960a069.so.7.7.0,sha256=OJ3XesL79du8LeBHrsleGPXub6OpJdOilxha0mwjqQo,1378768
34
+ topologicpy/bin/linux/topologic.libs/libTKBool-c44b74bd.so.7.7.0,sha256=DFMVmHtxb3yzMH87JryKXdv7-hABsZjalqsHbYzIuyc,4697232
35
+ topologicpy/bin/linux/topologic.libs/libTKFillet-9a670ba0.so.7.7.0,sha256=XeDf3V7x7WfVxPhDFVY-IgGJ5qobqQ5-aa38OhTMTuA,3263456
36
+ topologicpy/bin/linux/topologic.libs/libTKG2d-8f31849e.so.7.7.0,sha256=bQF7NBLi6U0ZRYcXxLq-38txv21DwijXnY0jblZlg7U,488728
37
+ topologicpy/bin/linux/topologic.libs/libTKG3d-4c6bce57.so.7.7.0,sha256=q1JBPgYu5ufx-91tpCwd1qHju4K5tbaA3excCqOyWdw,1492008
38
+ topologicpy/bin/linux/topologic.libs/libTKGeomAlgo-26066fd9.so.7.7.0,sha256=P84zui6vs50hABkNtcZD__j92D1uWJXbEEOigd4UzeM,6640056
39
+ topologicpy/bin/linux/topologic.libs/libTKGeomBase-2116cabe.so.7.7.0,sha256=iktVzr1Ba0j3KSzNgf1YSe1QmYLGfHU3xv8u5qHS5iU,6145208
40
+ topologicpy/bin/linux/topologic.libs/libTKMath-72572fa8.so.7.7.0,sha256=uxu4cJj0G_JIhJNOnjLxKGg7z_OF7wQVenXNx1AaJ7E,3148000
41
+ topologicpy/bin/linux/topologic.libs/libTKMesh-2a060427.so.7.7.0,sha256=E_7HLidDNomLIcRO3-nbxC5w2DS_tS1yU5Glyvsc4Xg,1247848
42
+ topologicpy/bin/linux/topologic.libs/libTKOffset-6cab68ff.so.7.7.0,sha256=TThJ68q9cEiFQsbvxrmqZbKw_zwExVTPLbj0Xw3GywM,1840000
43
+ topologicpy/bin/linux/topologic.libs/libTKPrim-eb1262b3.so.7.7.0,sha256=CydsffzDiqYlEX9c7hXkNYiYY4haiURGfv1yqd-nki4,499240
44
+ topologicpy/bin/linux/topologic.libs/libTKShHealing-e67e5cc7.so.7.7.0,sha256=hXQbg3aF7dufpSXNQpm-gFGmHpzXlkRlxjoMG5FHajk,3087048
45
+ topologicpy/bin/linux/topologic.libs/libTKTopAlgo-e4c96c33.so.7.7.0,sha256=BoD55ZIlXRbnMsRfQvF7eIbjmJXnDDK5s0gmpahEcog,3584832
46
+ topologicpy/bin/linux/topologic.libs/libTKernel-fb7fe3b7.so.7.7.0,sha256=-QosnnDLnf_L__hod9yYxER2irvkGlDogCRRPf25VDY,2081416
47
+ topologicpy/bin/linux/topologic.libs/libgcc_s-32c1665e.so.1,sha256=9YoIGMfaxzPJ9Bqd2-VldMbgvnb0LTFVlFmVAVUiD8Q,107696
48
+ topologicpy/bin/linux/topologic.libs/libstdc++-672d7b41.so.6.0.30,sha256=etSx1HLG1LysYeYN1kpuPeqPzPQlg_XLbZHSLnvHd9s,2117848
49
+ topologicpy/bin/macos/topologic/__init__.py,sha256=XlFReDf3FWlYdM9uXtanYPIafgPb6GVTQczS_xJAXD0,60
54
50
  topologicpy/bin/windows/topologic/TKBO-f6b191de.dll,sha256=y_k2Zs_QlyAbKLQZW_ZPYNLKvRzW9BzB0R3nxuXZB_8,2087936
55
51
  topologicpy/bin/windows/topologic/TKBRep-e56a600e.dll,sha256=1QDNp8u0gIDDKClgN--fcBf1LZF0EspETcFfko6j_JQ,904704
56
52
  topologicpy/bin/windows/topologic/TKBool-7b8d47ae.dll,sha256=qor8GJIxYhXdnKOdex3goIcpxdISCaxwk-umJNq4qoo,3681280
@@ -67,12 +63,12 @@ topologicpy/bin/windows/topologic/TKShHealing-bb48be89.dll,sha256=Zbj9-CkboSoMkj
67
63
  topologicpy/bin/windows/topologic/TKTopAlgo-7d0d1e22.dll,sha256=hhJ4OZonDAwowvqGNuPcGo8g7UhovBoylnMZkIrL6Zw,2442752
68
64
  topologicpy/bin/windows/topologic/TKernel-08c8cfbb.dll,sha256=CMjPuy2gPW2mBRNm4TJsAq9SU8gcL_it2OayzYzii6o,1618944
69
65
  topologicpy/bin/windows/topologic/__init__.py,sha256=XlFReDf3FWlYdM9uXtanYPIafgPb6GVTQczS_xJAXD0,60
70
- topologicpy/bin/windows/topologic/topologic.cp310-win_amd64.pyd,sha256=F0rFFwCafUXeK5NcPeGovTJuWKhjXg9nwNMXSwuOc1I,1541632
71
- topologicpy/bin/windows/topologic/topologic.cp311-win_amd64.pyd,sha256=hZ6zZndMRPGX9-hEFT3grzJdGtxI-LdAnBuF7jaXfw8,1541120
72
- topologicpy/bin/windows/topologic/topologic.cp38-win_amd64.pyd,sha256=AgB2N6nMNaiTbNWsETvq1hrgzYxPdJytGTnLPtCYPdk,1541120
73
- topologicpy/bin/windows/topologic/topologic.cp39-win_amd64.pyd,sha256=fllmL3sOZuXw1Ez87GoPV47set6-0nZv9Eh2-ylthDg,1402368
74
- topologicpy-0.4.55.dist-info/LICENSE,sha256=RUmXeeqj63bBySLJjEfhwb9OE7M8h9K6HuOBF3ASVyI,35697
75
- topologicpy-0.4.55.dist-info/METADATA,sha256=R9z-sVwHTsBQYTXtmD1-LgCK0elgCCZzi1B1HQw9YQI,6973
76
- topologicpy-0.4.55.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
77
- topologicpy-0.4.55.dist-info/top_level.txt,sha256=J30bDzW92Ob7hw3zA8V34Jlp-vvsfIkGzkr8sqvb4Uw,12
78
- topologicpy-0.4.55.dist-info/RECORD,,
66
+ topologicpy/bin/windows/topologic/topologic.cp310-win_amd64.pyd,sha256=F0sPLuMpDtEHNg18xfE-nsGlZTdY0l_n-K_CL4S_cOM,1551360
67
+ topologicpy/bin/windows/topologic/topologic.cp311-win_amd64.pyd,sha256=aBAJQj3OmJ58MOAF1ZIFybL_5fFK7FNR9hrIps6b6pc,1551872
68
+ topologicpy/bin/windows/topologic/topologic.cp38-win_amd64.pyd,sha256=aLgNf54nbJmGc7Tdmkuy-V0m6B9zLxabIbpRwAy7cBA,1551360
69
+ topologicpy/bin/windows/topologic/topologic.cp39-win_amd64.pyd,sha256=_8cp205hiRxkFHtzQQOweA4DhCPk8caH4kTVLWGQeVw,1411584
70
+ topologicpy-0.4.57.dist-info/LICENSE,sha256=RUmXeeqj63bBySLJjEfhwb9OE7M8h9K6HuOBF3ASVyI,35697
71
+ topologicpy-0.4.57.dist-info/METADATA,sha256=XfUWKgP1nEgvVRgEBU5EwJYho5QnCQzEXxGh-Z47ssg,6973
72
+ topologicpy-0.4.57.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
73
+ topologicpy-0.4.57.dist-info/top_level.txt,sha256=J30bDzW92Ob7hw3zA8V34Jlp-vvsfIkGzkr8sqvb4Uw,12
74
+ topologicpy-0.4.57.dist-info/RECORD,,