topologicpy 0.8.3__py3-none-any.whl → 0.8.4__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/Plotly.py +4 -12
- topologicpy/Topology.py +200 -5
- topologicpy/version.py +1 -1
- {topologicpy-0.8.3.dist-info → topologicpy-0.8.4.dist-info}/METADATA +6 -6
- {topologicpy-0.8.3.dist-info → topologicpy-0.8.4.dist-info}/RECORD +8 -8
- {topologicpy-0.8.3.dist-info → topologicpy-0.8.4.dist-info}/WHEEL +1 -1
- {topologicpy-0.8.3.dist-info → topologicpy-0.8.4.dist-info}/LICENSE +0 -0
- {topologicpy-0.8.3.dist-info → topologicpy-0.8.4.dist-info}/top_level.txt +0 -0
topologicpy/Plotly.py
CHANGED
@@ -714,15 +714,6 @@ class Plotly:
|
|
714
714
|
traces.append(trace)
|
715
715
|
return traces
|
716
716
|
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
717
|
@staticmethod
|
727
718
|
def DataByTopology(topology,
|
728
719
|
showVertices=True,
|
@@ -1106,9 +1097,10 @@ class Plotly:
|
|
1106
1097
|
faceColor = Dictionary.ValueAtKey(d, key=faceColorKey) or faceColor
|
1107
1098
|
if not faceOpacityKey == None:
|
1108
1099
|
d = Topology.Dictionary(topology)
|
1109
|
-
d_opacity = Dictionary.ValueAtKey(d, key=faceOpacityKey)
|
1110
|
-
if
|
1111
|
-
|
1100
|
+
d_opacity = Dictionary.ValueAtKey(d, key=faceOpacityKey)
|
1101
|
+
if not d_opacity == None:
|
1102
|
+
if 0 <= d_opacity <= 1:
|
1103
|
+
faceOpacity = d_opacity
|
1112
1104
|
if Topology.IsInstance(topology, "Face"):
|
1113
1105
|
tp_faces = [topology]
|
1114
1106
|
else:
|
topologicpy/Topology.py
CHANGED
@@ -6602,9 +6602,9 @@ class Topology():
|
|
6602
6602
|
return None
|
6603
6603
|
return topologic.Topology.IsSame(topologyA, topologyB)
|
6604
6604
|
|
6605
|
-
def
|
6605
|
+
def IsVertexCongruent(topologyA, topologyB, mantissa: int = 6, tolerance=0.0001, silent : bool = False):
|
6606
6606
|
"""
|
6607
|
-
Returns True if the input topologies are vertex matched (have same number of vertices and all vertices are
|
6607
|
+
Returns True if the input topologies are vertex matched (have same number of vertices and all vertices are congruent within a tolerance). Returns False otherwise.
|
6608
6608
|
|
6609
6609
|
Parameters
|
6610
6610
|
----------
|
@@ -6622,7 +6622,7 @@ class Topology():
|
|
6622
6622
|
Returns
|
6623
6623
|
-------
|
6624
6624
|
bool
|
6625
|
-
True of the input topologies are vertex
|
6625
|
+
True of the input topologies are vertex congruent. False otherwise.
|
6626
6626
|
|
6627
6627
|
"""
|
6628
6628
|
from topologicpy.Vertex import Vertex
|
@@ -6683,6 +6683,104 @@ class Topology():
|
|
6683
6683
|
coords_b = [Vertex.Coordinates(v, mantissa=mantissa) for v in vertices_b]
|
6684
6684
|
return coordinates_match(coords_a, coords_b, tolerance=tolerance)
|
6685
6685
|
|
6686
|
+
@staticmethod
|
6687
|
+
def LargestFaces(topology, removeCoplanarFaces: bool = False, epsilon: float = 0.001, tolerance: float = 0.0001, silent: bool = False):
|
6688
|
+
"""
|
6689
|
+
Returns the list of the largest faces found in the input topology.
|
6690
|
+
|
6691
|
+
Parameters
|
6692
|
+
----------
|
6693
|
+
topology : topologic_core.Topology
|
6694
|
+
The input topology.
|
6695
|
+
removeCoplanarFaces : bool , optional
|
6696
|
+
If set to True, coplanar faces are removed to find the true largest faces. Otherwise they are not. The default is False.
|
6697
|
+
epsilon : float , optional
|
6698
|
+
The desired epsilon (another form of tolerance) for finding if two faces are coplanar. The default is 0.01.
|
6699
|
+
tolerance : float , optional
|
6700
|
+
The desired tolerance. The default is 0.0001.
|
6701
|
+
silent : bool , optional
|
6702
|
+
If set to True, no error and warning messages are printed. Otherwise, they are. The default is False.
|
6703
|
+
Returns
|
6704
|
+
-------
|
6705
|
+
list
|
6706
|
+
The list of the largest faces found in the input topology.
|
6707
|
+
|
6708
|
+
"""
|
6709
|
+
from topologicpy.Face import Face
|
6710
|
+
|
6711
|
+
if not Topology.IsInstance(topology, "topology"):
|
6712
|
+
if not silent:
|
6713
|
+
print("Topology.LaregestFaces - Error: The input topology parameter is not a valid topology. Returning None.")
|
6714
|
+
return None
|
6715
|
+
faces = Topology.Faces(topology)
|
6716
|
+
if len(faces) == 0:
|
6717
|
+
if not silent:
|
6718
|
+
print("Topology.LargestFaces - Error: The input topology parameter does not contain any faces. Returning None.")
|
6719
|
+
return None
|
6720
|
+
if len(faces) == 1:
|
6721
|
+
return faces
|
6722
|
+
|
6723
|
+
if removeCoplanarFaces == True:
|
6724
|
+
simple_topology = Topology.RemoveCoplanarFaces(topology)
|
6725
|
+
simple_topology = Topology.RemoveCollinearEdges(simple_topology)
|
6726
|
+
faces = Topology.Faces(simple_topology)
|
6727
|
+
face_areas = [Face.Area(face) for face in faces]
|
6728
|
+
max_area = max(face_areas)
|
6729
|
+
max_faces = []
|
6730
|
+
for i, face_area in enumerate(face_areas):
|
6731
|
+
if abs(max_area - face_area) < tolerance:
|
6732
|
+
max_faces.append(faces[i])
|
6733
|
+
return max_faces
|
6734
|
+
|
6735
|
+
@staticmethod
|
6736
|
+
def LongestEdges(topology, removeCoplanarFaces: bool = False, epsilon: float = 0.001, tolerance: float = 0.0001, silent: bool = False):
|
6737
|
+
"""
|
6738
|
+
Returns the list of the longest edges found in the input topology.
|
6739
|
+
|
6740
|
+
Parameters
|
6741
|
+
----------
|
6742
|
+
topology : topologic_core.Topology
|
6743
|
+
The input topology.
|
6744
|
+
removeCoplanarFaces : bool , optional
|
6745
|
+
If set to True, coplanar faces are removed to find the true longest straight edges. Otherwise they are not. The default is False.
|
6746
|
+
epsilon : float , optional
|
6747
|
+
The desired epsilon (another form of tolerance) for finding if two faces are coplanar. The default is 0.01.
|
6748
|
+
tolerance : float , optional
|
6749
|
+
The desired tolerance. The default is 0.0001.
|
6750
|
+
silent : bool , optional
|
6751
|
+
If set to True, no error and warning messages are printed. Otherwise, they are. The default is False.
|
6752
|
+
Returns
|
6753
|
+
-------
|
6754
|
+
list
|
6755
|
+
The list of of the longest edges found in the input topology.
|
6756
|
+
|
6757
|
+
"""
|
6758
|
+
from topologicpy.Edge import Edge
|
6759
|
+
|
6760
|
+
if not Topology.IsInstance(topology, "topology"):
|
6761
|
+
if not silent:
|
6762
|
+
print("Topology.LongestEdges - Error: The input topology parameter is not a valid topology. Returning None.")
|
6763
|
+
return None
|
6764
|
+
edges = Topology.Edges(topology)
|
6765
|
+
if len(edges) == 0:
|
6766
|
+
if not silent:
|
6767
|
+
print("Topology.LongestEdges - Error: The input topology parameter does not contain any edges. Returning None.")
|
6768
|
+
return None
|
6769
|
+
if len(edges) == 1:
|
6770
|
+
return edges
|
6771
|
+
|
6772
|
+
if removeCoplanarFaces == True:
|
6773
|
+
simple_topology = Topology.RemoveCoplanarFaces(topology)
|
6774
|
+
simple_topology = Topology.RemoveCollinearEdges(simple_topology)
|
6775
|
+
edges = Topology.Edges(simple_topology)
|
6776
|
+
edge_lengths = [Edge.Length(edge) for edge in edges]
|
6777
|
+
max_length = max(edge_lengths)
|
6778
|
+
max_edges = []
|
6779
|
+
for i, edge_length in enumerate(edge_lengths):
|
6780
|
+
if abs(max_length - edge_length) < tolerance:
|
6781
|
+
max_edges.append(edges[i])
|
6782
|
+
return max_edges
|
6783
|
+
|
6686
6784
|
@staticmethod
|
6687
6785
|
def MergeAll(topologies, tolerance=0.0001):
|
6688
6786
|
"""
|
@@ -8172,7 +8270,6 @@ class Topology():
|
|
8172
8270
|
l = None
|
8173
8271
|
return l
|
8174
8272
|
|
8175
|
-
|
8176
8273
|
@staticmethod
|
8177
8274
|
def SharedFaces(topologyA, topologyB):
|
8178
8275
|
"""
|
@@ -8199,7 +8296,56 @@ class Topology():
|
|
8199
8296
|
except:
|
8200
8297
|
l = None
|
8201
8298
|
return l
|
8202
|
-
|
8299
|
+
|
8300
|
+
@staticmethod
|
8301
|
+
def ShortestEdges(topology, removeCoplanarFaces: bool = False, epsilon: float = 0.001, tolerance: float = 0.0001, silent: bool = False):
|
8302
|
+
"""
|
8303
|
+
Returns the list of the shortest edges found in the input topology.
|
8304
|
+
|
8305
|
+
Parameters
|
8306
|
+
----------
|
8307
|
+
topology : topologic_core.Topology
|
8308
|
+
The input topology.
|
8309
|
+
removeCoplanarFaces : bool , optional
|
8310
|
+
If set to True, coplanar faces are removed to find the true shortest straight edges. Otherwise they are not. The default is False.
|
8311
|
+
epsilon : float , optional
|
8312
|
+
The desired epsilon (another form of tolerance) for finding if two faces are coplanar. The default is 0.01.
|
8313
|
+
tolerance : float , optional
|
8314
|
+
The desired tolerance. The default is 0.0001.
|
8315
|
+
silent : bool , optional
|
8316
|
+
If set to True, no error and warning messages are printed. Otherwise, they are. The default is False.
|
8317
|
+
Returns
|
8318
|
+
-------
|
8319
|
+
list
|
8320
|
+
The list of the shortest edges found in the input topology.
|
8321
|
+
|
8322
|
+
"""
|
8323
|
+
from topologicpy.Edge import Edge
|
8324
|
+
|
8325
|
+
if not Topology.IsInstance(topology, "topology"):
|
8326
|
+
if not silent:
|
8327
|
+
print("Topology.ShortestEdges - Error: The input topology parameter is not a valid topology. Returning None.")
|
8328
|
+
return None
|
8329
|
+
edges = Topology.Edges(topology)
|
8330
|
+
if len(edges) == 0:
|
8331
|
+
if not silent:
|
8332
|
+
print("Topology.ShortestEdges - Error: The input topology parameter does not contain any edges. Returning None.")
|
8333
|
+
return None
|
8334
|
+
if len(edges) == 1:
|
8335
|
+
return edges[0]
|
8336
|
+
|
8337
|
+
if removeCoplanarFaces == True:
|
8338
|
+
simple_topology = Topology.RemoveCoplanarFaces(topology)
|
8339
|
+
simple_topology = Topology.RemoveCollinearEdges(simple_topology)
|
8340
|
+
edges = Topology.Edges(simple_topology)
|
8341
|
+
edge_lengths = [Edge.Length(edge) for edge in edges]
|
8342
|
+
min_length = min(edge_lengths)
|
8343
|
+
min_edges = []
|
8344
|
+
for i, edge_length in enumerate(edge_lengths):
|
8345
|
+
if abs(min_length - edge_length) < tolerance:
|
8346
|
+
min_edges.append(edges[i])
|
8347
|
+
return min_edges
|
8348
|
+
|
8203
8349
|
@staticmethod
|
8204
8350
|
def Show(*topologies,
|
8205
8351
|
nameKey = "name",
|
@@ -8618,6 +8764,55 @@ class Topology():
|
|
8618
8764
|
figure = Plotly.AddColorBar(figure, values=cbValues, nTicks=cbTicks, xPosition=cbX, width=cbWidth, outlineWidth=cbOutlineWidth, title=cbTitle, subTitle=cbSubTitle, units=cbUnits, colorScale=colorScale, mantissa=mantissa)
|
8619
8765
|
Plotly.Show(figure=figure, renderer=renderer, camera=camera, center=center, up=up, projection=projection)
|
8620
8766
|
|
8767
|
+
@staticmethod
|
8768
|
+
def SmallestFaces(topology, removeCoplanarFaces: bool = False, epsilon: float = 0.001, tolerance: float = 0.0001, silent: bool = False):
|
8769
|
+
"""
|
8770
|
+
Returns the list of the smallest faces found in the input topology.
|
8771
|
+
|
8772
|
+
Parameters
|
8773
|
+
----------
|
8774
|
+
topology : topologic_core.Topology
|
8775
|
+
The input topology.
|
8776
|
+
removeCoplanarFaces : bool , optional
|
8777
|
+
If set to True, coplanar faces are removed to find the true smallest faces. Otherwise they are not. The default is False.
|
8778
|
+
epsilon : float , optional
|
8779
|
+
The desired epsilon (another form of tolerance) for finding if two faces are coplanar. The default is 0.01.
|
8780
|
+
tolerance : float , optional
|
8781
|
+
The desired tolerance. The default is 0.0001.
|
8782
|
+
silent : bool , optional
|
8783
|
+
If set to True, no error and warning messages are printed. Otherwise, they are. The default is False.
|
8784
|
+
Returns
|
8785
|
+
-------
|
8786
|
+
list
|
8787
|
+
The list of the smallest faces found in the input topology.
|
8788
|
+
|
8789
|
+
"""
|
8790
|
+
from topologicpy.Face import Face
|
8791
|
+
|
8792
|
+
if not Topology.IsInstance(topology, "topology"):
|
8793
|
+
if not silent:
|
8794
|
+
print("Topology.SmallestFaces - Error: The input topology parameter is not a valid topology. Returning None.")
|
8795
|
+
return None
|
8796
|
+
faces = Topology.Faces(topology)
|
8797
|
+
if len(faces) == 0:
|
8798
|
+
if not silent:
|
8799
|
+
print("Topology.SmallestFaces - Error: The input topology parameter does not contain any faces. Returning None.")
|
8800
|
+
return None
|
8801
|
+
if len(faces) == 1:
|
8802
|
+
return faces
|
8803
|
+
|
8804
|
+
if removeCoplanarFaces == True:
|
8805
|
+
simple_topology = Topology.RemoveCoplanarFaces(topology)
|
8806
|
+
simple_topology = Topology.RemoveCollinearEdges(simple_topology)
|
8807
|
+
faces = Topology.Faces(simple_topology)
|
8808
|
+
face_areas = [Face.Area(face) for face in faces]
|
8809
|
+
min_area = min(face_areas)
|
8810
|
+
min_faces = []
|
8811
|
+
for i, face_area in enumerate(face_areas):
|
8812
|
+
if abs(min_area - face_area) < tolerance:
|
8813
|
+
min_faces.append(faces[i])
|
8814
|
+
return min_faces
|
8815
|
+
|
8621
8816
|
@staticmethod
|
8622
8817
|
def SortBySelectors(topologies, selectors, exclusive=False, tolerance=0.0001):
|
8623
8818
|
"""
|
topologicpy/version.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = '0.8.
|
1
|
+
__version__ = '0.8.4'
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.2
|
2
2
|
Name: topologicpy
|
3
|
-
Version: 0.8.
|
3
|
+
Version: 0.8.4
|
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
|
@@ -115,12 +115,12 @@ To cite one of the main papers that defines topologicpy, you can use:
|
|
115
115
|
|
116
116
|
Or you can import the following .bib formatted references into your favourite reference manager
|
117
117
|
```
|
118
|
-
@misc{
|
118
|
+
@misc{Jabi2025,
|
119
119
|
author = {Wassim Jabi},
|
120
120
|
doi = {https://doi.org/10.5281/zenodo.11555173},
|
121
121
|
title = {topologicpy},
|
122
122
|
url = {http://pypi.org/projects/topologicpy},
|
123
|
-
year = {
|
123
|
+
year = {2025},
|
124
124
|
}
|
125
125
|
```
|
126
126
|
```
|
@@ -140,6 +140,6 @@ Or you can import the following .bib formatted references into your favourite re
|
|
140
140
|
}
|
141
141
|
```
|
142
142
|
|
143
|
-
topologicpy: ©
|
143
|
+
topologicpy: © 2025 Wassim Jabi
|
144
144
|
|
145
|
-
Topologic: ©
|
145
|
+
Topologic: © 2025 Cardiff University and UCL
|
@@ -17,20 +17,20 @@ topologicpy/Helper.py,sha256=DAAE_Ie_ekeMnCvcW08xXRwSAGCkjrS4lbz-o3ELuY4,27172
|
|
17
17
|
topologicpy/Honeybee.py,sha256=Y_El6M8x3ixvvIe_VcRiwj_4C89ZZg5_WlT7adbCkpw,21849
|
18
18
|
topologicpy/Matrix.py,sha256=ydw0EH4rZcGBFeLmBHPIyuk57DVKKL3M1GcArkFsYxM,10941
|
19
19
|
topologicpy/Neo4j.py,sha256=BKOF29fRgXmdpMGkrNzuYbyqgCJ6ElPPMYlfTxXiVbc,22392
|
20
|
-
topologicpy/Plotly.py,sha256=
|
20
|
+
topologicpy/Plotly.py,sha256=xfd_c2Mcam5KP-gDD-esl42RVXW5TSJsUCCqhUg1VFk,115788
|
21
21
|
topologicpy/Polyskel.py,sha256=EFsuh2EwQJGPLiFUjvtXmAwdX-A4r_DxP5hF7Qd3PaU,19829
|
22
22
|
topologicpy/PyG.py,sha256=LU9LCCzjxGPUM31qbaJXZsTvniTtgugxJY7y612t4A4,109757
|
23
23
|
topologicpy/Shell.py,sha256=fLRnQ79vtdBDRW1Xn8Gaap34XheGbw7UBFd-ALJ2Y1g,87978
|
24
24
|
topologicpy/Speckle.py,sha256=AlsGlSDuKRtX5jhVsPNSSjjbZis079HbUchDH_5RJmE,18187
|
25
25
|
topologicpy/Sun.py,sha256=42tDWMYpwRG7Z2Qjtp94eRgBuqySq7k8TgNUZDK7QxQ,36837
|
26
|
-
topologicpy/Topology.py,sha256=
|
26
|
+
topologicpy/Topology.py,sha256=IHLJxh0TQ7P8Git4qfFDlvas81JXaKQGjxwgBzIX1T0,463367
|
27
27
|
topologicpy/Vector.py,sha256=Cl7besf20cAGmyNPh-9gbFAHnRU5ZWSMChJ3VyFIDs4,35416
|
28
28
|
topologicpy/Vertex.py,sha256=tv6C-rbuNgXHDGgVLT5fbalynLdXqlUuiCDKtkeQ0vk,77814
|
29
29
|
topologicpy/Wire.py,sha256=Gl3Jpygwp8775SG57ua5r5ffTHcN4FOAkeI87yP1cok,234001
|
30
30
|
topologicpy/__init__.py,sha256=vlPCanUbxe5NifC4pHcnhSzkmmYcs_UrZrTlVMsxcFs,928
|
31
|
-
topologicpy/version.py,sha256=
|
32
|
-
topologicpy-0.8.
|
33
|
-
topologicpy-0.8.
|
34
|
-
topologicpy-0.8.
|
35
|
-
topologicpy-0.8.
|
36
|
-
topologicpy-0.8.
|
31
|
+
topologicpy/version.py,sha256=PtH7P3DXedvpK4LWSSxCTW38cmEXvmG6EvUpXZC-eLo,22
|
32
|
+
topologicpy-0.8.4.dist-info/LICENSE,sha256=FK0vJ73LuE8PYJAn7LutsReWR47-Ooovw2dnRe5yV6Q,681
|
33
|
+
topologicpy-0.8.4.dist-info/METADATA,sha256=WsO5JswYFeodLDlAb5Jv9TnaIhSl0z2ge2fhH-3hLpw,10512
|
34
|
+
topologicpy-0.8.4.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
35
|
+
topologicpy-0.8.4.dist-info/top_level.txt,sha256=J30bDzW92Ob7hw3zA8V34Jlp-vvsfIkGzkr8sqvb4Uw,12
|
36
|
+
topologicpy-0.8.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|