topologicpy 0.8.92__py3-none-any.whl → 0.8.93__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/Topology.py +62 -43
- topologicpy/version.py +1 -1
- {topologicpy-0.8.92.dist-info → topologicpy-0.8.93.dist-info}/METADATA +1 -1
- {topologicpy-0.8.92.dist-info → topologicpy-0.8.93.dist-info}/RECORD +7 -7
- {topologicpy-0.8.92.dist-info → topologicpy-0.8.93.dist-info}/WHEEL +0 -0
- {topologicpy-0.8.92.dist-info → topologicpy-0.8.93.dist-info}/licenses/LICENSE +0 -0
- {topologicpy-0.8.92.dist-info → topologicpy-0.8.93.dist-info}/top_level.txt +0 -0
topologicpy/Topology.py
CHANGED
|
@@ -838,10 +838,15 @@ class Topology():
|
|
|
838
838
|
"""
|
|
839
839
|
|
|
840
840
|
from topologicpy.Dictionary import Dictionary
|
|
841
|
+
import inspect
|
|
841
842
|
|
|
842
843
|
if not Topology.IsInstance(topology, "Topology"):
|
|
843
844
|
if not silent:
|
|
844
845
|
print("Topology.Apertures - Error: the input topology parameter is not a valid topology. Returning None.")
|
|
846
|
+
print("Topology:", topology)
|
|
847
|
+
curframe = inspect.currentframe()
|
|
848
|
+
calframe = inspect.getouterframes(curframe, 2)
|
|
849
|
+
print('caller name:', calframe[1][3])
|
|
845
850
|
return None
|
|
846
851
|
|
|
847
852
|
apertures = []
|
|
@@ -2521,39 +2526,41 @@ class Topology():
|
|
|
2521
2526
|
f = Face.ByWires(eb, ib)
|
|
2522
2527
|
new_faces.append(f)
|
|
2523
2528
|
topology = Topology.SelfMerge(Cluster.ByTopologies(new_faces))
|
|
2524
|
-
if
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
if
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2529
|
+
if Topology.IsInstance(topology, "topology"):
|
|
2530
|
+
if removeCoplanarFaces:
|
|
2531
|
+
topology = Topology.RemoveCoplanarFaces(topology, epsilon=epsilon, tolerance=tolerance)
|
|
2532
|
+
if Topology.IsInstance(topology, "topology"):
|
|
2533
|
+
if transferDictionaries:
|
|
2534
|
+
element_dict = {
|
|
2535
|
+
"TOPOLOGIC_id": str(Topology.UUID(topology)),
|
|
2536
|
+
"TOPOLOGIC_name": getattr(element, 'Name', "Untitled"),
|
|
2537
|
+
"TOPOLOGIC_type": Topology.TypeAsString(topology),
|
|
2538
|
+
"IFC_global_id": getattr(element, 'GlobalId', 0),
|
|
2539
|
+
"IFC_name": getattr(element, 'Name', "Untitled"),
|
|
2540
|
+
"IFC_type": element_type
|
|
2541
|
+
}
|
|
2542
|
+
|
|
2543
|
+
# Optionally add property sets
|
|
2544
|
+
psets = {}
|
|
2545
|
+
if hasattr(element, 'IsDefinedBy'):
|
|
2546
|
+
for rel in element.IsDefinedBy:
|
|
2547
|
+
if rel.is_a('IfcRelDefinesByProperties'):
|
|
2548
|
+
pdef = rel.RelatingPropertyDefinition
|
|
2549
|
+
if pdef and pdef.is_a('IfcPropertySet'):
|
|
2550
|
+
key = f"IFC_{pdef.Name}"
|
|
2551
|
+
props = {}
|
|
2552
|
+
for prop in pdef.HasProperties:
|
|
2553
|
+
if prop.is_a('IfcPropertySingleValue') and prop.NominalValue:
|
|
2554
|
+
props[f"IFC_{prop.Name}"] = prop.NominalValue.wrappedValue
|
|
2555
|
+
psets[key] = props
|
|
2556
|
+
|
|
2557
|
+
final_dict = Dictionary.ByPythonDictionary(element_dict)
|
|
2558
|
+
if psets:
|
|
2559
|
+
pset_dict = Dictionary.ByPythonDictionary(psets)
|
|
2560
|
+
final_dict = Dictionary.ByMergedDictionaries([final_dict, pset_dict])
|
|
2561
|
+
|
|
2562
|
+
topology = Topology.SetDictionary(topology, final_dict)
|
|
2563
|
+
topologies.append(topology)
|
|
2557
2564
|
if not it.next():
|
|
2558
2565
|
break
|
|
2559
2566
|
|
|
@@ -11904,7 +11911,7 @@ class Topology():
|
|
|
11904
11911
|
return Topology._Boolean(topologyA, topologyB, operation="union", tranDict=tranDict, tolerance=tolerance, silent=silent)
|
|
11905
11912
|
|
|
11906
11913
|
@staticmethod
|
|
11907
|
-
def UUID(topology, namespace="topologicpy"):
|
|
11914
|
+
def UUID(topology, namespace="topologicpy", silent: bool = False):
|
|
11908
11915
|
"""
|
|
11909
11916
|
Generate a UUID v5 based on the provided content and a fixed namespace.
|
|
11910
11917
|
|
|
@@ -11913,7 +11920,9 @@ class Topology():
|
|
|
11913
11920
|
topology : topologic_core.Topology
|
|
11914
11921
|
The input topology
|
|
11915
11922
|
namespace : str , optional
|
|
11916
|
-
The base namescape to use for generating the UUID
|
|
11923
|
+
The base namescape to use for generating the UUID.
|
|
11924
|
+
silent : bool , optional
|
|
11925
|
+
If set to True, error and warning messages are suppressed. Default is False.
|
|
11917
11926
|
|
|
11918
11927
|
Returns
|
|
11919
11928
|
-------
|
|
@@ -11924,6 +11933,16 @@ class Topology():
|
|
|
11924
11933
|
import uuid
|
|
11925
11934
|
from topologicpy.Dictionary import Dictionary
|
|
11926
11935
|
from topologicpy.Graph import Graph
|
|
11936
|
+
import inspect
|
|
11937
|
+
|
|
11938
|
+
if not Topology.IsInstance(topology, "topology"):
|
|
11939
|
+
if not silent:
|
|
11940
|
+
print("Topology.UUID - Error: The input topology parameter is not a valid topology. Returning None.")
|
|
11941
|
+
print("Topology:", topology)
|
|
11942
|
+
curframe = inspect.currentframe()
|
|
11943
|
+
calframe = inspect.getouterframes(curframe, 2)
|
|
11944
|
+
print('caller name:', calframe[1][3])
|
|
11945
|
+
return None
|
|
11927
11946
|
|
|
11928
11947
|
predefined_namespace_dns = uuid.UUID('6ba7b810-9dad-11d1-80b4-00c04fd430c8')
|
|
11929
11948
|
namespace_uuid = uuid.uuid5(predefined_namespace_dns, namespace)
|
|
@@ -11935,14 +11954,14 @@ class Topology():
|
|
|
11935
11954
|
final_str = verts_str+edges_str+dict_str
|
|
11936
11955
|
uuid_str = uuid.uuid5(namespace_uuid, final_str)
|
|
11937
11956
|
else:
|
|
11938
|
-
cellComplexes = Topology.CellComplexes(topology, silent=True)
|
|
11939
|
-
cells = Topology.Cells(topology, silent=True)
|
|
11940
|
-
shells = Topology.Shells(topology, silent=True)
|
|
11941
|
-
faces = Topology.Faces(topology, silent=True)
|
|
11942
|
-
wires = Topology.Wires(topology, silent=True)
|
|
11943
|
-
edges = Topology.Edges(topology, silent=True)
|
|
11944
|
-
vertices = Topology.Vertices(topology, silent=True)
|
|
11945
|
-
apertures = Topology.Apertures(topology, subTopologyType="all")
|
|
11957
|
+
cellComplexes = Topology.CellComplexes(topology, silent=True) or []
|
|
11958
|
+
cells = Topology.Cells(topology, silent=True) or []
|
|
11959
|
+
shells = Topology.Shells(topology, silent=True) or []
|
|
11960
|
+
faces = Topology.Faces(topology, silent=True) or []
|
|
11961
|
+
wires = Topology.Wires(topology, silent=True) or []
|
|
11962
|
+
edges = Topology.Edges(topology, silent=True) or []
|
|
11963
|
+
vertices = Topology.Vertices(topology, silent=True) or []
|
|
11964
|
+
apertures = Topology.Apertures(topology, subTopologyType="all") or []
|
|
11946
11965
|
subTopologies = cellComplexes+cells+shells+faces+wires+edges+vertices+apertures
|
|
11947
11966
|
dictionaries = [Dictionary.PythonDictionary(Topology.Dictionary(topology))]
|
|
11948
11967
|
dictionaries += [Dictionary.PythonDictionary(Topology.Dictionary(s)) for s in subTopologies]
|
topologicpy/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = '0.8.
|
|
1
|
+
__version__ = '0.8.93'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: topologicpy
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.93
|
|
4
4
|
Summary: An AI-Powered Spatial Modelling and Analysis Software Library for Architecture, Engineering, and Construction.
|
|
5
5
|
Author-email: Wassim Jabi <wassim.jabi@gmail.com>
|
|
6
6
|
License: AGPL v3 License
|
|
@@ -26,14 +26,14 @@ topologicpy/ShapeGrammar.py,sha256=q_BvMKOBDW3GVSRjPLIGAZkHW2egw3mTOPzIyEpYOLg,2
|
|
|
26
26
|
topologicpy/Shell.py,sha256=2EPzDT_t0IAjBRYPDuKNAz_Ax_HaEkvNpXBxDkPdcTg,101084
|
|
27
27
|
topologicpy/Speckle.py,sha256=-eiTqJugd7pHiHpD3pDUcDO6CGhVyPV14HFRzaqEoaw,18187
|
|
28
28
|
topologicpy/Sun.py,sha256=ezisiHfc2nd7A_8w0Ykq2VgbS0A9WNSg-tBwvfTQAVM,36735
|
|
29
|
-
topologicpy/Topology.py,sha256=
|
|
29
|
+
topologicpy/Topology.py,sha256=B8Ifgv2rWlfhjzoHeuNOofxML_zEIFDuc-nXUVQHV8g,549927
|
|
30
30
|
topologicpy/Vector.py,sha256=pEC8YY3TeHGfGdeNgvdHjgMDwxGabp5aWjwYC1HSvMk,42236
|
|
31
31
|
topologicpy/Vertex.py,sha256=26TrlX9OCZUN-lMlZG3g4RHTWBqw69NW4AOEgRz_YMo,91269
|
|
32
32
|
topologicpy/Wire.py,sha256=OzMTI5vxJ8XJPgwDAB31666Dz2Sp7H_U9oCnm81gPQA,272312
|
|
33
33
|
topologicpy/__init__.py,sha256=RMftibjgAnHB1vdL-muo71RwMS4972JCxHuRHOlU428,928
|
|
34
|
-
topologicpy/version.py,sha256=
|
|
35
|
-
topologicpy-0.8.
|
|
36
|
-
topologicpy-0.8.
|
|
37
|
-
topologicpy-0.8.
|
|
38
|
-
topologicpy-0.8.
|
|
39
|
-
topologicpy-0.8.
|
|
34
|
+
topologicpy/version.py,sha256=RdWx3Y_QmIJKCA6l7kMMEkyg_LsudVQdkeSqFo0Zk8o,23
|
|
35
|
+
topologicpy-0.8.93.dist-info/licenses/LICENSE,sha256=FK0vJ73LuE8PYJAn7LutsReWR47-Ooovw2dnRe5yV6Q,681
|
|
36
|
+
topologicpy-0.8.93.dist-info/METADATA,sha256=Pt_CPB53UTwU0aiDbVU9mUhHldLyJS4ir40Aj9vylZI,10535
|
|
37
|
+
topologicpy-0.8.93.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
38
|
+
topologicpy-0.8.93.dist-info/top_level.txt,sha256=J30bDzW92Ob7hw3zA8V34Jlp-vvsfIkGzkr8sqvb4Uw,12
|
|
39
|
+
topologicpy-0.8.93.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|