topologicpy 0.7.71__py3-none-any.whl → 0.7.73__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/BVH.py +9 -7
- topologicpy/CellComplex.py +92 -23
- topologicpy/Cluster.py +1 -1
- topologicpy/Color.py +67 -1
- topologicpy/Dictionary.py +108 -10
- topologicpy/Edge.py +8 -4
- topologicpy/Face.py +1 -1
- topologicpy/Graph.py +114 -6
- topologicpy/Helper.py +111 -0
- topologicpy/Plotly.py +505 -344
- topologicpy/Shell.py +24 -24
- topologicpy/Topology.py +234 -117
- topologicpy/Wire.py +50 -56
- topologicpy/version.py +1 -1
- {topologicpy-0.7.71.dist-info → topologicpy-0.7.73.dist-info}/METADATA +1 -1
- topologicpy-0.7.73.dist-info/RECORD +36 -0
- {topologicpy-0.7.71.dist-info → topologicpy-0.7.73.dist-info}/WHEEL +1 -1
- topologicpy-0.7.71.dist-info/RECORD +0 -36
- {topologicpy-0.7.71.dist-info → topologicpy-0.7.73.dist-info}/LICENSE +0 -0
- {topologicpy-0.7.71.dist-info → topologicpy-0.7.73.dist-info}/top_level.txt +0 -0
topologicpy/Shell.py
CHANGED
@@ -857,25 +857,25 @@ class Shell():
|
|
857
857
|
xOffset = 0
|
858
858
|
yOffset = 0
|
859
859
|
zOffset = 0
|
860
|
-
|
860
|
+
x_min = min([Vertex.X(llVertex, mantissa=mantissa), Vertex.X(lrVertex, mantissa=mantissa), Vertex.X(ulVertex, mantissa=mantissa), Vertex.X(urVertex, mantissa=mantissa)])
|
861
861
|
maxX = max([Vertex.X(llVertex, mantissa=mantissa), Vertex.X(lrVertex, mantissa=mantissa), Vertex.X(ulVertex, mantissa=mantissa), Vertex.X(urVertex, mantissa=mantissa)])
|
862
|
-
|
862
|
+
y_min = min([Vertex.Y(llVertex, mantissa=mantissa), Vertex.Y(lrVertex, mantissa=mantissa), Vertex.Y(ulVertex, mantissa=mantissa), Vertex.Y(urVertex, mantissa=mantissa)])
|
863
863
|
maxY = max([Vertex.Y(llVertex, mantissa=mantissa), Vertex.Y(lrVertex, mantissa=mantissa), Vertex.Y(ulVertex, mantissa=mantissa), Vertex.Y(urVertex, mantissa=mantissa)])
|
864
|
-
|
864
|
+
z_min = min([Vertex.Z(llVertex, mantissa=mantissa), Vertex.Z(lrVertex, mantissa=mantissa), Vertex.Z(ulVertex, mantissa=mantissa), Vertex.Z(urVertex, mantissa=mantissa)])
|
865
865
|
maxZ = max([Vertex.Z(llVertex, mantissa=mantissa), Vertex.Z(lrVertex, mantissa=mantissa), Vertex.Z(ulVertex, mantissa=mantissa), Vertex.Z(urVertex, mantissa=mantissa)])
|
866
866
|
|
867
867
|
if placement.lower() == "lowerleft":
|
868
|
-
xOffset = -
|
869
|
-
yOffset = -
|
870
|
-
zOffset = -
|
868
|
+
xOffset = -x_min
|
869
|
+
yOffset = -y_min
|
870
|
+
zOffset = -z_min
|
871
871
|
elif placement.lower() == "bottom":
|
872
|
-
xOffset = -(
|
873
|
-
yOffset = -(
|
874
|
-
zOffset = -
|
872
|
+
xOffset = -(x_min + (maxX - x_min)*0.5)
|
873
|
+
yOffset = -(y_min + (maxY - y_min)*0.5)
|
874
|
+
zOffset = -z_min
|
875
875
|
elif placement.lower() == "center":
|
876
|
-
xOffset = -(
|
877
|
-
yOffset = -(
|
878
|
-
zOffset = -(
|
876
|
+
xOffset = -(x_min + (maxX - x_min)*0.5)
|
877
|
+
yOffset = -(y_min + (maxY - y_min)*0.5)
|
878
|
+
zOffset = -(z_min + (maxZ - z_min)*0.5)
|
879
879
|
returnTopology = Topology.Translate(returnTopology, xOffset, yOffset, zOffset)
|
880
880
|
returnTopology = Topology.Place(returnTopology, originA=Vertex.Origin(), originB=origin)
|
881
881
|
returnTopology = Topology.Orient(returnTopology, origin=origin, dirA=[0, 0, 1], dirB=direction)
|
@@ -1020,27 +1020,27 @@ class Shell():
|
|
1020
1020
|
xList.append(Vertex.X(aVertex, mantissa=mantissa))
|
1021
1021
|
yList.append(Vertex.Y(aVertex, mantissa=mantissa))
|
1022
1022
|
zList.append(Vertex.Z(aVertex, mantissa=mantissa))
|
1023
|
-
|
1023
|
+
x_min = min(xList)
|
1024
1024
|
maxX = max(xList)
|
1025
|
-
|
1025
|
+
y_min = min(yList)
|
1026
1026
|
maxY = max(yList)
|
1027
|
-
|
1027
|
+
z_min = min(zList)
|
1028
1028
|
maxZ = max(zList)
|
1029
1029
|
xOffset = 0
|
1030
1030
|
yOffset = 0
|
1031
1031
|
zOffset = 0
|
1032
1032
|
if placement.lower() == "lowerleft":
|
1033
|
-
xOffset = -
|
1034
|
-
yOffset = -
|
1035
|
-
zOffset = -
|
1033
|
+
xOffset = -x_min
|
1034
|
+
yOffset = -y_min
|
1035
|
+
zOffset = -z_min
|
1036
1036
|
elif placement.lower() == "bottom":
|
1037
|
-
xOffset = -(
|
1038
|
-
yOffset = -(
|
1039
|
-
zOffset = -
|
1037
|
+
xOffset = -(x_min + (maxX - x_min)*0.5)
|
1038
|
+
yOffset = -(y_min + (maxY - y_min)*0.5)
|
1039
|
+
zOffset = -z_min
|
1040
1040
|
elif placement.lower() == "center":
|
1041
|
-
xOffset = -(
|
1042
|
-
yOffset = -(
|
1043
|
-
zOffset = -(
|
1041
|
+
xOffset = -(x_min + (maxX - x_min)*0.5)
|
1042
|
+
yOffset = -(y_min + (maxY - y_min)*0.5)
|
1043
|
+
zOffset = -(z_min + (maxZ - z_min)*0.5)
|
1044
1044
|
returnTopology = Topology.Translate(returnTopology, xOffset, yOffset, zOffset)
|
1045
1045
|
returnTopology = Topology.Place(returnTopology, originA=Vertex.Origin(), originB=origin)
|
1046
1046
|
returnTopology = Topology.Orient(returnTopology, origin=origin, dirA=[0, 0, 1], dirB=direction)
|