topologicpy 0.4.24__tar.gz → 0.4.26__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 (79) hide show
  1. {topologicpy-0.4.24/src/topologicpy.egg-info → topologicpy-0.4.26}/PKG-INFO +1 -1
  2. {topologicpy-0.4.24 → topologicpy-0.4.26}/pyproject.toml +1 -1
  3. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/DGL.py +4 -2
  4. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/EnergyModel.py +21 -9
  5. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/Graph.py +23 -14
  6. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/Plotly.py +16 -8
  7. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/Topology.py +18 -8
  8. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/__init__.py +2 -2
  9. {topologicpy-0.4.24 → topologicpy-0.4.26/src/topologicpy.egg-info}/PKG-INFO +1 -1
  10. {topologicpy-0.4.24 → topologicpy-0.4.26}/LICENSE +0 -0
  11. {topologicpy-0.4.24 → topologicpy-0.4.26}/MANIFEST.in +0 -0
  12. {topologicpy-0.4.24 → topologicpy-0.4.26}/README.md +0 -0
  13. {topologicpy-0.4.24 → topologicpy-0.4.26}/setup.cfg +0 -0
  14. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/Aperture.py +0 -0
  15. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/Cell.py +0 -0
  16. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/CellComplex.py +0 -0
  17. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/Cluster.py +0 -0
  18. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/Color.py +0 -0
  19. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/Context.py +0 -0
  20. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/Dictionary.py +0 -0
  21. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/Edge.py +0 -0
  22. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/Face.py +0 -0
  23. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/Grid.py +0 -0
  24. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/Helper.py +0 -0
  25. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/Honeybee.py +0 -0
  26. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/Matrix.py +0 -0
  27. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/Neo4j.py +0 -0
  28. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/Polyskel.py +0 -0
  29. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/Shell.py +0 -0
  30. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/Speckle.py +0 -0
  31. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/Vector.py +0 -0
  32. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/Vertex.py +0 -0
  33. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/Wire.py +0 -0
  34. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/linux/topologic/__init__.py +0 -0
  35. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/linux/topologic/topologic.cpython-310-x86_64-linux-gnu.so +0 -0
  36. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/linux/topologic/topologic.cpython-311-x86_64-linux-gnu.so +0 -0
  37. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/linux/topologic/topologic.cpython-38-x86_64-linux-gnu.so +0 -0
  38. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/linux/topologic/topologic.cpython-39-x86_64-linux-gnu.so +0 -0
  39. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/linux/topologic.libs/libTKBO-6bdf205d.so.7.7.0 +0 -0
  40. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/linux/topologic.libs/libTKBRep-2960a069.so.7.7.0 +0 -0
  41. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/linux/topologic.libs/libTKBool-c44b74bd.so.7.7.0 +0 -0
  42. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/linux/topologic.libs/libTKFillet-9a670ba0.so.7.7.0 +0 -0
  43. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/linux/topologic.libs/libTKG2d-8f31849e.so.7.7.0 +0 -0
  44. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/linux/topologic.libs/libTKG3d-4c6bce57.so.7.7.0 +0 -0
  45. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/linux/topologic.libs/libTKGeomAlgo-26066fd9.so.7.7.0 +0 -0
  46. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/linux/topologic.libs/libTKGeomBase-2116cabe.so.7.7.0 +0 -0
  47. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/linux/topologic.libs/libTKMath-72572fa8.so.7.7.0 +0 -0
  48. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/linux/topologic.libs/libTKMesh-2a060427.so.7.7.0 +0 -0
  49. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/linux/topologic.libs/libTKOffset-6cab68ff.so.7.7.0 +0 -0
  50. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/linux/topologic.libs/libTKPrim-eb1262b3.so.7.7.0 +0 -0
  51. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/linux/topologic.libs/libTKShHealing-e67e5cc7.so.7.7.0 +0 -0
  52. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/linux/topologic.libs/libTKTopAlgo-e4c96c33.so.7.7.0 +0 -0
  53. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/linux/topologic.libs/libTKernel-fb7fe3b7.so.7.7.0 +0 -0
  54. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/linux/topologic.libs/libgcc_s-32c1665e.so.1 +0 -0
  55. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/linux/topologic.libs/libstdc++-672d7b41.so.6.0.30 +0 -0
  56. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/windows/topologic/TKBO-f6b191de.dll +0 -0
  57. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/windows/topologic/TKBRep-e56a600e.dll +0 -0
  58. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/windows/topologic/TKBool-7b8d47ae.dll +0 -0
  59. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/windows/topologic/TKFillet-0ddbf0a8.dll +0 -0
  60. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/windows/topologic/TKG2d-2e2dee3d.dll +0 -0
  61. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/windows/topologic/TKG3d-6674513d.dll +0 -0
  62. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/windows/topologic/TKGeomAlgo-d240e370.dll +0 -0
  63. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/windows/topologic/TKGeomBase-df87aba5.dll +0 -0
  64. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/windows/topologic/TKMath-45bd625a.dll +0 -0
  65. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/windows/topologic/TKMesh-d6e826b1.dll +0 -0
  66. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/windows/topologic/TKOffset-79b9cc94.dll +0 -0
  67. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/windows/topologic/TKPrim-aa430a86.dll +0 -0
  68. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/windows/topologic/TKShHealing-bb48be89.dll +0 -0
  69. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/windows/topologic/TKTopAlgo-7d0d1e22.dll +0 -0
  70. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/windows/topologic/TKernel-08c8cfbb.dll +0 -0
  71. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/windows/topologic/__init__.py +0 -0
  72. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/windows/topologic/topologic.cp310-win_amd64.pyd +0 -0
  73. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/windows/topologic/topologic.cp311-win_amd64.pyd +0 -0
  74. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/windows/topologic/topologic.cp38-win_amd64.pyd +0 -0
  75. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy/bin/windows/topologic/topologic.cp39-win_amd64.pyd +0 -0
  76. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy.egg-info/SOURCES.txt +0 -0
  77. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy.egg-info/dependency_links.txt +0 -0
  78. {topologicpy-0.4.24 → topologicpy-0.4.26}/src/topologicpy.egg-info/requires.txt +0 -0
  79. {topologicpy-0.4.24 → topologicpy-0.4.26}/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.24
3
+ Version: 0.4.26
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.24"
6
+ version = "0.4.26"
7
7
  authors = [
8
8
  { name="Wassim Jabi", email="wassim.jabi@gmail.com" },
9
9
  ]
@@ -1532,8 +1532,10 @@ class DGL:
1532
1532
  """
1533
1533
  if not path:
1534
1534
  return None
1535
- file = open(path)
1536
- if not file:
1535
+ try:
1536
+ file = open(path)
1537
+ except:
1538
+ print("DGL.GraphsByDGCNNPath - Error: the DGCNN file is not a valid file. Returning None.")
1537
1539
  return None
1538
1540
  return DGL.GraphsByDGCNNFile(file=file, categories=categories, bidirectional=bidirectional)
1539
1541
 
@@ -115,7 +115,7 @@ class EnergyModel:
115
115
  return EnergyModel.ByOSMPath(path=path)
116
116
 
117
117
  @staticmethod
118
- def ByTopology(building : topologic.CellComplex,
118
+ def ByTopology(building : topologic.Topology,
119
119
  shadingSurfaces : topologic.Topology = None,
120
120
  osModelPath : str = None,
121
121
  weatherFilePath : str = None,
@@ -135,7 +135,7 @@ class EnergyModel:
135
135
 
136
136
  Parameters
137
137
  ----------
138
- building : topologic.CellComplex
138
+ building : topologic.CellComplex or topologic.Cell
139
139
  The input building topology.
140
140
  shadingSurfaces : topologic.Topology , optional
141
141
  The input topology for shading surfaces. The default is None.
@@ -197,14 +197,22 @@ class EnergyModel:
197
197
 
198
198
  def getFloorLevels(building):
199
199
  from topologicpy.Vertex import Vertex
200
+ from topologicpy.Cell import Cell
200
201
  from topologicpy.CellComplex import CellComplex
201
- from topologicpy.Dictionary import Dictionary
202
202
 
203
- d = CellComplex.Decompose(building)
204
- bhf = d['bottomHorizontalFaces']
205
- ihf = d['internalHorizontalFaces']
206
- thf = d ['topHorizontalFaces']
207
- hf = bhf+ihf+thf
203
+ if isinstance(building, topologic.CellComplex):
204
+ d = CellComplex.Decompose(building)
205
+ bhf = d['bottomHorizontalFaces']
206
+ ihf = d['internalHorizontalFaces']
207
+ thf = d ['topHorizontalFaces']
208
+ hf = bhf+ihf+thf
209
+ elif isinstance(building, topologic.Cell):
210
+ d = Cell.Decompose(building)
211
+ bhf = d['bottomHorizontalFaces']
212
+ thf = d ['topHorizontalFaces']
213
+ hf = bhf+thf
214
+ else:
215
+ return None
208
216
  floorLevels = [Vertex.Z(Topology.Centroid(f)) for f in hf]
209
217
  floorLevels = list(set(floorLevels))
210
218
  floorLevels.sort()
@@ -267,7 +275,11 @@ class EnergyModel:
267
275
  osBuildingStorys.sort(key=lambda x: x.nominalZCoordinate().get())
268
276
  osSpaces = []
269
277
  spaceNames = []
270
- for spaceNumber, buildingCell in enumerate(Topology.SubTopologies(building, "Cell")):
278
+ if isinstance(building, topologic.CellComplex):
279
+ building_cells = Topology.SubTopologies(building, "Cell")
280
+ elif isinstance(building, topologic.Cell):
281
+ building_cells = [building]
282
+ for spaceNumber, buildingCell in enumerate(building_cells):
271
283
  osSpace = openstudio.model.Space(osModel)
272
284
  osSpaceZ = buildingCell.CenterOfMass().Z()
273
285
  osBuildingStory = osBuildingStorys[0]
@@ -367,7 +367,7 @@ class Graph:
367
367
  try:
368
368
  from tqdm.auto import tqdm
369
369
  except:
370
- print("DGL - Error: Could not import tqdm")
370
+ print("Graph.BetweenessCentrality - Error: Could not import tqdm")
371
371
 
372
372
  if not isinstance(graph, topologic.Graph):
373
373
  print("Graph.BetweenessCentrality - Error: The input graph is not a valid graph. Returning None.")
@@ -535,16 +535,19 @@ class Graph:
535
535
  if not nodes_file_path:
536
536
  print("Graph.ByCSVPath - Error: the input edges_file_path is not a valid path. Returning None.")
537
537
  return None
538
- graphs_file = open(graphs_file_path)
539
- if not graphs_file:
538
+ try:
539
+ graphs_file = open(graphs_file_path)
540
+ except:
540
541
  print("Graph.ByCSVPath - Error: the graphs file is not a valid file. Returning None.")
541
542
  return None
542
- edges_file = open(edges_file_path)
543
- if not edges_file:
543
+ try:
544
+ edges_file = open(edges_file_path)
545
+ except:
544
546
  print("Graph.ByCSVPath - Error: the edges file is not a valid file. Returning None.")
545
547
  return None
546
- nodes_file = open(nodes_file_path)
547
- if not nodes_file:
548
+ try:
549
+ nodes_file = open(nodes_file_path)
550
+ except:
548
551
  print("Graph.ByCSVPath - Error: the nodes file is not a valid file. Returning None.")
549
552
  return None
550
553
  return Graph.ByCSVFile(graphs_file, edges_file, nodes_file,
@@ -611,17 +614,17 @@ class Graph:
611
614
  # Using split by line
612
615
  lines = graphs_string.split('\n')[1:-1]
613
616
  lines = [l for l in lines if lines != None or lines != ""]
614
- pd_graphs = pd.DataFrame([row.split(',') for row in lines],
617
+ pd_graphs = pd.DataFrame([row.split(',')[0:3] for row in lines],
615
618
  columns=[graph_id_header, graph_label_header, num_nodes_header])
616
619
 
617
620
  lines = edges_string.split('\n')[1:-1]
618
621
  lines = [l for l in lines if lines != None or lines != ""]
619
- edges = pd.DataFrame([row.split(',') for row in lines],
622
+ edges = pd.DataFrame([row.split(',')[0:3] for row in lines],
620
623
  columns=[graph_id_header, src_header, dst_header])
621
624
 
622
625
  lines = nodes_string.split('\n')[1:-1]
623
626
  lines = [l for l in lines if lines[-1] != None or lines[-1] != ""]
624
- nodes = pd.DataFrame([row.split(',') for row in lines],
627
+ nodes = pd.DataFrame([row.split(',')[0:5] for row in lines],
625
628
  columns=[graph_id_header, node_label_header, node_X_header, node_Y_header, node_Z_header])
626
629
 
627
630
  graphs = []
@@ -648,7 +651,12 @@ class Graph:
648
651
  graph_dict["node_features"] = []
649
652
  num_nodes = num_nodes_dict[graph_id]
650
653
  graph_label = label_dict[graph_id]
651
- labels.append(int(graph_label))
654
+ if graph_label.isnumeric():
655
+ if graph_label.isdecimal():
656
+ graph_label = int(graph_label)
657
+ else:
658
+ graph_label = float(graph_label)
659
+ labels.append(float(graph_label))
652
660
 
653
661
  # Find the nodes and their labels and features
654
662
  nodes_of_id = nodes_group.get_group(graph_id)
@@ -722,9 +730,10 @@ class Graph:
722
730
  if not path:
723
731
  print("Graph.ByDGCNNPath - Error: the input path is not a valid path. Returning None.")
724
732
  return None
725
- file = open(path)
726
- if not file:
727
- print("Graph.ByDGCNNPath - Error: the input file is not a valid file. Returning None.")
733
+ try:
734
+ file = open(path)
735
+ except:
736
+ print("Graph.ByDGCNNPath - Error: the DGCNN file is not a valid file. Returning None.")
728
737
  return None
729
738
  return Graph.ByDGCNNFile(file, key=key)
730
739
 
@@ -183,7 +183,7 @@ class Plotly:
183
183
  return df
184
184
 
185
185
  @staticmethod
186
- def DataByGraph(graph, vertexColor="white", vertexSize=6, vertexLabelKey=None, vertexGroupKey=None, vertexGroups=[], showVertices=True, edgeColor="black", edgeWidth=1, edgeLabelKey=None, edgeGroupKey=None, edgeGroups=[], showEdges=True):
186
+ def DataByGraph(graph, vertexColor="white", vertexSize=6, vertexLabelKey=None, vertexGroupKey=None, vertexGroups=[], showVertices=True, edgeColor="black", edgeWidth=1, edgeLabelKey=None, edgeGroupKey=None, edgeGroups=[], showEdges=True, colorScale="viridis"):
187
187
  """
188
188
  Creates plotly vertex and edge data from the input graph.
189
189
 
@@ -193,8 +193,6 @@ class Plotly:
193
193
  The input graph.
194
194
  vertexLabelKey : str , optional
195
195
  The dictionary key to use to display the vertex label. The default is None.
196
- vertexGroupKey : str , optional
197
- The dictionary key to use to display the vertex group. The default is None.
198
196
  edgeLabelKey : str , optional
199
197
  The dictionary key to use to display the edge label. The default is None.
200
198
  edgeGroupKey : str , optional
@@ -217,13 +215,20 @@ class Plotly:
217
215
  - An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
218
216
  - A named CSS color.
219
217
  The default is "black".
218
+ vertexGroupKey : str , optional
219
+ The dictionary key to use to display the vertex group. The default is None.
220
+ vertexGroups : list , optional
221
+ The list of vertex groups against which to index the color of the vertex. The default is [].
222
+ vertexLabelKey : str , optional
223
+ The dictionary key to use to display the vertex label. The default is None.
220
224
  vertexSize : float , optional
221
225
  The desired size of the vertices. The default is 1.1.
222
226
  showEdges : bool , optional
223
227
  If set to True the edges will be drawn. Otherwise, they will not be drawn. The default is True.
224
228
  showVertices : bool , optional
225
229
  If set to True the vertices will be drawn. Otherwise, they will not be drawn. The default is True.
226
-
230
+ colorScale : str , optional
231
+ The desired type of plotly color scales to use (e.g. "Viridis", "Plasma"). The default is "Viridis". For a full list of names, see https://plotly.com/python/builtin-colorscales/.
227
232
  Returns
228
233
  -------
229
234
  list
@@ -258,15 +263,18 @@ class Plotly:
258
263
  except:
259
264
  v_label = ""
260
265
  try:
261
- v_group = str(Dictionary.ValueAtKey(d, key=vertexGroupKey)) or ""
266
+ v_group = Dictionary.ValueAtKey(d, key=vertexGroupKey)
262
267
  except:
263
- v_group = ""
268
+ v_group = None
264
269
  try:
265
270
  v_groupList.append(vertexGroups.index(v_group))
266
271
  except:
267
272
  v_groupList.append(len(vertexGroups))
268
273
  if not v_label == "" and not v_group == "":
269
- v_label = v_label+" ("+v_group+")"
274
+ if v_group == 0:
275
+ v_label = v_label+" (0)"
276
+ else:
277
+ v_label = v_label+" ("+str(v_group)+")"
270
278
  v_labels.append(v_label)
271
279
  else:
272
280
  for v in vertices:
@@ -287,7 +295,7 @@ class Plotly:
287
295
  marker=dict(symbol='circle',
288
296
  size=vertexSize,
289
297
  color=v_groupList,
290
- colorscale='Viridis',
298
+ colorscale=colorScale,
291
299
  line=dict(color=edgeColor, width=0.5)
292
300
  ),
293
301
  text=v_labels,
@@ -1287,9 +1287,10 @@ class Topology():
1287
1287
  if not path:
1288
1288
  print("Topology.ByBREPPath - Error: the input path is not a valid path. Returning None.")
1289
1289
  return None
1290
- file = open(path)
1291
- if not file:
1292
- print("Topology.ByBREPPath - Error: the input file is not a valid file. Returning None.")
1290
+ try:
1291
+ file = open(path)
1292
+ except:
1293
+ print("Topology.ByBREPPath - Error: the BREP file is not a valid file. Returning None.")
1293
1294
  return None
1294
1295
  return Topology.ByBREPFile(file)
1295
1296
 
@@ -1668,9 +1669,10 @@ class Topology():
1668
1669
  if not path:
1669
1670
  print("Topology.ByJSONPath - Error: the input path is not a valid path. Returning None.")
1670
1671
  return None
1671
- file = open(path)
1672
- if not file:
1673
- print("Topology.ByJSONPath - Error: the input file is not a valid file. Returning None.")
1672
+ try:
1673
+ file = open(path)
1674
+ except:
1675
+ print("Topology.ByJSONPath - Error: the JSON file is not a valid file. Returning None.")
1674
1676
  return None
1675
1677
  return Topology.ByJSONFile(file=file, tolerance=tolerance)
1676
1678
 
@@ -1959,7 +1961,11 @@ class Topology():
1959
1961
  if not path:
1960
1962
  print("Topology.ByOBJPath - Error: the input path is not a valid path. Returning None.")
1961
1963
  return None
1962
- file = open(path)
1964
+ try:
1965
+ file = open(path)
1966
+ except:
1967
+ print("Topology.ByOBJPath - Error: the OBJ file is not a valid file. Returning None.")
1968
+ return None
1963
1969
  return Topology.ByOBJFile(file, transposeAxes=transposeAxes, progressBar=progressBar, renderer=renderer, tolerance=tolerance)
1964
1970
 
1965
1971
  @staticmethod
@@ -2184,7 +2190,11 @@ class Topology():
2184
2190
  if not path:
2185
2191
  print("Topology.ByXYZPath - Error: the input path is not a valid path. Returning None.")
2186
2192
  return None
2187
- file = open(path)
2193
+ try:
2194
+ file = open(path)
2195
+ except:
2196
+ print("Topology.ByXYZPath - Error: the XYZ file is not a valid file. Returning None.")
2197
+ return None
2188
2198
  return Topology.ByXYZFile(file, frameIdKey=frameIdKey, vertexIdKey=frameIdKey)
2189
2199
 
2190
2200
  @staticmethod
@@ -2,7 +2,7 @@ import sys
2
2
  import os, re
3
3
  from sys import platform
4
4
 
5
- __version__ = '0.4.24'
5
+ __version__ = '0.4.26'
6
6
  __version_info__ = tuple([ int(num) for num in __version__.split('.')])
7
7
 
8
8
  if platform == 'win32':
@@ -14,7 +14,7 @@ sitePackagesFolderName = os.path.join(os.path.dirname(os.path.realpath(__file__)
14
14
  test1 = os.path.dirname(os.path.realpath(__file__))
15
15
  topologicFolderName = [filename for filename in os.listdir(sitePackagesFolderName) if filename.startswith("topologic")][0]
16
16
  topologicPath = os.path.join(sitePackagesFolderName, topologicFolderName)
17
- sys.path.append(topologicPath)
17
+ sys.path.append(topologicPath.replace(".libs",""))
18
18
 
19
19
  import topologic
20
20
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: topologicpy
3
- Version: 0.4.24
3
+ Version: 0.4.26
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