topologicpy 0.8.35__py3-none-any.whl → 0.8.37__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 +4 -4
- topologicpy/CSG.py +5 -5
- topologicpy/Cell.py +113 -52
- topologicpy/CellComplex.py +2 -2
- topologicpy/Cluster.py +2 -2
- topologicpy/Dictionary.py +3 -3
- topologicpy/Edge.py +14 -14
- topologicpy/Face.py +35 -31
- topologicpy/Graph.py +638 -59
- topologicpy/Helper.py +4 -4
- topologicpy/Matrix.py +3 -3
- topologicpy/Neo4j.py +1 -1
- topologicpy/Plotly.py +31 -9
- topologicpy/ShapeGrammar.py +7 -7
- topologicpy/Shell.py +4 -4
- topologicpy/Topology.py +71 -55
- topologicpy/Vector.py +5 -5
- topologicpy/Vertex.py +6 -6
- topologicpy/Wire.py +24 -20
- topologicpy/version.py +1 -1
- {topologicpy-0.8.35.dist-info → topologicpy-0.8.37.dist-info}/METADATA +1 -1
- topologicpy-0.8.37.dist-info/RECORD +38 -0
- topologicpy-0.8.35.dist-info/RECORD +0 -38
- {topologicpy-0.8.35.dist-info → topologicpy-0.8.37.dist-info}/WHEEL +0 -0
- {topologicpy-0.8.35.dist-info → topologicpy-0.8.37.dist-info}/licenses/LICENSE +0 -0
- {topologicpy-0.8.35.dist-info → topologicpy-0.8.37.dist-info}/top_level.txt +0 -0
topologicpy/BVH.py
CHANGED
@@ -75,7 +75,7 @@ class BVH:
|
|
75
75
|
topologies : list
|
76
76
|
The list of topologies.
|
77
77
|
silent : bool , optional
|
78
|
-
If set to True,
|
78
|
+
If set to True, error and warning messages are suppressed. The default is False.
|
79
79
|
|
80
80
|
Returns
|
81
81
|
-------
|
@@ -152,7 +152,7 @@ class BVH:
|
|
152
152
|
topologies : list
|
153
153
|
The list of topologies.
|
154
154
|
silent : bool , optional
|
155
|
-
If set to True,
|
155
|
+
If set to True, error and warning messages are suppressed. The default is False.
|
156
156
|
|
157
157
|
Returns
|
158
158
|
-------
|
@@ -220,7 +220,7 @@ class BVH:
|
|
220
220
|
topologies : list
|
221
221
|
The list of topologies.
|
222
222
|
silent : bool , optional
|
223
|
-
If set to True,
|
223
|
+
If set to True, error and warning messages are suppressed. The default is False.
|
224
224
|
|
225
225
|
Returns
|
226
226
|
-------
|
@@ -263,7 +263,7 @@ class BVH:
|
|
263
263
|
tolerance : float , optional
|
264
264
|
The desired tolerance. The default is 0.0001.
|
265
265
|
silent : bool , optional
|
266
|
-
If set to True,
|
266
|
+
If set to True, error and warning messages are suppressed. The default is False.
|
267
267
|
|
268
268
|
Returns
|
269
269
|
-------
|
topologicpy/CSG.py
CHANGED
@@ -56,7 +56,7 @@ class CSG():
|
|
56
56
|
tolerance : float , optional
|
57
57
|
The desired tolerance. The default is 0.0001.
|
58
58
|
silent : bool , optional
|
59
|
-
If set to True,
|
59
|
+
If set to True, error and warning messages are suppressed. The default is False.
|
60
60
|
|
61
61
|
Returns
|
62
62
|
-------
|
@@ -121,7 +121,7 @@ class CSG():
|
|
121
121
|
tolerance : float , optional
|
122
122
|
The desired tolerance. The default is 0.0001.
|
123
123
|
silent : bool , optional
|
124
|
-
If set to True,
|
124
|
+
If set to True, error and warning messages are suppressed. The default is False.
|
125
125
|
|
126
126
|
Returns
|
127
127
|
-------
|
@@ -183,7 +183,7 @@ class CSG():
|
|
183
183
|
tolerance : float , optional
|
184
184
|
The desired tolerance. The default is 0.0001.
|
185
185
|
silent : bool , optional
|
186
|
-
If set to True,
|
186
|
+
If set to True, error and warning messages are suppressed. The default is False.
|
187
187
|
|
188
188
|
Returns
|
189
189
|
-------
|
@@ -248,7 +248,7 @@ class CSG():
|
|
248
248
|
graph : topologic_core.Graph
|
249
249
|
The input graph.
|
250
250
|
silent : bool , optional
|
251
|
-
If set to True,
|
251
|
+
If set to True, error and warning messages are suppressed. The default is False.
|
252
252
|
|
253
253
|
Returns
|
254
254
|
-------
|
@@ -358,7 +358,7 @@ class CSG():
|
|
358
358
|
scale : float , optional
|
359
359
|
A desired scale to resize the placed topologies. The default is 1.
|
360
360
|
silent : bool , optional
|
361
|
-
If set to True,
|
361
|
+
If set to True, error and warning messages are suppressed. The default is False.
|
362
362
|
|
363
363
|
Returns
|
364
364
|
-------
|
topologicpy/Cell.py
CHANGED
@@ -99,7 +99,7 @@ class Cell():
|
|
99
99
|
tolerance : float , optional
|
100
100
|
The desired tolerance. The default is 0.0001.
|
101
101
|
silent : bool , optional
|
102
|
-
If set to True,
|
102
|
+
If set to True, error and warning messages are suppressed. The default is False.
|
103
103
|
|
104
104
|
Returns
|
105
105
|
-------
|
@@ -268,7 +268,7 @@ class Cell():
|
|
268
268
|
tolerance : float , optional
|
269
269
|
The desired tolerance. The default is 0.0001.
|
270
270
|
silent : bool , optional
|
271
|
-
If set to True,
|
271
|
+
If set to True, error and warning messages are suppressed. The default is False.
|
272
272
|
|
273
273
|
Returns
|
274
274
|
-------
|
@@ -320,7 +320,7 @@ class Cell():
|
|
320
320
|
tolerance : float , optional
|
321
321
|
The desired tolerance. The default is 0.0001.
|
322
322
|
silent : bool , optional
|
323
|
-
If set to True,
|
323
|
+
If set to True, error and warning messages are suppressed. The default is False.
|
324
324
|
|
325
325
|
Returns
|
326
326
|
-------
|
@@ -377,7 +377,7 @@ class Cell():
|
|
377
377
|
tolerance : float , optional
|
378
378
|
The desired tolerance. The default is 0.0001.
|
379
379
|
silent : bool , optional
|
380
|
-
If set to True,
|
380
|
+
If set to True, error and warning messages are suppressed. The default is False.
|
381
381
|
|
382
382
|
Returns
|
383
383
|
-------
|
@@ -435,7 +435,7 @@ class Cell():
|
|
435
435
|
tolerance : float , optional
|
436
436
|
The desired tolerance. The default is 0.0001.
|
437
437
|
silent : bool , optional
|
438
|
-
If set to True,
|
438
|
+
If set to True, error and warning messages are suppressed. The default is False.
|
439
439
|
|
440
440
|
Raises
|
441
441
|
------
|
@@ -672,7 +672,7 @@ class Cell():
|
|
672
672
|
tolerance : float , optional
|
673
673
|
The desired tolerance. The default is 0.0001.
|
674
674
|
silent : bool , optional
|
675
|
-
If set to True,
|
675
|
+
If set to True, error and warning messages are suppressed. The default is False.
|
676
676
|
|
677
677
|
Returns
|
678
678
|
-------
|
@@ -972,7 +972,7 @@ class Cell():
|
|
972
972
|
tolerance : float , optional
|
973
973
|
The desired tolerance. The default is 0.0001.
|
974
974
|
silent : bool , optional
|
975
|
-
If set to True,
|
975
|
+
If set to True, error and warning messages are suppressed. The default is False.
|
976
976
|
|
977
977
|
Returns
|
978
978
|
-------
|
@@ -1122,6 +1122,7 @@ class Cell():
|
|
1122
1122
|
width=1,
|
1123
1123
|
length=1,
|
1124
1124
|
height=1,
|
1125
|
+
wSides=1,
|
1125
1126
|
a=0.25,
|
1126
1127
|
b=0.25,
|
1127
1128
|
c=0.25,
|
@@ -1129,6 +1130,7 @@ class Cell():
|
|
1129
1130
|
flipVertical = False,
|
1130
1131
|
direction=[0,0,1],
|
1131
1132
|
placement="center",
|
1133
|
+
mantissa=6,
|
1132
1134
|
tolerance=0.0001,
|
1133
1135
|
silent=False):
|
1134
1136
|
"""
|
@@ -1144,20 +1146,28 @@ class Cell():
|
|
1144
1146
|
The overall length of the C-shape. The default is 1.0.
|
1145
1147
|
height : float , optional
|
1146
1148
|
The overall height of the C-shape. The default is 1.0.
|
1149
|
+
wSides : int , optional
|
1150
|
+
The desired number of sides along the Z-axis. The default is 1.
|
1147
1151
|
a : float , optional
|
1148
1152
|
The hortizontal thickness of the vertical arm of the C-shape. The default is 0.25.
|
1149
1153
|
b : float , optional
|
1150
1154
|
The vertical thickness of the bottom horizontal arm of the C-shape. The default is 0.25.
|
1151
1155
|
c : float , optional
|
1152
1156
|
The vertical thickness of the top horizontal arm of the C-shape. The default is 0.25.
|
1157
|
+
flipHorizontal : bool , optional
|
1158
|
+
if set to True, the shape is flipped horizontally. The default is False.
|
1159
|
+
flipVertical : bool , optional
|
1160
|
+
if set to True, the shape is flipped vertically. The default is False.
|
1153
1161
|
direction : list , optional
|
1154
1162
|
The vector representing the up direction of the C-shape. The default is [0, 0, 1].
|
1155
1163
|
placement : str , optional
|
1156
1164
|
The description of the placement of the origin of the C-shape. This can be "center", "lowerleft", "upperleft", "lowerright", "upperright". It is case insensitive. The default is "center".
|
1165
|
+
mantissa: int , optional
|
1166
|
+
The desired length of the mantissa. The default is 6.
|
1157
1167
|
tolerance : float , optional
|
1158
1168
|
The desired tolerance. The default is 0.0001.
|
1159
1169
|
silent : bool , optional
|
1160
|
-
If set to True,
|
1170
|
+
If set to True, error and warning messages are suppressed. The default is False.
|
1161
1171
|
|
1162
1172
|
Returns
|
1163
1173
|
-------
|
@@ -1166,7 +1176,7 @@ class Cell():
|
|
1166
1176
|
|
1167
1177
|
"""
|
1168
1178
|
from topologicpy.Vertex import Vertex
|
1169
|
-
from topologicpy.
|
1179
|
+
from topologicpy.Wire import Wire
|
1170
1180
|
from topologicpy.Topology import Topology
|
1171
1181
|
|
1172
1182
|
if not isinstance(width, int) and not isinstance(width, float):
|
@@ -1234,8 +1244,8 @@ class Cell():
|
|
1234
1244
|
if not len(direction) == 3:
|
1235
1245
|
if not silent:
|
1236
1246
|
print("Cell.CShape - Error: The direction input parameter is not a valid vector. Returning None.")
|
1237
|
-
return None
|
1238
|
-
|
1247
|
+
return None
|
1248
|
+
c_shape_wire = Wire.CShape(origin=origin,
|
1239
1249
|
width=width,
|
1240
1250
|
length=length,
|
1241
1251
|
a=a,
|
@@ -1247,9 +1257,12 @@ class Cell():
|
|
1247
1257
|
placement="center",
|
1248
1258
|
tolerance=tolerance,
|
1249
1259
|
silent=silent)
|
1250
|
-
|
1251
|
-
|
1252
|
-
|
1260
|
+
distance = height/wSides
|
1261
|
+
wires = [c_shape_wire]
|
1262
|
+
for i in range(wSides):
|
1263
|
+
c_shape_wire = Topology.Translate(c_shape_wire, 0, 0, distance)
|
1264
|
+
wires.append(c_shape_wire)
|
1265
|
+
return_cell = Cell.ByWires(wires, triangulate=False, mantissa=mantissa, tolerance=tolerance, silent=silent)
|
1253
1266
|
xOffset = 0
|
1254
1267
|
yOffset = 0
|
1255
1268
|
zOffset = 0
|
@@ -1949,7 +1962,7 @@ class Cell():
|
|
1949
1962
|
tolerance : float , optional
|
1950
1963
|
The desired tolerance. The default is 0.0001.
|
1951
1964
|
silent : bool , optional
|
1952
|
-
If set to True,
|
1965
|
+
If set to True, error and warning messages are suppressed. The default is False.
|
1953
1966
|
|
1954
1967
|
Returns
|
1955
1968
|
-------
|
@@ -1972,18 +1985,20 @@ class Cell():
|
|
1972
1985
|
|
1973
1986
|
@staticmethod
|
1974
1987
|
def IShape(origin=None,
|
1975
|
-
width=1,
|
1976
|
-
length=1,
|
1977
|
-
height=1,
|
1978
|
-
|
1979
|
-
|
1980
|
-
|
1981
|
-
|
1982
|
-
|
1983
|
-
|
1984
|
-
|
1985
|
-
|
1986
|
-
|
1988
|
+
width: float = 1,
|
1989
|
+
length: float = 1,
|
1990
|
+
height: float = 1,
|
1991
|
+
wSides: int = 1,
|
1992
|
+
a: float = 0.25,
|
1993
|
+
b: float = 0.25,
|
1994
|
+
c: float = 0.25,
|
1995
|
+
flipHorizontal: bool = False,
|
1996
|
+
flipVertical: bool = False,
|
1997
|
+
direction: list = [0,0,1],
|
1998
|
+
placement: str = "center",
|
1999
|
+
mantissa: int = 6,
|
2000
|
+
tolerance: float = 0.0001,
|
2001
|
+
silent: bool = False):
|
1987
2002
|
"""
|
1988
2003
|
Creates an I-shape cell.
|
1989
2004
|
|
@@ -1995,20 +2010,30 @@ class Cell():
|
|
1995
2010
|
The overall width of the I-shape. The default is 1.0.
|
1996
2011
|
length : float , optional
|
1997
2012
|
The overall length of the I-shape. The default is 1.0.
|
2013
|
+
height : float , optional
|
2014
|
+
The overall height of the I-shape. The default is 1.0.
|
2015
|
+
wSides : int , optional
|
2016
|
+
The desired number of sides along the Z-Axis. The default is 1.
|
1998
2017
|
a : float , optional
|
1999
2018
|
The hortizontal thickness of the central vertical arm of the I-shape. The default is 0.25.
|
2000
2019
|
b : float , optional
|
2001
2020
|
The vertical thickness of the bottom horizontal arm of the I-shape. The default is 0.25.
|
2002
2021
|
c : float , optional
|
2003
2022
|
The vertical thickness of the top horizontal arm of the I-shape. The default is 0.25.
|
2023
|
+
flipHorizontal : bool , optional
|
2024
|
+
if set to True, the shape is flipped horizontally. The default is False.
|
2025
|
+
flipVertical : bool , optional
|
2026
|
+
if set to True, the shape is flipped vertically. The default is False.
|
2004
2027
|
direction : list , optional
|
2005
2028
|
The vector representing the up direction of the I-shape. The default is [0, 0, 1].
|
2006
2029
|
placement : str , optional
|
2007
2030
|
The description of the placement of the origin of the I-shape. This can be "center", "bottom", "top", "lowerleft", "upperleft", "lowerright", "upperright". It is case insensitive. The default is "center".
|
2031
|
+
mantissa : int , optional
|
2032
|
+
The desired length of the mantissa. The default is 6.
|
2008
2033
|
tolerance : float , optional
|
2009
2034
|
The desired tolerance. The default is 0.0001.
|
2010
2035
|
silent : bool , optional
|
2011
|
-
If set to True,
|
2036
|
+
If set to True, error and warning messages are suppressed. The default is False.
|
2012
2037
|
|
2013
2038
|
Returns
|
2014
2039
|
-------
|
@@ -2017,7 +2042,7 @@ class Cell():
|
|
2017
2042
|
|
2018
2043
|
"""
|
2019
2044
|
from topologicpy.Vertex import Vertex
|
2020
|
-
from topologicpy.
|
2045
|
+
from topologicpy.Wire import Wire
|
2021
2046
|
from topologicpy.Topology import Topology
|
2022
2047
|
|
2023
2048
|
if not isinstance(width, int) and not isinstance(width, float):
|
@@ -2074,7 +2099,7 @@ class Cell():
|
|
2074
2099
|
if not silent:
|
2075
2100
|
print("Cell.IShape - Error: The direction input parameter is not a valid vector. Returning None.")
|
2076
2101
|
return None
|
2077
|
-
|
2102
|
+
i_shape_wire = Wire.IShape(origin=origin,
|
2078
2103
|
width=width,
|
2079
2104
|
length=length,
|
2080
2105
|
a=a,
|
@@ -2082,12 +2107,18 @@ class Cell():
|
|
2082
2107
|
c=c,
|
2083
2108
|
flipHorizontal=flipHorizontal,
|
2084
2109
|
flipVertical=flipVertical,
|
2085
|
-
direction=
|
2086
|
-
placement=
|
2110
|
+
direction=[0,0,1],
|
2111
|
+
placement="center",
|
2087
2112
|
tolerance=tolerance,
|
2088
2113
|
silent=silent)
|
2089
|
-
|
2090
|
-
|
2114
|
+
distance = height/wSides
|
2115
|
+
wires = [i_shape_wire]
|
2116
|
+
for i in range(wSides):
|
2117
|
+
i_shape_wire = Topology.Translate(i_shape_wire, 0, 0, distance)
|
2118
|
+
wires.append(i_shape_wire)
|
2119
|
+
return_cell = Cell.ByWires(wires, triangulate=False, mantissa=mantissa, tolerance=tolerance, silent=silent)
|
2120
|
+
# move down to center
|
2121
|
+
return_cell = Topology.Translate(return_cell, 0, 0, -height*0.5)
|
2091
2122
|
xOffset = 0
|
2092
2123
|
yOffset = 0
|
2093
2124
|
zOffset = 0
|
@@ -2156,12 +2187,14 @@ class Cell():
|
|
2156
2187
|
width=1,
|
2157
2188
|
length=1,
|
2158
2189
|
height=1,
|
2190
|
+
wSides=1,
|
2159
2191
|
a=0.25,
|
2160
2192
|
b=0.25,
|
2161
2193
|
flipHorizontal = False,
|
2162
2194
|
flipVertical = False,
|
2163
2195
|
direction=[0,0,1],
|
2164
2196
|
placement="center",
|
2197
|
+
mantissa=6,
|
2165
2198
|
tolerance=0.0001,
|
2166
2199
|
silent=False):
|
2167
2200
|
"""
|
@@ -2177,18 +2210,26 @@ class Cell():
|
|
2177
2210
|
The overall length of the L-shape. The default is 1.0.
|
2178
2211
|
height : float , optional
|
2179
2212
|
The overall height of the L-shape. The default is 1.0.
|
2213
|
+
wSides : int , optional
|
2214
|
+
The desired number of sides along the Z-axis. The default is 1.
|
2180
2215
|
a : float , optional
|
2181
2216
|
The hortizontal thickness of the vertical arm of the L-shape. The default is 0.25.
|
2182
2217
|
b : float , optional
|
2183
2218
|
The vertical thickness of the horizontal arm of the L-shape. The default is 0.25.
|
2219
|
+
flipHorizontal : bool , optional
|
2220
|
+
if set to True, the shape is flipped horizontally. The default is False.
|
2221
|
+
flipVertical : bool , optional
|
2222
|
+
if set to True, the shape is flipped vertically. The default is False.
|
2184
2223
|
direction : list , optional
|
2185
2224
|
The vector representing the up direction of the L-shape. The default is [0, 0, 1].
|
2186
2225
|
placement : str , optional
|
2187
2226
|
The description of the placement of the origin of the L-shape. This can be "center", "bottom", "top", "lowerleft", "upperleft", "lowerright", "upperright". It is case insensitive. The default is "center".
|
2227
|
+
manitssa : int , optional
|
2228
|
+
The desired length of the mantissa. The default is 6.
|
2188
2229
|
tolerance : float , optional
|
2189
2230
|
The desired tolerance. The default is 0.0001.
|
2190
2231
|
silent : bool , optional
|
2191
|
-
If set to True,
|
2232
|
+
If set to True, error and warning messages are suppressed. The default is False.
|
2192
2233
|
|
2193
2234
|
Returns
|
2194
2235
|
-------
|
@@ -2197,7 +2238,7 @@ class Cell():
|
|
2197
2238
|
|
2198
2239
|
"""
|
2199
2240
|
from topologicpy.Vertex import Vertex
|
2200
|
-
from topologicpy.
|
2241
|
+
from topologicpy.Wire import Wire
|
2201
2242
|
from topologicpy.Topology import Topology
|
2202
2243
|
|
2203
2244
|
if not isinstance(width, int) and not isinstance(width, float):
|
@@ -2262,7 +2303,7 @@ class Cell():
|
|
2262
2303
|
if not silent:
|
2263
2304
|
print("Cell.LShape - Error: The direction input parameter is not a valid vector. Returning None.")
|
2264
2305
|
return None
|
2265
|
-
|
2306
|
+
l_shape_wire = Wire.LShape(origin=origin,
|
2266
2307
|
width=width,
|
2267
2308
|
length=length,
|
2268
2309
|
a=a,
|
@@ -2273,9 +2314,12 @@ class Cell():
|
|
2273
2314
|
placement="center",
|
2274
2315
|
tolerance=tolerance,
|
2275
2316
|
silent=silent)
|
2276
|
-
|
2277
|
-
|
2278
|
-
|
2317
|
+
distance = height/wSides
|
2318
|
+
wires = [l_shape_wire]
|
2319
|
+
for i in range(wSides):
|
2320
|
+
l_shape_wire = Topology.Translate(l_shape_wire, 0, 0, distance)
|
2321
|
+
wires.append(l_shape_wire)
|
2322
|
+
return_cell = Cell.ByWires(wires, triangulate=False, mantissa=mantissa, tolerance=tolerance, silent=silent)
|
2279
2323
|
xOffset = 0
|
2280
2324
|
yOffset = 0
|
2281
2325
|
zOffset = 0
|
@@ -2398,7 +2442,7 @@ class Cell():
|
|
2398
2442
|
tolerance : float , optional
|
2399
2443
|
The desired tolerance. The default is 0.0001.
|
2400
2444
|
silent : bool , optional
|
2401
|
-
If set to True,
|
2445
|
+
If set to True, error and warning messages are suppressed. The default is False.
|
2402
2446
|
|
2403
2447
|
Returns
|
2404
2448
|
-------
|
@@ -2783,7 +2827,7 @@ class Cell():
|
|
2783
2827
|
tolerance : float , optional
|
2784
2828
|
The desired tolerance. The default is 0.0001.
|
2785
2829
|
silent : bool , optional
|
2786
|
-
If set to True,
|
2830
|
+
If set to True, error and warning messages are suppressed. The default is False.
|
2787
2831
|
|
2788
2832
|
Returns
|
2789
2833
|
-------
|
@@ -3002,7 +3046,7 @@ class Cell():
|
|
3002
3046
|
tolerance : float , optional
|
3003
3047
|
The desired tolerance. The default is 0.0001.
|
3004
3048
|
silent : bool , optional
|
3005
|
-
If set to True,
|
3049
|
+
If set to True, error and warning messages are suppressed. The default is False.
|
3006
3050
|
|
3007
3051
|
Returns
|
3008
3052
|
-------
|
@@ -3326,12 +3370,14 @@ class Cell():
|
|
3326
3370
|
width=1,
|
3327
3371
|
length=1,
|
3328
3372
|
height=1,
|
3373
|
+
wSides=1,
|
3329
3374
|
a=0.25,
|
3330
3375
|
b=0.25,
|
3331
3376
|
flipHorizontal = False,
|
3332
3377
|
flipVertical = False,
|
3333
3378
|
direction=[0,0,1],
|
3334
3379
|
placement="center",
|
3380
|
+
mantissa=6,
|
3335
3381
|
tolerance=0.0001,
|
3336
3382
|
silent=False):
|
3337
3383
|
"""
|
@@ -3347,18 +3393,26 @@ class Cell():
|
|
3347
3393
|
The overall length of the T-shape. The default is 1.0.
|
3348
3394
|
height : float , optional
|
3349
3395
|
the overall height of the T-shape. The default is 1.0.
|
3396
|
+
wSides : int , optional
|
3397
|
+
The desired number of sides along the Z-axis. The default is 1.
|
3350
3398
|
a : float , optional
|
3351
3399
|
The hortizontal thickness of the vertical arm of the T-shape. The default is 0.25.
|
3352
3400
|
b : float , optional
|
3353
3401
|
The vertical thickness of the horizontal arm of the T-shape. The default is 0.25.
|
3402
|
+
flipHorizontal : bool , optional
|
3403
|
+
if set to True, the shape is flipped horizontally. The default is False.
|
3404
|
+
flipVertical : bool , optional
|
3405
|
+
if set to True, the shape is flipped vertically. The default is False.
|
3354
3406
|
direction : list , optional
|
3355
3407
|
The vector representing the up direction of the T-shape. The default is [0, 0, 1].
|
3356
3408
|
placement : str , optional
|
3357
3409
|
The description of the placement of the origin of the T-shape. This can be "center", "lowerleft", "upperleft", "lowerright", "upperright". It is case insensitive. The default is "center".
|
3410
|
+
mantissa: int , optional
|
3411
|
+
The desired length of the mantissa. The default is 6.
|
3358
3412
|
tolerance : float , optional
|
3359
3413
|
The desired tolerance. The default is 0.0001.
|
3360
3414
|
silent : bool , optional
|
3361
|
-
If set to True,
|
3415
|
+
If set to True, error and warning messages are suppressed. The default is False.
|
3362
3416
|
|
3363
3417
|
Returns
|
3364
3418
|
-------
|
@@ -3367,7 +3421,7 @@ class Cell():
|
|
3367
3421
|
|
3368
3422
|
"""
|
3369
3423
|
from topologicpy.Vertex import Vertex
|
3370
|
-
from topologicpy.
|
3424
|
+
from topologicpy.Wire import Wire
|
3371
3425
|
from topologicpy.Topology import Topology
|
3372
3426
|
|
3373
3427
|
if not isinstance(width, int) and not isinstance(width, float):
|
@@ -3424,19 +3478,26 @@ class Cell():
|
|
3424
3478
|
if not silent:
|
3425
3479
|
print("Cell.TShape - Error: The direction input parameter is not a valid vector. Returning None.")
|
3426
3480
|
return None
|
3427
|
-
|
3481
|
+
t_shape_wire = Wire.TShape(origin=origin,
|
3428
3482
|
width=width,
|
3429
3483
|
length=length,
|
3430
3484
|
a=a,
|
3431
3485
|
b=b,
|
3432
3486
|
flipHorizontal=flipHorizontal,
|
3433
3487
|
flipVertical=flipVertical,
|
3434
|
-
direction=
|
3435
|
-
placement=
|
3488
|
+
direction=[0,0,1],
|
3489
|
+
placement="center",
|
3436
3490
|
tolerance=tolerance,
|
3437
3491
|
silent=silent)
|
3438
|
-
|
3439
|
-
|
3492
|
+
|
3493
|
+
distance = height/wSides
|
3494
|
+
wires = [t_shape_wire]
|
3495
|
+
for i in range(wSides):
|
3496
|
+
t_shape_wire = Topology.Translate(t_shape_wire, 0, 0, distance)
|
3497
|
+
wires.append(t_shape_wire)
|
3498
|
+
return_cell = Cell.ByWires(wires, triangulate=False, mantissa=mantissa, tolerance=tolerance, silent=silent)
|
3499
|
+
# move down to center
|
3500
|
+
return_cell = Topology.Translate(return_cell, 0, 0, -height*0.5)
|
3440
3501
|
xOffset = 0
|
3441
3502
|
yOffset = 0
|
3442
3503
|
zOffset = 0
|
@@ -3490,7 +3551,7 @@ class Cell():
|
|
3490
3551
|
tolerance : float , optional
|
3491
3552
|
The desired tolerance. The default is 0.0001.
|
3492
3553
|
silent : bool , optional
|
3493
|
-
If set to True,
|
3554
|
+
If set to True, error and warning messages are suppressed. The default is False.
|
3494
3555
|
|
3495
3556
|
Returns
|
3496
3557
|
-------
|
@@ -3605,7 +3666,7 @@ class Cell():
|
|
3605
3666
|
tolerance : float , optional
|
3606
3667
|
The desired tolerance. The default is 0.0001.
|
3607
3668
|
silent : bool , optional
|
3608
|
-
If set to True,
|
3669
|
+
If set to True, error and warning messages are suppressed. The default is False.
|
3609
3670
|
|
3610
3671
|
Returns
|
3611
3672
|
-------
|
topologicpy/CellComplex.py
CHANGED
@@ -104,7 +104,7 @@ class CellComplex():
|
|
104
104
|
tolerance : float , optional
|
105
105
|
The desired tolerance. The default is 0.0001.
|
106
106
|
silent : bool , optional
|
107
|
-
If set to True,
|
107
|
+
If set to True, error and warning messages are suppressed. The default is False.
|
108
108
|
|
109
109
|
Returns
|
110
110
|
-------
|
@@ -205,7 +205,7 @@ class CellComplex():
|
|
205
205
|
tolerance : float , optional
|
206
206
|
The desired tolerance. The default is 0.0001.
|
207
207
|
silent : bool , optional
|
208
|
-
If set to True,
|
208
|
+
If set to True, error and warning messages are suppressed. The default is False.
|
209
209
|
|
210
210
|
Returns
|
211
211
|
-------
|
topologicpy/Cluster.py
CHANGED
@@ -154,7 +154,7 @@ class Cluster():
|
|
154
154
|
transferDictionaries : bool , optional
|
155
155
|
If set to True, the dictionaries from the input topologies are merged and transferred to the cluster. Otherwise they are not. The default is False.
|
156
156
|
silent : bool , optional
|
157
|
-
If set to True,
|
157
|
+
If set to True, error and warning messages are suppressed. The default is False.
|
158
158
|
|
159
159
|
Returns
|
160
160
|
-------
|
@@ -1128,7 +1128,7 @@ class Cluster():
|
|
1128
1128
|
tolerance : float , optional
|
1129
1129
|
The desired tolerance. The default is 0.0001.
|
1130
1130
|
silent : bool , optional
|
1131
|
-
If set to True,
|
1131
|
+
If set to True, error and warning messages are suppressed. The default is False.
|
1132
1132
|
|
1133
1133
|
Returns
|
1134
1134
|
-------
|
topologicpy/Dictionary.py
CHANGED
@@ -67,7 +67,7 @@ class Dictionary():
|
|
67
67
|
mantissa : int , optional
|
68
68
|
The desired length of the mantissa. The default is 6.
|
69
69
|
silent : bool , optional
|
70
|
-
If set to True,
|
70
|
+
If set to True, error and warning messages are suppressed. The default is False.
|
71
71
|
|
72
72
|
Returns
|
73
73
|
-------
|
@@ -281,7 +281,7 @@ class Dictionary():
|
|
281
281
|
dictionaries : list or comma separated dictionaries
|
282
282
|
The input list of dictionaries to be merged.
|
283
283
|
silent : bool , optional
|
284
|
-
If set to True,
|
284
|
+
If set to True, error and warning messages are suppressed. The default is False.
|
285
285
|
|
286
286
|
Returns
|
287
287
|
-------
|
@@ -905,7 +905,7 @@ class Dictionary():
|
|
905
905
|
defaultValue : any , optional
|
906
906
|
The default value to return if the key or value are not found. The default is None.
|
907
907
|
silent : bool , optional
|
908
|
-
If set to True,
|
908
|
+
If set to True, error and warning messages are suppressed. The default is False.
|
909
909
|
|
910
910
|
Returns
|
911
911
|
-------
|