topologicpy 0.7.93__py3-none-any.whl → 0.7.96__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 +30 -29
- topologicpy/CellComplex.py +9 -8
- topologicpy/DGL.py +3 -2
- topologicpy/Edge.py +14 -14
- topologicpy/EnergyModel.py +7 -7
- topologicpy/Face.py +461 -0
- topologicpy/Graph.py +29 -26
- topologicpy/Honeybee.py +1 -1
- topologicpy/Neo4j.py +3 -2
- topologicpy/Shell.py +9 -9
- topologicpy/Topology.py +6 -5
- topologicpy/Vertex.py +21 -15
- topologicpy/Wire.py +724 -52
- topologicpy/version.py +1 -1
- {topologicpy-0.7.93.dist-info → topologicpy-0.7.96.dist-info}/METADATA +1 -1
- topologicpy-0.7.96.dist-info/RECORD +36 -0
- topologicpy-0.7.93.dist-info/RECORD +0 -36
- {topologicpy-0.7.93.dist-info → topologicpy-0.7.96.dist-info}/LICENSE +0 -0
- {topologicpy-0.7.93.dist-info → topologicpy-0.7.96.dist-info}/WHEEL +0 -0
- {topologicpy-0.7.93.dist-info → topologicpy-0.7.96.dist-info}/top_level.txt +0 -0
topologicpy/Shell.py
CHANGED
@@ -432,17 +432,17 @@ class Shell():
|
|
432
432
|
e3 = None
|
433
433
|
e4 = None
|
434
434
|
try:
|
435
|
-
e3 = Edge.ByVertices([
|
435
|
+
e3 = Edge.ByVertices([Edge.StartVertex(e1), Edge.StartVertex(e2)], tolerance=tolerance, silent=silent)
|
436
436
|
except:
|
437
|
-
e4 = Edge.ByVertices([
|
437
|
+
e4 = Edge.ByVertices([Edge.EndVertex(e1), Edge.EndVertex(e2)], tolerance=tolerance, silent=silent)
|
438
438
|
faces.append(Face.ByWire(Wire.ByEdges([e1, e2, e4], tolerance=tolerance), tolerance=tolerance))
|
439
439
|
try:
|
440
|
-
e4 = Edge.ByVertices([
|
440
|
+
e4 = Edge.ByVertices([Edge.EndVertex(e1), Edge.EndVertex(e2)], tolerance=tolerance, silent=silent)
|
441
441
|
except:
|
442
|
-
e3 = Edge.ByVertices([
|
442
|
+
e3 = Edge.ByVertices([Edge.StartVertex(e1), Edge.StartVertex(e2)], tolerance=tolerance, silent=silent)
|
443
443
|
faces.append(Face.ByWire(Wire.ByEdges([e1, e2, e3],tolerance=tolerance), tolerance=tolerance))
|
444
444
|
if e3 and e4:
|
445
|
-
e5 = Edge.ByVertices([
|
445
|
+
e5 = Edge.ByVertices([Edge.StartVertex(e1), Edge.EndVertex(e2)], tolerance=tolerance, silent=silent)
|
446
446
|
faces.append(Face.ByWire(Wire.ByEdges([e1, e5, e4], tolerance=tolerance), tolerance=tolerance))
|
447
447
|
faces.append(Face.ByWire(Wire.ByEdges([e2, e5, e3], tolerance=tolerance), tolerance=tolerance))
|
448
448
|
elif e3:
|
@@ -470,17 +470,17 @@ class Shell():
|
|
470
470
|
e3 = None
|
471
471
|
e4 = None
|
472
472
|
try:
|
473
|
-
e3 = Edge.ByVertices([
|
473
|
+
e3 = Edge.ByVertices([Edge.StartVertex(e1), Edge.StartVertex(e2)], tolerance=tolerance, silent=silent)
|
474
474
|
except:
|
475
475
|
try:
|
476
|
-
e4 = Edge.ByVertices([
|
476
|
+
e4 = Edge.ByVertices([Edge.EndVertex(e1), Edge.EndVertex(e2)], tolerance=tolerance, silent=silent)
|
477
477
|
except:
|
478
478
|
pass
|
479
479
|
try:
|
480
|
-
e4 = Edge.ByVertices([
|
480
|
+
e4 = Edge.ByVertices([Edge.EndVertex(e1), Edge.EndVertex(e2)], tolerance=tolerance, silent=silent)
|
481
481
|
except:
|
482
482
|
try:
|
483
|
-
e3 = Edge.ByVertices([
|
483
|
+
e3 = Edge.ByVertices([Edge.StartVertex(e1), Edge.StartVertex(e2)], tolerance=tolerance, silent=silent)
|
484
484
|
except:
|
485
485
|
pass
|
486
486
|
if e3 and e4:
|
topologicpy/Topology.py
CHANGED
@@ -4145,7 +4145,7 @@ class Topology():
|
|
4145
4145
|
if not Topology.IsInstance(topology, "Topology"):
|
4146
4146
|
print("Topology.CenterofMass - Error: the input topology parameter is not a valid topology. Returning None.")
|
4147
4147
|
return None
|
4148
|
-
return topology.CenterOfMass()
|
4148
|
+
return topology.CenterOfMass() # Hook to Core
|
4149
4149
|
|
4150
4150
|
@staticmethod
|
4151
4151
|
def Centroid(topology):
|
@@ -4169,8 +4169,8 @@ class Topology():
|
|
4169
4169
|
print("Topology.Centroid - Error: the input topology parameter is not a valid topology. Returning None.")
|
4170
4170
|
return None
|
4171
4171
|
if Topology.IsInstance(topology, "Aperture"):
|
4172
|
-
return Aperture.Topology(topology).Centroid()
|
4173
|
-
return topology.Centroid()
|
4172
|
+
return Aperture.Topology(topology).Centroid() # Hook to Core
|
4173
|
+
return topology.Centroid() # Hook to Core
|
4174
4174
|
|
4175
4175
|
@staticmethod
|
4176
4176
|
def ClusterByKeys(topologies, *keys, silent=False):
|
@@ -6140,6 +6140,7 @@ class Topology():
|
|
6140
6140
|
|
6141
6141
|
"""
|
6142
6142
|
from topologicpy.Vertex import Vertex
|
6143
|
+
from topologicpy.Edge import Edge
|
6143
6144
|
from topologicpy.Face import Face
|
6144
6145
|
|
6145
6146
|
vertices = []
|
@@ -6164,8 +6165,8 @@ class Topology():
|
|
6164
6165
|
topEdges = Topology.Edges(topology)
|
6165
6166
|
for anEdge in topEdges:
|
6166
6167
|
e = []
|
6167
|
-
sv =
|
6168
|
-
ev =
|
6168
|
+
sv = Edge.StartVertex(anEdge)
|
6169
|
+
ev = Edge.EndVertex(anEdge)
|
6169
6170
|
try:
|
6170
6171
|
svIndex = vertices.index(Vertex.Coordinates(sv, mantissa=mantissa))
|
6171
6172
|
except:
|
topologicpy/Vertex.py
CHANGED
@@ -1728,11 +1728,13 @@ class Vertex():
|
|
1728
1728
|
The X coordinate of the input vertex.
|
1729
1729
|
|
1730
1730
|
"""
|
1731
|
-
|
1732
|
-
|
1733
|
-
|
1734
|
-
|
1735
|
-
|
1731
|
+
try:
|
1732
|
+
return round(vertex.X(), mantissa) # Hook to Core
|
1733
|
+
except:
|
1734
|
+
try:
|
1735
|
+
return round(vertex.x(), mantissa) # Hook to Core
|
1736
|
+
except:
|
1737
|
+
return None
|
1736
1738
|
|
1737
1739
|
@staticmethod
|
1738
1740
|
def Y(vertex, mantissa: int = 6) -> float:
|
@@ -1752,11 +1754,13 @@ class Vertex():
|
|
1752
1754
|
The Y coordinate of the input vertex.
|
1753
1755
|
|
1754
1756
|
"""
|
1755
|
-
|
1756
|
-
|
1757
|
-
|
1758
|
-
|
1759
|
-
|
1757
|
+
try:
|
1758
|
+
return round(vertex.Y(), mantissa) # Hook to Core
|
1759
|
+
except:
|
1760
|
+
try:
|
1761
|
+
return round(vertex.y(), mantissa) # Hook to Core
|
1762
|
+
except:
|
1763
|
+
return None
|
1760
1764
|
|
1761
1765
|
@staticmethod
|
1762
1766
|
def Z(vertex, mantissa: int = 6) -> float:
|
@@ -1776,9 +1780,11 @@ class Vertex():
|
|
1776
1780
|
The Z coordinate of the input vertex.
|
1777
1781
|
|
1778
1782
|
"""
|
1779
|
-
|
1780
|
-
|
1781
|
-
|
1782
|
-
|
1783
|
-
|
1783
|
+
try:
|
1784
|
+
return round(vertex.Z(), mantissa) # Hook to Core
|
1785
|
+
except:
|
1786
|
+
try:
|
1787
|
+
return round(vertex.z(), mantissa) # Hook to Core
|
1788
|
+
except:
|
1789
|
+
return None
|
1784
1790
|
|