topologicpy 0.4.56__tar.gz → 0.4.57__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 (94) hide show
  1. {topologicpy-0.4.56/src/topologicpy.egg-info → topologicpy-0.4.57}/PKG-INFO +1 -1
  2. {topologicpy-0.4.56 → topologicpy-0.4.57}/pyproject.toml +1 -1
  3. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/Cell.py +1 -1
  4. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/Face.py +1 -2
  5. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/Graph.py +37 -34
  6. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/Plotly.py +3 -1
  7. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/Shell.py +8 -8
  8. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/Topology.py +1 -1
  9. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/Wire.py +4 -4
  10. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/__init__.py +22 -22
  11. topologicpy-0.4.57/src/topologicpy/bin/linux/topologic/topologic.cpython-310-x86_64-linux-gnu.so +0 -0
  12. topologicpy-0.4.57/src/topologicpy/bin/linux/topologic/topologic.cpython-311-x86_64-linux-gnu.so +0 -0
  13. topologicpy-0.4.57/src/topologicpy/bin/linux/topologic/topologic.cpython-38-x86_64-linux-gnu.so +0 -0
  14. topologicpy-0.4.57/src/topologicpy/bin/linux/topologic/topologic.cpython-39-x86_64-linux-gnu.so +0 -0
  15. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/bin/linux/topologic.libs/libTKBO-6bdf205d.so.7.7.0 +0 -0
  16. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/bin/linux/topologic.libs/libTKBRep-2960a069.so.7.7.0 +0 -0
  17. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/bin/linux/topologic.libs/libTKBool-c44b74bd.so.7.7.0 +0 -0
  18. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/bin/linux/topologic.libs/libTKFillet-9a670ba0.so.7.7.0 +0 -0
  19. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/bin/linux/topologic.libs/libTKG2d-8f31849e.so.7.7.0 +0 -0
  20. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/bin/linux/topologic.libs/libTKG3d-4c6bce57.so.7.7.0 +0 -0
  21. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/bin/linux/topologic.libs/libTKGeomAlgo-26066fd9.so.7.7.0 +0 -0
  22. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/bin/linux/topologic.libs/libTKGeomBase-2116cabe.so.7.7.0 +0 -0
  23. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/bin/linux/topologic.libs/libTKMath-72572fa8.so.7.7.0 +0 -0
  24. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/bin/linux/topologic.libs/libTKMesh-2a060427.so.7.7.0 +0 -0
  25. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/bin/linux/topologic.libs/libTKOffset-6cab68ff.so.7.7.0 +0 -0
  26. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/bin/linux/topologic.libs/libTKPrim-eb1262b3.so.7.7.0 +0 -0
  27. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/bin/linux/topologic.libs/libTKShHealing-e67e5cc7.so.7.7.0 +0 -0
  28. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/bin/linux/topologic.libs/libTKTopAlgo-e4c96c33.so.7.7.0 +0 -0
  29. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/bin/linux/topologic.libs/libTKernel-fb7fe3b7.so.7.7.0 +0 -0
  30. topologicpy-0.4.57/src/topologicpy/bin/linux/topologic.libs/libgcc_s-32c1665e.so.1 +0 -0
  31. topologicpy-0.4.57/src/topologicpy/bin/linux/topologic.libs/libstdc++-672d7b41.so.6.0.30 +0 -0
  32. {topologicpy-0.4.56/src/topologicpy/bin/linux → topologicpy-0.4.57/src/topologicpy/bin/macos}/topologic/__init__.py +2 -2
  33. {topologicpy-0.4.56/src/topologicpy/bin/macos → topologicpy-0.4.57/src/topologicpy/bin/windows}/topologic/__init__.py +2 -2
  34. topologicpy-0.4.57/src/topologicpy/bin/windows/topologic/topologic.cp310-win_amd64.pyd +0 -0
  35. topologicpy-0.4.57/src/topologicpy/bin/windows/topologic/topologic.cp311-win_amd64.pyd +0 -0
  36. topologicpy-0.4.57/src/topologicpy/bin/windows/topologic/topologic.cp38-win_amd64.pyd +0 -0
  37. topologicpy-0.4.57/src/topologicpy/bin/windows/topologic/topologic.cp39-win_amd64.pyd +0 -0
  38. {topologicpy-0.4.56 → topologicpy-0.4.57/src/topologicpy.egg-info}/PKG-INFO +1 -1
  39. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy.egg-info/SOURCES.txt +2 -6
  40. topologicpy-0.4.56/src/topologicpy/bin/linux/topologic/topologic.cpython-310-x86_64-linux-gnu.so +0 -0
  41. topologicpy-0.4.56/src/topologicpy/bin/linux/topologic/topologic.cpython-311-x86_64-linux-gnu.so +0 -0
  42. topologicpy-0.4.56/src/topologicpy/bin/linux/topologic/topologic.cpython-38-x86_64-linux-gnu.so +0 -0
  43. topologicpy-0.4.56/src/topologicpy/bin/linux/topologic/topologic.cpython-39-x86_64-linux-gnu.so +0 -0
  44. topologicpy-0.4.56/src/topologicpy/bin/linux/topologic.libs/libgcc_s-b928ac34.so.1 +0 -0
  45. topologicpy-0.4.56/src/topologicpy/bin/linux/topologic.libs/libstdc++-e9ef912c.so.6.0.32 +0 -0
  46. topologicpy-0.4.56/src/topologicpy/bin/macos/topologic/topologic.cpython-310-darwin.so +0 -0
  47. topologicpy-0.4.56/src/topologicpy/bin/macos/topologic/topologic.cpython-311-darwin.so +0 -0
  48. topologicpy-0.4.56/src/topologicpy/bin/macos/topologic/topologic.cpython-38-darwin.so +0 -0
  49. topologicpy-0.4.56/src/topologicpy/bin/macos/topologic/topologic.cpython-39-darwin.so +0 -0
  50. topologicpy-0.4.56/src/topologicpy/bin/windows/topologic/topologic.cp310-win_amd64.pyd +0 -0
  51. topologicpy-0.4.56/src/topologicpy/bin/windows/topologic/topologic.cp311-win_amd64.pyd +0 -0
  52. topologicpy-0.4.56/src/topologicpy/bin/windows/topologic/topologic.cp38-win_amd64.pyd +0 -0
  53. topologicpy-0.4.56/src/topologicpy/bin/windows/topologic/topologic.cp39-win_amd64.pyd +0 -0
  54. {topologicpy-0.4.56 → topologicpy-0.4.57}/LICENSE +0 -0
  55. {topologicpy-0.4.56 → topologicpy-0.4.57}/MANIFEST.in +0 -0
  56. {topologicpy-0.4.56 → topologicpy-0.4.57}/README.md +0 -0
  57. {topologicpy-0.4.56 → topologicpy-0.4.57}/setup.cfg +0 -0
  58. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/Aperture.py +0 -0
  59. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/CellComplex.py +0 -0
  60. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/Cluster.py +0 -0
  61. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/Color.py +0 -0
  62. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/Context.py +0 -0
  63. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/DGL.py +0 -0
  64. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/Dictionary.py +0 -0
  65. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/Edge.py +0 -0
  66. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/EnergyModel.py +0 -0
  67. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/Grid.py +0 -0
  68. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/Helper.py +0 -0
  69. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/Honeybee.py +0 -0
  70. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/Matrix.py +0 -0
  71. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/Neo4j.py +0 -0
  72. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/Polyskel.py +0 -0
  73. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/Speckle.py +0 -0
  74. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/Vector.py +0 -0
  75. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/Vertex.py +0 -0
  76. {topologicpy-0.4.56/src/topologicpy/bin/windows → topologicpy-0.4.57/src/topologicpy/bin/linux}/topologic/__init__.py +0 -0
  77. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/bin/windows/topologic/TKBO-f6b191de.dll +0 -0
  78. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/bin/windows/topologic/TKBRep-e56a600e.dll +0 -0
  79. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/bin/windows/topologic/TKBool-7b8d47ae.dll +0 -0
  80. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/bin/windows/topologic/TKFillet-0ddbf0a8.dll +0 -0
  81. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/bin/windows/topologic/TKG2d-2e2dee3d.dll +0 -0
  82. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/bin/windows/topologic/TKG3d-6674513d.dll +0 -0
  83. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/bin/windows/topologic/TKGeomAlgo-d240e370.dll +0 -0
  84. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/bin/windows/topologic/TKGeomBase-df87aba5.dll +0 -0
  85. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/bin/windows/topologic/TKMath-45bd625a.dll +0 -0
  86. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/bin/windows/topologic/TKMesh-d6e826b1.dll +0 -0
  87. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/bin/windows/topologic/TKOffset-79b9cc94.dll +0 -0
  88. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/bin/windows/topologic/TKPrim-aa430a86.dll +0 -0
  89. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/bin/windows/topologic/TKShHealing-bb48be89.dll +0 -0
  90. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/bin/windows/topologic/TKTopAlgo-7d0d1e22.dll +0 -0
  91. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy/bin/windows/topologic/TKernel-08c8cfbb.dll +0 -0
  92. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy.egg-info/dependency_links.txt +0 -0
  93. {topologicpy-0.4.56 → topologicpy-0.4.57}/src/topologicpy.egg-info/requires.txt +0 -0
  94. {topologicpy-0.4.56 → topologicpy-0.4.57}/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.56
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
@@ -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.56"
6
+ version = "0.4.57"
7
7
  authors = [
8
8
  { name="Wassim Jabi", email="wassim.jabi@gmail.com" },
9
9
  ]
@@ -1537,7 +1537,7 @@ class Cell(Topology):
1537
1537
  from topologicpy.Cell import Cell
1538
1538
  from topologicpy.Topology import Topology
1539
1539
 
1540
- shell = Shell.Roof(face=face, degree=degree, espilon=epsilon, tolerance=tolerance)
1540
+ shell = Shell.Roof(face=face, degree=degree, epsilon=epsilon, tolerance=tolerance)
1541
1541
  faces = Topology.Faces(shell) + [face]
1542
1542
  cell = Cell.ByFaces(faces, tolerance=tolerance)
1543
1543
  if not cell:
@@ -1051,7 +1051,7 @@ class Face(topologic.Face):
1051
1051
  tempVertices = rotate_vertices(tempVertices, temp_v)
1052
1052
  flatInternalBoundaries.append(Wire.ByVertices(tempVertices))
1053
1053
  flatFace = Face.ByWires(flatExternalBoundary, flatInternalBoundaries, tolerance=tolerance)
1054
- dictionary = Dictionary.ByKeysValues(["xTran", "yTran", "zTran", "phi", "theta"], [cm.X(), cm.Y(), cm.Z(), phi, theta])
1054
+ dictionary = Dictionary.ByKeysValues(["x", "y", "z", "phi", "theta"], [cm.X(), cm.Y(), cm.Z(), phi, theta])
1055
1055
  flatFace = Topology.SetDictionary(flatFace, dictionary)
1056
1056
  return flatFace
1057
1057
 
@@ -1277,7 +1277,6 @@ class Face(topologic.Face):
1277
1277
  except:
1278
1278
  print("Face.IsInternal - Warning: Could not determine if vertex is inside face. Returning False.")
1279
1279
  clus = Cluster.ByTopologies([vertex, face])
1280
- Topology.Show(clus, renderer="browser")
1281
1280
  status = False
1282
1281
  return status
1283
1282
 
@@ -4183,6 +4183,12 @@ class Graph:
4183
4183
  for edge in Topology.Edges(temp_path):
4184
4184
  new_edges.append(g_edges[Edge.Index(edge, g_edges)])
4185
4185
  longest_path = Topology.SelfMerge(Cluster.ByTopologies(new_edges), tolerance=tolerance)
4186
+ sv = Topology.Vertices(longest_path)[0]
4187
+ if Vertex.Distance(sv, vertexB) < tolerance: # Wire is reversed. Re-reverse it
4188
+ if isinstance(longest_path, topologic.Edges):
4189
+ longest_path = Edge.Reverse(longest_path)
4190
+ if isinstance(longest_path, topologic.Wire):
4191
+ longest_path = Wire.Reverse(longest_path)
4186
4192
  if not costKey == None:
4187
4193
  lengths.sort()
4188
4194
  d = Dictionary.ByKeysValues([costKey], [cost])
@@ -4874,7 +4880,7 @@ class Graph:
4874
4880
  return graph
4875
4881
 
4876
4882
  @staticmethod
4877
- def ShortestPath(graph, vertexA, vertexB, vertexKey="", edgeKey="Length"):
4883
+ def ShortestPath(graph, vertexA, vertexB, vertexKey="", edgeKey="Length", tolerance=0.0001):
4878
4884
  """
4879
4885
  Returns the shortest path that connects the input vertices.
4880
4886
 
@@ -4890,13 +4896,19 @@ class Graph:
4890
4896
  The vertex key to minimise. If set the vertices dictionaries will be searched for this key and the associated value will be used to compute the shortest path that minimized the total value. The value must be numeric. The default is None.
4891
4897
  edgeKey : string , optional
4892
4898
  The edge key to minimise. If set the edges dictionaries will be searched for this key and the associated value will be used to compute the shortest path that minimized the total value. The value of the key must be numeric. If set to "length" (case insensitive), the shortest path by length is computed. The default is "length".
4893
-
4899
+ tolerance : float , optional
4900
+ The desired tolerance. The default is 0.0001.
4901
+
4894
4902
  Returns
4895
4903
  -------
4896
4904
  topologic.Wire
4897
4905
  The shortest path between the input vertices.
4898
4906
 
4899
4907
  """
4908
+ from topologicpy.Edge import Edge
4909
+ from topologicpy.Wire import Wire
4910
+ from topologicpy.Topology import Topology
4911
+
4900
4912
  if not isinstance(graph, topologic.Graph):
4901
4913
  print("Graph.ShortestPath - Error: The input graph is not a valid graph. Returning None.")
4902
4914
  return None
@@ -4910,7 +4922,16 @@ class Graph:
4910
4922
  if edgeKey.lower() == "length":
4911
4923
  edgeKey = "Length"
4912
4924
  try:
4913
- return graph.ShortestPath(vertexA, vertexB, vertexKey, edgeKey)
4925
+ gsv = Graph.NearestVertex(graph, vertexA, tolerance)
4926
+ gev = Graph.NearestVertex(graph, vertexB, tolerance)
4927
+ shortest_path = graph.ShortestPath(gsv, gev, vertexKey, edgeKey)
4928
+ sv = Topology.Vertices(shortest_path)[0]
4929
+ if Vertex.Distance(sv, gev) < tolerance: # Path is reversed. Correct it.
4930
+ if isinstance(shortest_path, topologic.Edges):
4931
+ shortest_path = Edge.Reverse(shortest_path)
4932
+ if isinstance(shortest_path, topologic.Wire):
4933
+ shortest_path = Wire.Reverse(shortest_path)
4934
+ return shortest_path
4914
4935
  except:
4915
4936
  return None
4916
4937
 
@@ -4936,62 +4957,49 @@ class Graph:
4936
4957
  The search time limit in seconds. The default is 10 seconds
4937
4958
  pathLimit: int , optional
4938
4959
  The number of found paths limit. The default is 10 paths.
4960
+ tolerance : float , optional
4961
+ The desired tolerance. The default is 0.0001.
4939
4962
 
4940
4963
  Returns
4941
4964
  -------
4942
- topologic.Wire
4965
+ list
4943
4966
  The list of shortest paths between the input vertices.
4944
4967
 
4945
4968
  """
4946
4969
  from topologicpy.Vertex import Vertex
4947
4970
  from topologicpy.Wire import Wire
4948
- def nearestVertex(g, v, tolerance):
4949
- vertices = Graph.Vertices(g)
4950
- for aVertex in vertices:
4951
- d = Vertex.Distance(v, aVertex)
4952
- if d < tolerance:
4953
- return aVertex
4954
- return None
4955
4971
 
4956
- def isUnique(paths, wire):
4972
+ def isUnique(paths, path):
4973
+ if path == None:
4974
+ return False
4957
4975
  if len(paths) < 1:
4958
4976
  return True
4959
4977
  for aPath in paths:
4960
4978
  copyPath = topologic.Topology.DeepCopy(aPath)
4961
- dif = copyPath.Difference(wire, False)
4979
+ dif = copyPath.Difference(path, False)
4962
4980
  if dif == None:
4963
4981
  return False
4964
4982
  return True
4965
4983
 
4966
4984
  if not isinstance(graph, topologic.Graph):
4967
- print("Graph.ShortestPaths - Error: The input graph is not a valid graph. Returning None.")
4985
+ print("Graph.ShortestPaths - Error: The input graph parameter is not a valid graph. Returning None.")
4968
4986
  return None
4969
4987
  if not isinstance(vertexA, topologic.Vertex):
4970
- print("Graph.ShortestPaths - Error: The input vertexA is not a valid vertex. Returning None.")
4988
+ print("Graph.ShortestPaths - Error: The input vertexA parameter is not a valid vertex. Returning None.")
4971
4989
  return None
4972
4990
  if not isinstance(vertexB, topologic.Vertex):
4973
- print("Graph.ShortestPaths - Error: The input vertexB is not a valid vertex. Returning None.")
4991
+ print("Graph.ShortestPaths - Error: The input vertexB parameter is not a valid vertex. Returning None.")
4974
4992
  return None
4975
4993
  shortestPaths = []
4976
4994
  end = time.time() + timeLimit
4977
4995
  while time.time() < end and len(shortestPaths) < pathLimit:
4978
- gsv = nearestVertex(graph, vertexA, tolerance)
4979
- gev = nearestVertex(graph, vertexB, tolerance)
4980
4996
  if (graph != None):
4981
4997
  if edgeKey:
4982
4998
  if edgeKey.lower() == "length":
4983
4999
  edgeKey = "Length"
4984
- wire = graph.ShortestPath(gsv,gev,vertexKey,edgeKey) # Find the first shortest path
4985
- wireVertices = []
4986
- flag = False
4987
- try:
4988
- wireVertices = Wire.Vertices(wire)
4989
- flag = True
4990
- except:
4991
- flag = False
4992
- if (flag):
4993
- if isUnique(shortestPaths, wire):
4994
- shortestPaths.append(wire)
5000
+ shortest_path = Graph.ShortestPath(graph, vertexA, vertexB, vertexKey=vertexKey, edgeKey=edgeKey, tolerance=tolerance) # Find the first shortest path
5001
+ if isUnique(shortestPaths, shortest_path):
5002
+ shortestPaths.append(shortest_path)
4995
5003
  vertices = Graph.Vertices(graph)
4996
5004
  random.shuffle(vertices)
4997
5005
  edges = Graph.Edges(graph)
@@ -5399,11 +5407,6 @@ class Graph:
5399
5407
  e = Topology.Boolean(e, boundaryFace, operation="intersect", tolerance=tolerance)
5400
5408
  if isinstance(e, topologic.Edge):
5401
5409
  edges = addEdge(e, edges, viewpointsA, viewpointsB, 0.0001)
5402
- elif isinstance(e, topologic.Cluster):
5403
- tempEdges = Cluster.Edges(e)
5404
- if tempEdges:
5405
- for tempEdge in tempEdges:
5406
- edges = addEdge(tempEdge, edges, viewpointsA, viewpointsB, 0.0001)
5407
5410
 
5408
5411
  except:
5409
5412
  for i in range(len(viewpointsA)):
@@ -840,7 +840,9 @@ class Plotly:
840
840
  f_dictionaries.append(d)
841
841
  if d:
842
842
  _ = Topology.SetDictionary(tri, d)
843
- all_triangles.append(tri)
843
+ c = Topology.Centroid(tri)
844
+ if Face.IsInternal(tp_face, c):
845
+ all_triangles.append(tri)
844
846
  if len(all_triangles) > 0:
845
847
  f_cluster = Cluster.ByTopologies(all_triangles)
846
848
  geo = Topology.Geometry(f_cluster, mantissa=mantissa)
@@ -456,14 +456,11 @@ class Shell(Topology):
456
456
 
457
457
  """
458
458
  from topologicpy.Vertex import Vertex
459
- from topologicpy.Edge import Edge
460
459
  from topologicpy.Wire import Wire
461
460
  from topologicpy.Face import Face
462
- from topologicpy.Cell import Cell
463
461
  from topologicpy.Cluster import Cluster
464
462
  from topologicpy.Topology import Topology
465
463
  from topologicpy.Dictionary import Dictionary
466
- from topologicpy.Helper import Helper
467
464
  from random import sample
468
465
  import sys
469
466
  import subprocess
@@ -527,7 +524,10 @@ class Shell(Topology):
527
524
  tempTriangleVertices.append(vertices[simplex[0]])
528
525
  tempTriangleVertices.append(vertices[simplex[1]])
529
526
  tempTriangleVertices.append(vertices[simplex[2]])
530
- faces.append(Face.ByWire(Wire.ByVertices(tempTriangleVertices), tolerance=tolerance))
527
+ tempFace = Face.ByWire(Wire.ByVertices(tempTriangleVertices), tolerance=tolerance)
528
+ tempCentroid = Topology.Centroid(tempFace)
529
+ if Face.IsInternal(flatFace, tempCentroid):
530
+ faces.append(tempFace)
531
531
 
532
532
  shell = Shell.ByFaces(faces, tolerance=tolerance)
533
533
  #if shell == None:
@@ -1361,7 +1361,7 @@ class Shell(Topology):
1361
1361
  degree : float , optioal
1362
1362
  The desired angle in degrees of the roof. The default is 45.
1363
1363
  epsilon : float , optional
1364
- The desired espilon (another form of tolerance for distance from plane). The default is 0.01. (This is set to a larger number as it was found to work better)
1364
+ The desired epsilon (another form of tolerance for distance from plane). The default is 0.01. (This is set to a larger number as it was found to work better)
1365
1365
  tolerance : float , optional
1366
1366
  The desired tolerance. The default is 0.001. (This is set to a larger number as it was found to work better)
1367
1367
 
@@ -1452,9 +1452,9 @@ class Shell(Topology):
1452
1452
  shell = Topology.RemoveCoplanarFaces(shell, epsilon=epsilon, tolerance=tolerance)
1453
1453
  except:
1454
1454
  pass
1455
- xTran = Dictionary.ValueAtKey(d,"xTran")
1456
- yTran = Dictionary.ValueAtKey(d,"yTran")
1457
- zTran = Dictionary.ValueAtKey(d,"zTran")
1455
+ xTran = Dictionary.ValueAtKey(d,"x")
1456
+ yTran = Dictionary.ValueAtKey(d,"y")
1457
+ zTran = Dictionary.ValueAtKey(d,"z")
1458
1458
  phi = Dictionary.ValueAtKey(d,"phi")
1459
1459
  theta = Dictionary.ValueAtKey(d,"theta")
1460
1460
  shell = Topology.Rotate(shell, origin=Vertex.Origin(), x=0, y=1, z=0, degree=theta)
@@ -4601,7 +4601,7 @@ class Topology():
4601
4601
  angTolerance : float , optional
4602
4602
  The desired angular tolerance for removing coplanar faces. The default is 0.1.
4603
4603
  epsilon : float , optional
4604
- The desired espilon (another form of tolerance) for finding if two faces are coplanar. The default is 0.01.
4604
+ The desired epsilon (another form of tolerance) for finding if two faces are coplanar. The default is 0.01.
4605
4605
  tolerance : float , optional
4606
4606
  The desired tolerance. The default is 0.0001.
4607
4607
 
@@ -1771,7 +1771,7 @@ class Wire(topologic.Wire):
1771
1771
  Returns
1772
1772
  -------
1773
1773
  float
1774
- The length of the input wire.
1774
+ The length of the input wire. Test
1775
1775
 
1776
1776
  """
1777
1777
  if not wire:
@@ -2241,9 +2241,9 @@ class Wire(topologic.Wire):
2241
2241
  roof = face_to_skeleton(flat_face, degree)
2242
2242
  if not roof:
2243
2243
  return None
2244
- xTran = Dictionary.ValueAtKey(d,"xTran")
2245
- yTran = Dictionary.ValueAtKey(d,"yTran")
2246
- zTran = Dictionary.ValueAtKey(d,"zTran")
2244
+ xTran = Dictionary.ValueAtKey(d,"x")
2245
+ yTran = Dictionary.ValueAtKey(d,"y")
2246
+ zTran = Dictionary.ValueAtKey(d,"z")
2247
2247
  phi = Dictionary.ValueAtKey(d,"phi")
2248
2248
  theta = Dictionary.ValueAtKey(d,"theta")
2249
2249
  roof = Topology.Rotate(roof, origin=Vertex.Origin(), x=0, y=1, z=0, degree=theta)
@@ -1,22 +1,22 @@
1
- import sys
2
- import os, re
3
- from sys import platform
4
-
5
- __version__ = '0.4.56'
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.56
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
@@ -54,13 +54,9 @@ src/topologicpy/bin/linux/topologic.libs/libTKPrim-eb1262b3.so.7.7.0
54
54
  src/topologicpy/bin/linux/topologic.libs/libTKShHealing-e67e5cc7.so.7.7.0
55
55
  src/topologicpy/bin/linux/topologic.libs/libTKTopAlgo-e4c96c33.so.7.7.0
56
56
  src/topologicpy/bin/linux/topologic.libs/libTKernel-fb7fe3b7.so.7.7.0
57
- src/topologicpy/bin/linux/topologic.libs/libgcc_s-b928ac34.so.1
58
- src/topologicpy/bin/linux/topologic.libs/libstdc++-e9ef912c.so.6.0.32
57
+ src/topologicpy/bin/linux/topologic.libs/libgcc_s-32c1665e.so.1
58
+ src/topologicpy/bin/linux/topologic.libs/libstdc++-672d7b41.so.6.0.30
59
59
  src/topologicpy/bin/macos/topologic/__init__.py
60
- src/topologicpy/bin/macos/topologic/topologic.cpython-310-darwin.so
61
- src/topologicpy/bin/macos/topologic/topologic.cpython-311-darwin.so
62
- src/topologicpy/bin/macos/topologic/topologic.cpython-38-darwin.so
63
- src/topologicpy/bin/macos/topologic/topologic.cpython-39-darwin.so
64
60
  src/topologicpy/bin/windows/topologic/TKBO-f6b191de.dll
65
61
  src/topologicpy/bin/windows/topologic/TKBRep-e56a600e.dll
66
62
  src/topologicpy/bin/windows/topologic/TKBool-7b8d47ae.dll
File without changes
File without changes
File without changes
File without changes