topologicpy 0.7.48__py3-none-any.whl → 0.7.50__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.
topologicpy/Cell.py CHANGED
@@ -253,6 +253,52 @@ class Cell():
253
253
  faces = Topology.SubTopologies(shell, subTopologyType="face")
254
254
  return Cell.ByFaces(faces, planarize=planarize, tolerance=tolerance)
255
255
 
256
+
257
+ @staticmethod
258
+ def ByShells(externalBoundary, internalBoundaries: list = [], tolerance: float = 0.0001, silent: bool = False):
259
+ """
260
+ Creates a cell from the input external boundary (closed shell) and the input list of internal boundaries (closed shells).
261
+
262
+ Parameters
263
+ ----------
264
+ externalBoundary : topologic_core.Shell
265
+ The input external boundary.
266
+ internalBoundaries : list , optional
267
+ The input list of internal boundaries (closed shells). The default is an empty list.
268
+ tolerance : float , optional
269
+ The desired tolerance. The default is 0.0001.
270
+ silent : bool , optional
271
+ If set to True, no error and warning messages are printed. Otherwise, they are. The default is False.
272
+
273
+ Returns
274
+ -------
275
+ topologic_core.Cell
276
+ The created cell.
277
+
278
+ """
279
+ from topologicpy.Shell import Shell
280
+ from topologicpy.Cluster import Cluster
281
+ from topologicpy.Topology import Topology
282
+
283
+ if not Topology.IsInstance(externalBoundary, "Shell"):
284
+ if not silent:
285
+ print("Cell.ByShells - Error: The input externalBoundary parameter is not a valid topologic shell. Returning None.")
286
+ return None
287
+ if not Shell.IsClosed(externalBoundary):
288
+ if not silent:
289
+ print("Cell.ByShells - Error: The input externalBoundary parameter is not a closed topologic shell. Returning None.")
290
+ return None
291
+ ibList = [Cell.ByShell(s) for s in internalBoundaries if Topology.IsInstance(s, "Shell") and Shell.IsClosed(s)]
292
+ cell = Cell.ByShell(externalBoundary)
293
+ if len(ibList) > 0:
294
+ inner_cluster =Cluster.ByTopologies(ibList)
295
+ cell = Topology.Difference(cell, inner_cluster)
296
+ if not Topology.IsInstance(cell, "Cell"):
297
+ if not silent:
298
+ print("Cell.ByShells - Error: Could not create cell. Returning None.")
299
+ return None
300
+ return cell
301
+
256
302
  @staticmethod
257
303
  def ByThickenedFace(face, thickness: float = 1.0, bothSides: bool = True, reverse: bool = False,
258
304
  planarize: bool = False, tolerance: float = 0.0001):
topologicpy/Topology.py CHANGED
@@ -205,6 +205,59 @@ class Topology():
205
205
  """
206
206
  Adds the input list of apertures to the input topology or to its subtopologies based on the input subTopologyType.
207
207
 
208
+ Parameters
209
+ ----------
210
+ topology : topologic_core.Topology
211
+ The input topology.
212
+ apertures : list
213
+ The input list of apertures.
214
+ exclusive : bool , optional
215
+ If set to True, one (sub)topology will accept only one aperture. Otherwise, one (sub)topology can accept multiple apertures. The default is False.
216
+ subTopologyType : string , optional
217
+ The subtopology type to which to add the apertures. This can be "cell", "face", "edge", or "vertex". It is case insensitive. If set to None, the apertures will be added to the input topology. The default is None.
218
+ tolerance : float , optional
219
+ The desired tolerance. The default is 0.001. This is larger than the usual 0.0001 as it seems to work better.
220
+
221
+ Returns
222
+ -------
223
+ topologic_core.Topology
224
+ The input topology with the apertures added to it.
225
+
226
+ """
227
+ from topologicpy.Dictionary import Dictionary
228
+
229
+ if not Topology.IsInstance(topology, "Topology"):
230
+ print("Topology.AddApertures - Error: The input topology parameter is not a valid topology. Returning None.")
231
+ return None
232
+ if not apertures:
233
+ return topology
234
+ if not isinstance(apertures, list):
235
+ print("Topology.AddApertures - Error: the input apertures parameter is not a list. Returning None.")
236
+ return None
237
+ apertures = [x for x in apertures if Topology.IsInstance(x, "Topology")]
238
+ if len(apertures) < 1:
239
+ return topology
240
+ if not subTopologyType:
241
+ subTopologyType = "self"
242
+ if not subTopologyType.lower() in ["self", "cell", "face", "edge", "vertex"]:
243
+ print("Topology.AddApertures - Error: the input subtopology type parameter is not a recognized type. Returning None.")
244
+ return None
245
+
246
+ for aperture in apertures:
247
+ d = Topology.Dictionary(aperture)
248
+ d = Dictionary.SetValueAtKey(d, "type", "aperture")
249
+ aperture = Topology.SetDictionary(aperture, d)
250
+
251
+ topology = Topology.AddContent(topology, apertures, subTopologyType=subTopologyType, tolerance=tolerance)
252
+ return topology
253
+
254
+
255
+
256
+ @staticmethod
257
+ def AddApertures_old(topology, apertures, exclusive=False, subTopologyType=None, tolerance=0.001):
258
+ """
259
+ Adds the input list of apertures to the input topology or to its subtopologies based on the input subTopologyType.
260
+
208
261
  Parameters
209
262
  ----------
210
263
  topology : topologic_core.Topology
@@ -794,6 +847,9 @@ class Topology():
794
847
  The list of apertures belonging to the input topology.
795
848
 
796
849
  """
850
+
851
+ from topologicpy.Dictionary import Dictionary
852
+
797
853
  if not Topology.IsInstance(topology, "Topology"):
798
854
  print("Topology.Apertures - Error: the input topology parameter is not a valid topology. Returning None.")
799
855
  return None
@@ -802,6 +858,13 @@ class Topology():
802
858
  subTopologies = []
803
859
  if not subTopologyType:
804
860
  _ = topology.Apertures(apertures)
861
+ contents = Topology.Contents(topology)
862
+ for content in contents:
863
+ d = Topology.Dictionary(content)
864
+ if len(Dictionary.Keys(d)) > 0:
865
+ type = Dictionary.ValueAtKey(d,"type")
866
+ if type == "aperture":
867
+ apertures.append(content)
805
868
  elif subTopologyType.lower() == "vertex":
806
869
  subTopologies = Topology.Vertices(topology)
807
870
  elif subTopologyType.lower() == "edge":
@@ -2164,6 +2227,8 @@ class Topology():
2164
2227
  from topologicpy.Cluster import Cluster
2165
2228
  from topologicpy.Dictionary import Dictionary
2166
2229
  import uuid
2230
+ import random
2231
+ import hashlib
2167
2232
 
2168
2233
  try:
2169
2234
  import ifcopenshell
@@ -2184,34 +2249,72 @@ class Topology():
2184
2249
  if not file:
2185
2250
  print("Topology.ByIFCFile - Error: the input file parameter is not a valid file. Returning None.")
2186
2251
  return None
2252
+
2253
+ # Function to generate a unique random color based on material ID
2254
+ def generate_color_for_material(material_id):
2255
+ # Use a hash function to get a consistent "random" seed
2256
+ hash_object = hashlib.sha1(material_id.encode())
2257
+ seed = int(hash_object.hexdigest(), 16) % (10 ** 8)
2258
+ random.seed(seed)
2259
+ # Generate a random color
2260
+ r = random.random()
2261
+ g = random.random()
2262
+ b = random.random()
2263
+ return [r, g, b]
2264
+
2265
+ # Function to get the material IDs associated with an entity
2266
+ def get_material_ids_of_entity(entity):
2267
+ material_name = "None"
2268
+ material_ids = []
2269
+ if hasattr(entity, "HasAssociations"):
2270
+ for association in entity.HasAssociations:
2271
+ if association.is_a("IfcRelAssociatesMaterial"):
2272
+ material = association.RelatingMaterial
2273
+ material_name = material.Name
2274
+ if material.is_a("IfcMaterial"):
2275
+ material_ids.append(material.id())
2276
+ elif material.is_a("IfcMaterialList"):
2277
+ for mat in material.Materials:
2278
+ material_ids.append(mat.id())
2279
+ elif material.is_a("IfcMaterialLayerSetUsage") or material.is_a("IfcMaterialLayerSet"):
2280
+ for layer in material.ForLayerSet.MaterialLayers:
2281
+ material_ids.append(layer.Material.id())
2282
+ elif material.is_a("IfcMaterialConstituentSet"):
2283
+ for constituent in material.MaterialConstituents:
2284
+ material_ids.append(constituent.Material.id())
2285
+
2286
+ return material_ids, material_name
2287
+
2288
+
2289
+
2187
2290
  includeTypes = [s.lower() for s in includeTypes]
2188
2291
  excludeTypes = [s.lower() for s in excludeTypes]
2189
2292
  topologies = []
2190
2293
  settings = ifcopenshell.geom.settings()
2191
2294
  settings.set("dimensionality", ifcopenshell.ifcopenshell_wrapper.CURVES_SURFACES_AND_SOLIDS)
2192
2295
  settings.set(settings.USE_WORLD_COORDS, True)
2193
- iterator = ifcopenshell.geom.iterator(settings, file, multiprocessing.cpu_count())
2194
- if iterator.initialize():
2195
- while True:
2196
- shape = iterator.get()
2197
- is_a = shape.type.lower()
2198
- if (is_a in includeTypes or len(includeTypes) == 0) and (not is_a in excludeTypes):
2199
- try:
2296
+ #iterator = ifcopenshell.geom.iterator(settings, file, multiprocessing.cpu_count())
2297
+ for entity in file.by_type('IfcProduct'): # You might want to refine the types you check
2298
+ if hasattr(entity, "Representation") and entity.Representation:
2299
+ for rep in entity.Representation.Representations:
2300
+ if rep.is_a("IfcShapeRepresentation"):
2301
+ # Generate the geometry for this entity
2302
+ shape = ifcopenshell.geom.create_shape(settings, entity)
2303
+ is_a = shape.type.lower()
2304
+ if (is_a in includeTypes or len(includeTypes) == 0) and (not is_a in excludeTypes):
2200
2305
  verts = shape.geometry.verts
2201
2306
  edges = shape.geometry.edges
2202
2307
  faces = shape.geometry.faces
2203
2308
  grouped_verts = [ [verts[i], verts[i + 1], verts[i + 2]] for i in range(0, len(verts), 3)]
2204
2309
  grouped_edges = [[edges[i], edges[i + 1]] for i in range(0, len(edges), 2)]
2205
2310
  grouped_faces = [ [faces[i], faces[i + 1], faces[i + 2]] for i in range(0, len(faces), 3)]
2206
- topology = Topology.ByGeometry(grouped_verts, grouped_edges, grouped_faces)
2311
+ topology = Topology.SelfMerge(Topology.ByGeometry(grouped_verts, grouped_edges, grouped_faces))
2207
2312
  if removeCoplanarFaces:
2208
2313
  topology = Topology.RemoveCoplanarFaces(topology)
2209
2314
  topologies.append(topology)
2210
2315
  if transferDictionaries:
2211
2316
  keys = []
2212
2317
  values = []
2213
- keys.append("TOPOLOGIC_color")
2214
- values.append([1.0, 1.0, 1.0, 1.0])
2215
2318
  keys.append("TOPOLOGIC_id")
2216
2319
  values.append(str(uuid.uuid4()))
2217
2320
  keys.append("TOPOLOGIC_name")
@@ -2228,13 +2331,17 @@ class Topology():
2228
2331
  values.append(shape.name)
2229
2332
  keys.append("IFC_type")
2230
2333
  values.append(shape.type)
2334
+ material_ids, material_name = get_material_ids_of_entity(entity)
2335
+ keys.append("IFC_material_ids")
2336
+ values.append(material_ids)
2337
+ keys.append("IFC_material_name")
2338
+ values.append(material_name)
2339
+ keys.append("TOPOLOGIC_color")
2340
+ color = generate_color_for_material(str(material_ids))
2341
+ values.append(color)
2231
2342
  d = Dictionary.ByKeysValues(keys, values)
2232
2343
  topology = Topology.SetDictionary(topology, d)
2233
2344
  topologies.append(topology)
2234
- except:
2235
- pass
2236
- if not iterator.next():
2237
- break
2238
2345
  return topologies
2239
2346
 
2240
2347
  @staticmethod
@@ -2325,12 +2432,249 @@ class Topology():
2325
2432
  if not file:
2326
2433
  print("Topology.ByJSONFile - Error: the input file parameter is not a valid file. Returning None.")
2327
2434
  return None
2328
- jsonData = json.load(file)
2329
- jsonString = json.dumps(jsonData)
2330
- return Topology.ByJSONString(jsonString, tolerance=tolerance)
2435
+ json_string = json.load(file)
2436
+ #jsonData = json.load(file)
2437
+ #jsonString = json.dumps(jsonData)
2438
+ return Topology.ByJSONString(json_string, tolerance=tolerance)
2439
+
2440
+ @staticmethod
2441
+ def ByJSONPath(path, tolerance=0.0001):
2442
+ """
2443
+ Imports the topology from a JSON file.
2444
+
2445
+ Parameters
2446
+ ----------
2447
+ path : str
2448
+ The file path to the json file.
2449
+ tolerance : float , optional
2450
+ The desired tolerance. The default is 0.0001.
2451
+
2452
+ Returns
2453
+ -------
2454
+ list
2455
+ The list of imported topologies.
2456
+
2457
+ """
2458
+ import json
2459
+ if not path:
2460
+ print("Topology.ByJSONPath - Error: the input path parameter is not a valid path. Returning None.")
2461
+ return None
2462
+ with open(path) as file:
2463
+ json_string = json.load(file)
2464
+ entities = Topology.ByJSONString(json_string, tolerance=tolerance)
2465
+ return entities
2331
2466
 
2332
2467
  @staticmethod
2333
- def ByJSONString(string, progressBar=False, tolerance=0.0001):
2468
+ def ByJSONString(string, tolerance=0.0001):
2469
+ """
2470
+ Imports the topology from a JSON string.
2471
+
2472
+ Parameters
2473
+ ----------
2474
+ string : str
2475
+ The input JSON string.
2476
+ tolerance : float , optional
2477
+ The desired tolerance. The default is 0.0001.
2478
+
2479
+ Returns
2480
+ -------
2481
+ list or topologicpy.Topology
2482
+ The list of imported topologies. If the list only contains one element, it returns that element.
2483
+
2484
+ """
2485
+ from topologicpy.Vertex import Vertex
2486
+ from topologicpy.Edge import Edge
2487
+ from topologicpy.Wire import Wire
2488
+ from topologicpy.Face import Face
2489
+ from topologicpy.Shell import Shell
2490
+ from topologicpy.Cell import Cell
2491
+ from topologicpy.CellComplex import CellComplex
2492
+ from topologicpy.Dictionary import Dictionary
2493
+
2494
+ # Containers for created entities
2495
+ vertices = {}
2496
+ edges = {}
2497
+ wires = {}
2498
+ faces = {}
2499
+ shells = {}
2500
+ cells = {}
2501
+ cell_complexes = {}
2502
+
2503
+ vertex_apertures = []
2504
+ edge_apertures = []
2505
+ face_apertures = []
2506
+ # Step 2: Create Entities and handle apertures
2507
+ for entity in string:
2508
+ entity_type = entity['type']
2509
+ entity_dict = Dictionary.ByKeysValues(keys=list(entity['dictionary'].keys()),
2510
+ values=list(entity['dictionary'].values()))
2511
+
2512
+ parent_entity = None
2513
+
2514
+ # Create basic topological entities
2515
+ if entity_type == 'Vertex':
2516
+ parent_entity = Vertex.ByCoordinates(*entity['coordinates'])
2517
+ parent_entity = Topology.SetDictionary(parent_entity, entity_dict)
2518
+ vertices[entity['uuid']] = parent_entity
2519
+
2520
+ elif entity_type == 'Edge':
2521
+ vertex1 = vertices[entity['vertices'][0]]
2522
+ vertex2 = vertices[entity['vertices'][1]]
2523
+ parent_entity = Edge.ByVertices([vertex1, vertex2])
2524
+ parent_entity = Topology.SetDictionary(parent_entity, entity_dict)
2525
+ edges[entity['uuid']] = parent_entity
2526
+
2527
+ elif entity_type == 'Wire':
2528
+ wire_edges = [edges[uuid] for uuid in entity['edges']]
2529
+ parent_entity = Wire.ByEdges(wire_edges)
2530
+ parent_entity = Topology.SetDictionary(parent_entity, entity_dict)
2531
+ wires[entity['uuid']] = parent_entity
2532
+
2533
+ elif entity_type == 'Face':
2534
+ face_wires = [wires[uuid] for uuid in entity['wires']]
2535
+ if len(face_wires) > 1:
2536
+ parent_entity = Face.ByWires(face_wires[0], face_wires[1:])
2537
+ else:
2538
+ parent_entity = Face.ByWire(face_wires[0])
2539
+ parent_entity = Topology.SetDictionary(parent_entity, entity_dict)
2540
+ faces[entity['uuid']] = parent_entity
2541
+
2542
+ elif entity_type == 'Shell':
2543
+ shell_faces = [faces[uuid] for uuid in entity['faces']]
2544
+ parent_entity = Shell.ByFaces(shell_faces)
2545
+ parent_entity = Topology.SetDictionary(parent_entity, entity_dict)
2546
+ shells[entity['uuid']] = parent_entity
2547
+
2548
+ elif entity_type == 'Cell':
2549
+ cell_shells = [shells[uuid] for uuid in entity['shells']]
2550
+ if len(cell_shells) > 1:
2551
+ parent_entity = Cell.ByShells(cell_shells[0], cell_shells[1:])
2552
+ else:
2553
+ parent_entity = Cell.ByShell(cell_shells[0])
2554
+ parent_entity = Topology.SetDictionary(parent_entity, entity_dict)
2555
+ cells[entity['uuid']] = parent_entity
2556
+
2557
+ elif entity_type == 'CellComplex':
2558
+ complex_cells = [cells[uuid] for uuid in entity['cells']]
2559
+ parent_entity = CellComplex.ByCells(complex_cells)
2560
+ parent_entity = Topology.SetDictionary(parent_entity, entity_dict)
2561
+ cell_complexes[entity['uuid']] = parent_entity
2562
+
2563
+ # Step 3: Handle apertures within each entity
2564
+ if 'apertures' in entity:
2565
+ # Containers for created entities
2566
+ ap_vertices = {}
2567
+ ap_edges = {}
2568
+ ap_wires = {}
2569
+ ap_faces = {}
2570
+ for aperture_list in entity['apertures']:
2571
+ types = [aperture_data['type'] for aperture_data in aperture_list]
2572
+ save_vertex = False
2573
+ save_edge = False
2574
+ save_wire = False
2575
+ save_face = False
2576
+
2577
+ if 'Face' in types:
2578
+ save_face = True
2579
+ elif 'Wire' in types:
2580
+ save_wire = True
2581
+ elif 'Edge' in types:
2582
+ save_edge = True
2583
+ elif 'Vertex' in types:
2584
+ save_vertex = True
2585
+
2586
+ apertures = []
2587
+ for aperture_data in aperture_list:
2588
+ aperture_type = aperture_data['type']
2589
+ aperture_dict = Dictionary.ByKeysValues(keys=list(aperture_data['dictionary'].keys()),
2590
+ values=list(aperture_data['dictionary'].values()))
2591
+
2592
+ if aperture_type == 'Vertex':
2593
+ aperture_entity = Vertex.ByCoordinates(*aperture_data['coordinates'])
2594
+ aperture_entity = Topology.SetDictionary(aperture_entity, aperture_dict)
2595
+ ap_vertices[aperture_data['uuid']] = aperture_entity
2596
+ if save_vertex == True:
2597
+ apertures.append(aperture_entity)
2598
+
2599
+ elif aperture_type == 'Edge':
2600
+ vertex1 = ap_vertices[aperture_data['vertices'][0]]
2601
+ vertex2 = ap_vertices[aperture_data['vertices'][1]]
2602
+ aperture_entity = Edge.ByVertices([vertex1, vertex2])
2603
+ aperture_entity = Topology.SetDictionary(aperture_entity, aperture_dict)
2604
+ ap_edges[aperture_data['uuid']] = aperture_entity
2605
+ if save_edge == True:
2606
+ apertures.append(aperture_entity)
2607
+
2608
+ elif aperture_type == 'Wire':
2609
+ wire_edges = [ap_edges[uuid] for uuid in aperture_data['edges']]
2610
+ aperture_entity = Wire.ByEdges(wire_edges)
2611
+ aperture_entity = Topology.SetDictionary(aperture_entity, aperture_dict)
2612
+ ap_wires[aperture_data['uuid']] = aperture_entity
2613
+ if save_wire == True:
2614
+ apertures.append(aperture_entity)
2615
+
2616
+ elif aperture_type == 'Face':
2617
+ face_wires = [ap_wires[uuid] for uuid in aperture_data['wires']]
2618
+ if len(face_wires) > 1:
2619
+ aperture_entity = Face.ByWires(face_wires[0], face_wires[1:])
2620
+ else:
2621
+ aperture_entity = Face.ByWire(face_wires[0])
2622
+ aperture_entity = Topology.SetDictionary(aperture_entity, aperture_dict)
2623
+ ap_faces[aperture_data['uuid']] = aperture_entity
2624
+ if save_face == True:
2625
+ apertures.append(aperture_entity)
2626
+
2627
+ # Assign the built apertures to the parent entity
2628
+ if len(apertures) > 0:
2629
+ if entity_type == "Face":
2630
+ face_apertures += apertures
2631
+ elif entity_type == 'Edge':
2632
+ edge_apertures += apertures
2633
+ elif entity_type == 'Vertex':
2634
+ vertex_apertures += apertures
2635
+
2636
+ # Update the parent entity in its respective container
2637
+ if entity_type == 'Vertex':
2638
+ vertices[entity['uuid']] = parent_entity
2639
+ elif entity_type == 'Edge':
2640
+ edges[entity['uuid']] = parent_entity
2641
+ elif entity_type == 'Wire':
2642
+ wires[entity['uuid']] = parent_entity
2643
+ elif entity_type == 'Face':
2644
+ faces[entity['uuid']] = parent_entity
2645
+ elif entity_type == 'Shell':
2646
+ shells[entity['uuid']] = parent_entity
2647
+ elif entity_type == 'Cell':
2648
+ cells[entity['uuid']] = parent_entity
2649
+ elif entity_type == 'CellComplex':
2650
+ cell_complexes[entity['uuid']] = parent_entity
2651
+
2652
+ d = Topology.Dictionary(parent_entity)
2653
+ top_level = Dictionary.ValueAtKey(d, "toplevel")
2654
+ tp_vertices = list(vertices.values())
2655
+ tp_edges = list(edges.values())
2656
+ tp_wires = list(wires.values())
2657
+ tp_faces = list(faces.values())
2658
+ tp_shells = list(shells.values())
2659
+ tp_cells = list(cells.values())
2660
+ tp_cell_complexes = list(cell_complexes.values())
2661
+ everything = tp_vertices + tp_edges + tp_wires + tp_faces + tp_shells + tp_cells + tp_cell_complexes
2662
+ top_level_list = []
2663
+ for entity in everything:
2664
+ d = Topology.Dictionary(entity)
2665
+ top_level = Dictionary.ValueAtKey(d, "toplevel")
2666
+ if top_level == 1:
2667
+ if len(face_apertures) > 0:
2668
+ entity = Topology.AddApertures(entity, face_apertures, subTopologyType="Face", tolerance=tolerance)
2669
+ if len(edge_apertures) > 0:
2670
+ entity = Topology.AddApertures(entity, edge_apertures, subTopologyType="Edge", tolerance=0.001)
2671
+ if len(vertex_apertures) > 0:
2672
+ entity = Topology.AddApertures(entity, vertex_apertures, subTopologyType="Vertex", tolerance=0.001)
2673
+ top_level_list.append(entity)
2674
+ return top_level_list
2675
+
2676
+ @staticmethod
2677
+ def ByJSONString_old(string, progressBar=False, tolerance=0.0001):
2334
2678
  """
2335
2679
  Imports the topology from a JSON string.
2336
2680
 
@@ -2797,32 +3141,6 @@ class Topology():
2797
3141
  return return_topologies[0]
2798
3142
  else:
2799
3143
  return return_topologies
2800
-
2801
- @staticmethod
2802
- def ByJSONPath(path, tolerance=0.0001):
2803
- """
2804
- Imports the topology from a JSON file.
2805
-
2806
- Parameters
2807
- ----------
2808
- path : str
2809
- The file path to the json file.
2810
- tolerance : float , optional
2811
- The desired tolerance. The default is 0.0001.
2812
-
2813
- Returns
2814
- -------
2815
- list
2816
- The list of imported topologies.
2817
-
2818
- """
2819
- if not path:
2820
- print("Topology.ByJSONPath - Error: the input path parameter is not a valid path. Returning None.")
2821
- return None
2822
- data = None
2823
- with open(path) as file:
2824
- data = Topology.ByJSONFile(file=file, tolerance=tolerance)
2825
- return data
2826
3144
 
2827
3145
  @staticmethod
2828
3146
  def ByOBJFile(objFile, mtlFile = None,
topologicpy/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = '0.7.48'
1
+ __version__ = '0.7.50'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: topologicpy
3
- Version: 0.7.48
3
+ Version: 0.7.50
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
  License: MIT License
@@ -1,6 +1,6 @@
1
1
  topologicpy/ANN.py,sha256=XAuUjNvDRK1hhXfo82S-zXmnAPZGEdHJMRdfpu0aJ8I,47901
2
2
  topologicpy/Aperture.py,sha256=p9pUzTQSBWoUaDiug1V1R1hnEIEwYSXFg2t7iRAmNRY,2723
3
- topologicpy/Cell.py,sha256=ITQ9EdWEGNKW57EJTewmIhlgk8hk8McM8ZA5oDmubMk,105866
3
+ topologicpy/Cell.py,sha256=uZ1gNVlfVtpi6sNgyfazP_nqe7mPjarE7MYzf8KoEI4,107930
4
4
  topologicpy/CellComplex.py,sha256=x474N-lo1krpdIGrWRAFRdDup5a_1V-mLORTS6ZGZ7M,48227
5
5
  topologicpy/Cluster.py,sha256=TZXuxzdaUr6OHSWnjWpjCOMlVj6YHBH8aUVbDVsncVA,54999
6
6
  topologicpy/Color.py,sha256=UlmRcCSOhqcM_OyMWz4t3Kr75KcgXDhz3uctAJ2n7Ic,18031
@@ -22,14 +22,14 @@ topologicpy/PyG.py,sha256=3U59QObO56EBwrvaplGeLZhbTao0gJCYhWm3oTpjFAE,109505
22
22
  topologicpy/Shell.py,sha256=joahFtpRQTWJpQOmi3qU4Xe0Sx2XXeayHlXTNx8CzMk,87610
23
23
  topologicpy/Speckle.py,sha256=rUS6PCaxIjEF5_fUruxvMH47FMKg-ohcoU0qAUb-yNM,14267
24
24
  topologicpy/Sun.py,sha256=42tDWMYpwRG7Z2Qjtp94eRgBuqySq7k8TgNUZDK7QxQ,36837
25
- topologicpy/Topology.py,sha256=XyXMuw1jTFdHJbuYNub_ngr9mFHmKxejUR7fe6denlk,366314
25
+ topologicpy/Topology.py,sha256=NONehbPs2Z0J-BaQXRUChCZfTzJSzVngkhojKSxSij8,382087
26
26
  topologicpy/Vector.py,sha256=WQQUbwrg7VKImtxuBUi2i-FRiPT77WlrzLP05gdXKM8,33079
27
27
  topologicpy/Vertex.py,sha256=bLY60YWoMsgCgHk7F7k9F93Sq2FJ6AzUcTfJ83NZfHA,71107
28
28
  topologicpy/Wire.py,sha256=9EJE0Iq3nGz5X7Suy6xxjmuOpfV49By6WH98UAL_7m4,153532
29
29
  topologicpy/__init__.py,sha256=D7ky87CAQMiS2KE6YLvcTLkTgA2PY7rASe6Z23pjp9k,872
30
- topologicpy/version.py,sha256=KnNxq_i4jicb02oPjeBZ0NMhwUqEYyzXll92M-WRkOY,23
31
- topologicpy-0.7.48.dist-info/LICENSE,sha256=BRNw73R2WdDBICtwhI3wm3cxsaVqLTAGuRwrTltcfxs,1068
32
- topologicpy-0.7.48.dist-info/METADATA,sha256=ilMxONif8tLQu-geXJO8L0155g2f77eMTW7Y8LrhvZE,10918
33
- topologicpy-0.7.48.dist-info/WHEEL,sha256=Mdi9PDNwEZptOjTlUcAth7XJDFtKrHYaQMPulZeBCiQ,91
34
- topologicpy-0.7.48.dist-info/top_level.txt,sha256=J30bDzW92Ob7hw3zA8V34Jlp-vvsfIkGzkr8sqvb4Uw,12
35
- topologicpy-0.7.48.dist-info/RECORD,,
30
+ topologicpy/version.py,sha256=gEkNhj8f1k7FiRl8ltgMlJxkt4i1ODTsl0_a2BsR4wI,23
31
+ topologicpy-0.7.50.dist-info/LICENSE,sha256=BRNw73R2WdDBICtwhI3wm3cxsaVqLTAGuRwrTltcfxs,1068
32
+ topologicpy-0.7.50.dist-info/METADATA,sha256=bQrEvJSs5DBgeaLDmx_HZPF_Qz_rZCXSLa3YUuOa33s,10918
33
+ topologicpy-0.7.50.dist-info/WHEEL,sha256=UvcQYKBHoFqaQd6LKyqHw9fxEolWLQnlzP0h_LgJAfI,91
34
+ topologicpy-0.7.50.dist-info/top_level.txt,sha256=J30bDzW92Ob7hw3zA8V34Jlp-vvsfIkGzkr8sqvb4Uw,12
35
+ topologicpy-0.7.50.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (73.0.1)
2
+ Generator: setuptools (74.0.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5