topologicpy 0.8.46__py3-none-any.whl → 0.8.48__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/ANN.py +19 -19
- topologicpy/BVH.py +5 -5
- topologicpy/CSG.py +17 -17
- topologicpy/Cell.py +295 -295
- topologicpy/CellComplex.py +214 -67
- topologicpy/Cluster.py +35 -35
- topologicpy/Color.py +8 -8
- topologicpy/DGL.py +52 -52
- topologicpy/Dictionary.py +22 -22
- topologicpy/Edge.py +77 -77
- topologicpy/EnergyModel.py +25 -25
- topologicpy/Face.py +270 -270
- topologicpy/Graph.py +1052 -675
- topologicpy/Grid.py +24 -24
- topologicpy/Helper.py +8 -8
- topologicpy/Honeybee.py +13 -13
- topologicpy/Matrix.py +11 -11
- topologicpy/Neo4j.py +21 -21
- topologicpy/Plotly.py +213 -213
- topologicpy/PyG.py +41 -41
- topologicpy/ShapeGrammar.py +7 -7
- topologicpy/Shell.py +104 -104
- topologicpy/Sun.py +46 -46
- topologicpy/Topology.py +392 -392
- topologicpy/Vector.py +25 -25
- topologicpy/Vertex.py +64 -64
- topologicpy/Wire.py +264 -250
- topologicpy/version.py +1 -1
- {topologicpy-0.8.46.dist-info → topologicpy-0.8.48.dist-info}/METADATA +1 -1
- topologicpy-0.8.48.dist-info/RECORD +38 -0
- topologicpy-0.8.46.dist-info/RECORD +0 -38
- {topologicpy-0.8.46.dist-info → topologicpy-0.8.48.dist-info}/WHEEL +0 -0
- {topologicpy-0.8.46.dist-info → topologicpy-0.8.48.dist-info}/licenses/LICENSE +0 -0
- {topologicpy-0.8.46.dist-info → topologicpy-0.8.48.dist-info}/top_level.txt +0 -0
topologicpy/CellComplex.py
CHANGED
@@ -59,25 +59,25 @@ class CellComplex():
|
|
59
59
|
Parameters
|
60
60
|
----------
|
61
61
|
origin : topologic_core.Vertex , optional
|
62
|
-
The origin location of the box.
|
62
|
+
The origin location of the box. Default is None which results in the box being placed at (0, 0, 0).
|
63
63
|
width : float , optional
|
64
|
-
The width of the box.
|
64
|
+
The width of the box. Default is 1.
|
65
65
|
length : float , optional
|
66
|
-
The length of the box.
|
66
|
+
The length of the box. Default is 1.
|
67
67
|
height : float , optional
|
68
68
|
The height of the box.
|
69
69
|
uSides : int , optional
|
70
|
-
The number of sides along the width.
|
70
|
+
The number of sides along the width. Default is 1.
|
71
71
|
vSides : int, optional
|
72
|
-
The number of sides along the length.
|
72
|
+
The number of sides along the length. Default is 1.
|
73
73
|
wSides : int , optional
|
74
|
-
The number of sides along the height.
|
74
|
+
The number of sides along the height. Default is 1.
|
75
75
|
direction : list , optional
|
76
|
-
The vector representing the up direction of the box.
|
76
|
+
The vector representing the up direction of the box. Default is [0, 0, 1].
|
77
77
|
placement : str , optional
|
78
|
-
The description of the placement of the origin of the box. This can be "bottom", "center", or "lowerleft". It is case insensitive.
|
78
|
+
The description of the placement of the origin of the box. This can be "bottom", "center", or "lowerleft". It is case insensitive. Default is "center".
|
79
79
|
tolerance : float , optional
|
80
|
-
The desired tolerance.
|
80
|
+
The desired tolerance. Default is 0.0001.
|
81
81
|
|
82
82
|
Returns
|
83
83
|
-------
|
@@ -100,11 +100,11 @@ class CellComplex():
|
|
100
100
|
cells : list
|
101
101
|
The list of input cells.
|
102
102
|
transferDictionaries : bool , optional
|
103
|
-
If set to True, any dictionaries in the cells are transferred to the CellComplex. Otherwise, they are not.
|
103
|
+
If set to True, any dictionaries in the cells are transferred to the CellComplex. Otherwise, they are not. Default is False.
|
104
104
|
tolerance : float , optional
|
105
|
-
The desired tolerance.
|
105
|
+
The desired tolerance. Default is 0.0001.
|
106
106
|
silent : bool , optional
|
107
|
-
If set to True, error and warning messages are suppressed.
|
107
|
+
If set to True, error and warning messages are suppressed. Default is False.
|
108
108
|
|
109
109
|
Returns
|
110
110
|
-------
|
@@ -176,7 +176,7 @@ class CellComplex():
|
|
176
176
|
cluster : topologic_core.Cluster
|
177
177
|
The input cluster of cells.
|
178
178
|
tolerance : float , optional
|
179
|
-
The desired tolerance.
|
179
|
+
The desired tolerance. Default is 0.0001.
|
180
180
|
|
181
181
|
Returns
|
182
182
|
-------
|
@@ -193,6 +193,153 @@ class CellComplex():
|
|
193
193
|
cells = Topology.Cells(cluster)
|
194
194
|
return CellComplex.ByCells(cells, tolerance=tolerance)
|
195
195
|
|
196
|
+
@staticmethod
|
197
|
+
def ByDisjointedFaces(faces: list,
|
198
|
+
minOffset: float = 0,
|
199
|
+
maxOffset: float = 1.0,
|
200
|
+
minCells: float = 2,
|
201
|
+
maxCells: float = 10,
|
202
|
+
maxAttempts: int = 100,
|
203
|
+
patience: int = 5,
|
204
|
+
transferDictionaries: bool = False,
|
205
|
+
exclusive: bool = True,
|
206
|
+
tolerance: float = 0.0001,
|
207
|
+
silent: bool = False):
|
208
|
+
"""
|
209
|
+
Creates a CellComplex from a list of disjointed faces. The algorithm expands the faces by an offset to find intersections before building cells.
|
210
|
+
|
211
|
+
Parameters
|
212
|
+
----------
|
213
|
+
faces : list of topologic_core.Face
|
214
|
+
The linput ist of faces.
|
215
|
+
minOffset : float , optional
|
216
|
+
The minimum initial face offset to try. Default is 0.
|
217
|
+
maxOffset : float , optional
|
218
|
+
The final maximum face offset to try. Default is 1.0.
|
219
|
+
minCells : int , optional
|
220
|
+
The minimum number of cells to create. A CellComplex cannot have less than 2 cells. Default is 2.
|
221
|
+
maxCells : int , optional
|
222
|
+
The maximum number of cells to create. Default is 10.
|
223
|
+
maxAttempts : int , optional
|
224
|
+
The desired maximum number of attempts. Default is 100.
|
225
|
+
patience : int , optional
|
226
|
+
The desired number of attempts to wait with no change in the created number of cells. Default is 5.
|
227
|
+
transferDictionaries : bool , optional
|
228
|
+
If set to True, face dictionaries are inhertied. Default is False.
|
229
|
+
exclusive : bool , optional
|
230
|
+
Applies only if transferDictionaries is set to True. If set to True, only one source face contributes its dictionary to a target face. Default is True.
|
231
|
+
tolerance : float , optional
|
232
|
+
The desired tolerance. Default is 0.0001.
|
233
|
+
silent : bool , optional
|
234
|
+
If set to True, error and warning messages are suppressed. Default is False.
|
235
|
+
|
236
|
+
Returns
|
237
|
+
-------
|
238
|
+
topologic_core.CellComplex
|
239
|
+
The created CellComplex
|
240
|
+
|
241
|
+
"""
|
242
|
+
|
243
|
+
from topologicpy.Face import Face
|
244
|
+
from topologicpy.Cell import Cell
|
245
|
+
from topologicpy.Topology import Topology
|
246
|
+
from topologicpy.Helper import Helper
|
247
|
+
|
248
|
+
def trim(cells, n):
|
249
|
+
volumes = [Cell.Volume(c) for c in cells]
|
250
|
+
return_cc = Helper.Sort(cells, volumes)
|
251
|
+
return_cc.reverse()
|
252
|
+
return return_cc[:n]
|
253
|
+
|
254
|
+
faces = [f for f in faces if Topology.IsInstance(f, "Face")]
|
255
|
+
if len(faces) == 0:
|
256
|
+
if not silent:
|
257
|
+
print("CellComplex.ByDisjointedFaces - Error: The input list of faces does not contain any valid topologic faces. Returning None.")
|
258
|
+
return None
|
259
|
+
if len(faces) < 3:
|
260
|
+
if not silent:
|
261
|
+
print("CellComplex.ByDisjointedFaces - Error: The input list of faces contains less than three topologic faces. Returning None.")
|
262
|
+
return None
|
263
|
+
if minOffset < 0:
|
264
|
+
if not silent:
|
265
|
+
print("CellComplex.ByDisjointedFaces - Error: The input minOffset parameter is less than 0. Returning None.")
|
266
|
+
return None
|
267
|
+
if minOffset > maxOffset:
|
268
|
+
if not silent:
|
269
|
+
print("CellComplex.ByDisjointedFaces - Error: The input minOffset parameter is greater than the input maxOffset parameter. Returning None.")
|
270
|
+
return None
|
271
|
+
if minCells < 2:
|
272
|
+
if not silent:
|
273
|
+
print("CellComplex.ByDisjointedFaces - Error: The input minCells parameter is less than 2. Returning None.")
|
274
|
+
return None
|
275
|
+
if minCells > maxCells:
|
276
|
+
if not silent:
|
277
|
+
print("CellComplex.ByDisjointedFaces - Error: The input minCells parameter is greater than the input maxCells parameter. Returning None.")
|
278
|
+
return None
|
279
|
+
if maxAttempts <= 0:
|
280
|
+
if not silent:
|
281
|
+
print("CellComplex.ByDisjointedFaces - Error: The input maxAttempts parameter is not greater than 0. Returning None.")
|
282
|
+
return None
|
283
|
+
if patience < 0:
|
284
|
+
if not silent:
|
285
|
+
print("CellComplex.ByDisjointedFaces - Error: The input patience parameter is not greater than or equal to 0. Returning None.")
|
286
|
+
return None
|
287
|
+
if patience > maxAttempts:
|
288
|
+
if not silent:
|
289
|
+
print("CellComplex.ByDisjointedFaces - Error: The input patience parameter is greater than the input maxAttempts parameter. Returning None.")
|
290
|
+
return None
|
291
|
+
cc = None
|
292
|
+
attempts = 0
|
293
|
+
increment = float(maxOffset) / float(maxAttempts)
|
294
|
+
cellComplexes = [] # List of all possible cellComplexes
|
295
|
+
patience_list = []
|
296
|
+
offset = minOffset
|
297
|
+
|
298
|
+
while attempts < maxAttempts:
|
299
|
+
expanded_faces = [Face.ByOffset(f, offset=-offset) for f in faces]
|
300
|
+
try:
|
301
|
+
cc = CellComplex.ByFaces(expanded_faces, silent=True)
|
302
|
+
if Topology.IsInstance(cc, "cellComplex"):
|
303
|
+
cells = Topology.Cells(cc)
|
304
|
+
n_cells = len(cells)
|
305
|
+
if minCells <= n_cells <= maxCells:
|
306
|
+
cellComplexes.append(cc)
|
307
|
+
elif n_cells > maxCells:
|
308
|
+
cells = trim(cells, maxCells)
|
309
|
+
try:
|
310
|
+
new_cc = CellComplex.ByCells(cells)
|
311
|
+
if Topology.IsInstance(new_cc, "CellComplex"):
|
312
|
+
cellComplexes.append(new_cc)
|
313
|
+
except:
|
314
|
+
pass
|
315
|
+
patience_list.append(n_cells)
|
316
|
+
except:
|
317
|
+
patience_list.append(0)
|
318
|
+
|
319
|
+
if len(patience_list) >= patience:
|
320
|
+
if len(set(patience_list)) == 1 and not patience_list[0] == 0:
|
321
|
+
if not silent:
|
322
|
+
print("CellComplex.ByDisjointedFaces - Warning: Ran out of patience.")
|
323
|
+
break
|
324
|
+
else:
|
325
|
+
patience_list = []
|
326
|
+
attempts += 1
|
327
|
+
offset += increment
|
328
|
+
|
329
|
+
if len(cellComplexes) == 0:
|
330
|
+
if not silent:
|
331
|
+
print("CellComplex.ByDisjointedFaces - Error: Could not create a CellComplex. Consider revising the input parameters. Returning None.")
|
332
|
+
return None
|
333
|
+
n_cells = [len(Topology.Cells(c)) for c in cellComplexes] # Get the number of cells in each cellComplex
|
334
|
+
cellComplexes = Helper.Sort(cellComplexes, n_cells) # Sort the cellComplexes by their number of cells
|
335
|
+
for cc in cellComplexes:
|
336
|
+
cells = Topology.Cells(cc)
|
337
|
+
cc = cellComplexes[-1] # Choose the last cellComplex (the one with the most number of cells)
|
338
|
+
if transferDictionaries == True:
|
339
|
+
cc_faces = Topology.Faces(cc)
|
340
|
+
cc_faces = Topology.Inherit(targets=cc_faces, sources=faces, exclusive=exclusive, tolerance=tolerance, silent=silent)
|
341
|
+
return cc
|
342
|
+
|
196
343
|
@staticmethod
|
197
344
|
def ByFaces(faces: list, tolerance: float = 0.0001, silent: bool = False):
|
198
345
|
"""
|
@@ -203,9 +350,9 @@ class CellComplex():
|
|
203
350
|
faces : list
|
204
351
|
The input faces.
|
205
352
|
tolerance : float , optional
|
206
|
-
The desired tolerance.
|
353
|
+
The desired tolerance. Default is 0.0001.
|
207
354
|
silent : bool , optional
|
208
|
-
If set to True, error and warning messages are suppressed.
|
355
|
+
If set to True, error and warning messages are suppressed. Default is False.
|
209
356
|
|
210
357
|
Returns
|
211
358
|
-------
|
@@ -270,7 +417,7 @@ class CellComplex():
|
|
270
417
|
cluster : topologic_core.Cluster
|
271
418
|
The input cluster of faces.
|
272
419
|
tolerance : float , optional
|
273
|
-
The desired tolerance.
|
420
|
+
The desired tolerance. Default is 0.0001.
|
274
421
|
|
275
422
|
Returns
|
276
423
|
-------
|
@@ -296,9 +443,9 @@ class CellComplex():
|
|
296
443
|
wires : list
|
297
444
|
The input list of wires. The list should contain a minimum of two wires. All wires must have the same number of edges.
|
298
445
|
triangulate : bool , optional
|
299
|
-
If set to True, the faces will be triangulated.
|
446
|
+
If set to True, the faces will be triangulated. Default is True.
|
300
447
|
tolerance : float , optional
|
301
|
-
The desired tolerance.
|
448
|
+
The desired tolerance. Default is 0.0001.
|
302
449
|
|
303
450
|
Returns
|
304
451
|
-------
|
@@ -407,9 +554,9 @@ class CellComplex():
|
|
407
554
|
cluster : topologic_core.Cluster
|
408
555
|
The input cluster of wires.
|
409
556
|
triangulate : bool , optional
|
410
|
-
If set to True, the faces will be triangulated.
|
557
|
+
If set to True, the faces will be triangulated. Default is True.
|
411
558
|
tolerance : float , optional
|
412
|
-
The desired tolerance.
|
559
|
+
The desired tolerance. Default is 0.0001.
|
413
560
|
|
414
561
|
Returns
|
415
562
|
-------
|
@@ -461,21 +608,21 @@ class CellComplex():
|
|
461
608
|
Parameters
|
462
609
|
----------
|
463
610
|
origin : topologic_core.Vertex , optional
|
464
|
-
The origin location of the cube.
|
611
|
+
The origin location of the cube. Default is None which results in the cube being placed at (0, 0, 0).
|
465
612
|
size : float , optional
|
466
|
-
The size of the cube.
|
613
|
+
The size of the cube. Default is 1.
|
467
614
|
uSides : int , optional
|
468
|
-
The number of sides along the width.
|
615
|
+
The number of sides along the width. Default is 1.
|
469
616
|
vSides : int, optional
|
470
|
-
The number of sides along the length.
|
617
|
+
The number of sides along the length. Default is 1.
|
471
618
|
wSides : int , optional
|
472
|
-
The number of sides along the height.
|
619
|
+
The number of sides along the height. Default is 1.
|
473
620
|
direction : list , optional
|
474
|
-
The vector representing the up direction of the cube.
|
621
|
+
The vector representing the up direction of the cube. Default is [0, 0, 1].
|
475
622
|
placement : str , optional
|
476
|
-
The description of the placement of the origin of the cube. This can be "bottom", "center", or "lowerleft". It is case insensitive.
|
623
|
+
The description of the placement of the origin of the cube. This can be "bottom", "center", or "lowerleft". It is case insensitive. Default is "center".
|
477
624
|
tolerance : float , optional
|
478
|
-
The desired tolerance.
|
625
|
+
The desired tolerance. Default is 0.0001.
|
479
626
|
|
480
627
|
Returns
|
481
628
|
-------
|
@@ -498,9 +645,9 @@ class CellComplex():
|
|
498
645
|
cellComplex : topologic_core.CellComplex
|
499
646
|
the input cellComplex.
|
500
647
|
tiltAngle : float , optional
|
501
|
-
The threshold tilt angle in degrees to determine if a face is vertical, horizontal, or tilted. The tilt angle is measured from the nearest cardinal direction.
|
648
|
+
The threshold tilt angle in degrees to determine if a face is vertical, horizontal, or tilted. The tilt angle is measured from the nearest cardinal direction. Default is 10.
|
502
649
|
tolerance : float , optional
|
503
|
-
The desired tolerance.
|
650
|
+
The desired tolerance. Default is 0.0001.
|
504
651
|
|
505
652
|
Returns
|
506
653
|
-------
|
@@ -643,7 +790,7 @@ class CellComplex():
|
|
643
790
|
The input list of vertices to use for delaunay triangulation. If set to None, the algorithm uses the vertices of the input cell parameter.
|
644
791
|
if both are set to none, a unit cube centered around the origin is used.
|
645
792
|
tolerance : float , optional
|
646
|
-
the desired tolerance.
|
793
|
+
the desired tolerance. Default is 0.0001.
|
647
794
|
|
648
795
|
Returns
|
649
796
|
-------
|
@@ -835,15 +982,15 @@ class CellComplex():
|
|
835
982
|
Parameters
|
836
983
|
----------
|
837
984
|
origin : topologic_core.Vertex , optional
|
838
|
-
The origin location of the octahedron.
|
985
|
+
The origin location of the octahedron. Default is None which results in the octahedron being placed at (0, 0, 0).
|
839
986
|
radius : float , optional
|
840
|
-
The radius of the octahedron's circumscribed sphere.
|
987
|
+
The radius of the octahedron's circumscribed sphere. Default is 0.5.
|
841
988
|
direction : list , optional
|
842
|
-
The vector representing the up direction of the octahedron.
|
989
|
+
The vector representing the up direction of the octahedron. Default is [0, 0, 1].
|
843
990
|
placement : str , optional
|
844
|
-
The description of the placement of the origin of the octahedron. This can be "bottom", "center", or "lowerleft". It is case insensitive.
|
991
|
+
The description of the placement of the origin of the octahedron. This can be "bottom", "center", or "lowerleft". It is case insensitive. Default is "center".
|
845
992
|
tolerance : float , optional
|
846
|
-
The desired tolerance.
|
993
|
+
The desired tolerance. Default is 0.0001.
|
847
994
|
|
848
995
|
Returns
|
849
996
|
-------
|
@@ -899,27 +1046,27 @@ class CellComplex():
|
|
899
1046
|
Parameters
|
900
1047
|
----------
|
901
1048
|
origin : topologic_core.Vertex , optional
|
902
|
-
The origin location of the prism.
|
1049
|
+
The origin location of the prism. Default is None which results in the prism being placed at (0, 0, 0).
|
903
1050
|
width : float , optional
|
904
|
-
The width of the prism.
|
1051
|
+
The width of the prism. Default is 1.
|
905
1052
|
length : float , optional
|
906
|
-
The length of the prism.
|
1053
|
+
The length of the prism. Default is 1.
|
907
1054
|
height : float , optional
|
908
1055
|
The height of the prism.
|
909
1056
|
uSides : int , optional
|
910
|
-
The number of sides along the width.
|
1057
|
+
The number of sides along the width. Default is 1.
|
911
1058
|
vSides : int , optional
|
912
|
-
The number of sides along the length.
|
1059
|
+
The number of sides along the length. Default is 1.
|
913
1060
|
wSides : int , optional
|
914
|
-
The number of sides along the height.
|
1061
|
+
The number of sides along the height. Default is 1.
|
915
1062
|
direction : list , optional
|
916
|
-
The vector representing the up direction of the prism.
|
1063
|
+
The vector representing the up direction of the prism. Default is [0, 0, 1].
|
917
1064
|
placement : str , optional
|
918
|
-
The description of the placement of the origin of the prism. This can be "bottom", "center", or "lowerleft". It is case insensitive.
|
1065
|
+
The description of the placement of the origin of the prism. This can be "bottom", "center", or "lowerleft". It is case insensitive. Default is "center".
|
919
1066
|
mantissa : int , optional
|
920
|
-
The
|
1067
|
+
The number of decimal places to round the result to. Default is 6.
|
921
1068
|
tolerance : float , optional
|
922
|
-
The desired tolerance.
|
1069
|
+
The desired tolerance. Default is 0.0001.
|
923
1070
|
|
924
1071
|
Returns
|
925
1072
|
-------
|
@@ -999,11 +1146,11 @@ class CellComplex():
|
|
999
1146
|
cellComplex : topologic_core.CellComplex
|
1000
1147
|
The input cellComplex.
|
1001
1148
|
angTolerance : float , optional
|
1002
|
-
The desired angular tolerance.
|
1149
|
+
The desired angular tolerance. Default is 0.1.
|
1003
1150
|
tolerance : float , optional
|
1004
|
-
The desired tolerance.
|
1151
|
+
The desired tolerance. Default is 0.0001.
|
1005
1152
|
silent : bool , optional
|
1006
|
-
If set to True, error and warning messages are suppressed.
|
1153
|
+
If set to True, error and warning messages are suppressed. Default is False.
|
1007
1154
|
|
1008
1155
|
Returns
|
1009
1156
|
-------
|
@@ -1087,21 +1234,21 @@ class CellComplex():
|
|
1087
1234
|
Parameters
|
1088
1235
|
----------
|
1089
1236
|
origin : topologic_core.Vertex , optional
|
1090
|
-
The origin location of the tetrahedron.
|
1237
|
+
The origin location of the tetrahedron. Default is None which results in the tetrahedron being placed at (0, 0, 0).
|
1091
1238
|
length : float , optional
|
1092
|
-
The length of the edge of the tetrahedron.
|
1239
|
+
The length of the edge of the tetrahedron. Default is 1.
|
1093
1240
|
depth : int , optional
|
1094
1241
|
The desired maximum number of recrusive subdivision levels.
|
1095
1242
|
direction : list , optional
|
1096
|
-
The vector representing the up direction of the tetrahedron.
|
1243
|
+
The vector representing the up direction of the tetrahedron. Default is [0, 0, 1].
|
1097
1244
|
placement : str , optional
|
1098
|
-
The description of the placement of the origin of the tetrahedron. This can be "bottom", "center", or "lowerleft". It is case insensitive.
|
1245
|
+
The description of the placement of the origin of the tetrahedron. This can be "bottom", "center", or "lowerleft". It is case insensitive. Default is "center".
|
1099
1246
|
mantissa : int , optional
|
1100
|
-
The
|
1247
|
+
The number of decimal places to round the result to. Default is 6.
|
1101
1248
|
tolerance : float , optional
|
1102
|
-
The desired tolerance.
|
1249
|
+
The desired tolerance. Default is 0.0001.
|
1103
1250
|
silent : bool , optional
|
1104
|
-
If set to True, error and warning messages are suppressed.
|
1251
|
+
If set to True, error and warning messages are suppressed. Default is False.
|
1105
1252
|
|
1106
1253
|
Returns
|
1107
1254
|
-------
|
@@ -1234,21 +1381,21 @@ class CellComplex():
|
|
1234
1381
|
Parameters
|
1235
1382
|
----------
|
1236
1383
|
origin : topologic_core.Vertex , optional
|
1237
|
-
The origin location of the torus.
|
1384
|
+
The origin location of the torus. Default is None which results in the torus being placed at (0, 0, 0).
|
1238
1385
|
majorRadius : float , optional
|
1239
|
-
The major radius of the torus.
|
1386
|
+
The major radius of the torus. Default is 0.5.
|
1240
1387
|
minorRadius : float , optional
|
1241
|
-
The minor radius of the torus.
|
1388
|
+
The minor radius of the torus. Default is 0.1.
|
1242
1389
|
uSides : int , optional
|
1243
|
-
The number of sides along the longitude of the torus.
|
1390
|
+
The number of sides along the longitude of the torus. Default is 16.
|
1244
1391
|
vSides : int , optional
|
1245
|
-
The number of sides along the latitude of the torus.
|
1392
|
+
The number of sides along the latitude of the torus. Default is 8.
|
1246
1393
|
direction : list , optional
|
1247
|
-
The vector representing the up direction of the torus.
|
1394
|
+
The vector representing the up direction of the torus. Default is [0, 0, 1].
|
1248
1395
|
placement : str , optional
|
1249
|
-
The description of the placement of the origin of the torus. This can be "bottom", "center", or "lowerleft". It is case insensitive.
|
1396
|
+
The description of the placement of the origin of the torus. This can be "bottom", "center", or "lowerleft". It is case insensitive. Default is "center".
|
1250
1397
|
tolerance : float , optional
|
1251
|
-
The desired tolerance.
|
1398
|
+
The desired tolerance. Default is 0.0001.
|
1252
1399
|
|
1253
1400
|
Returns
|
1254
1401
|
-------
|
@@ -1319,7 +1466,7 @@ class CellComplex():
|
|
1319
1466
|
cellComplex : topologic_core.CellComplex
|
1320
1467
|
The input cellComplex.
|
1321
1468
|
manitssa: int , optional
|
1322
|
-
The
|
1469
|
+
The number of decimal places to round the result to. Default is 6.
|
1323
1470
|
|
1324
1471
|
Returns
|
1325
1472
|
-------
|
@@ -1352,9 +1499,9 @@ class CellComplex():
|
|
1352
1499
|
The input list of vertices to use for voronoi partitioning. If set to None, the algorithm uses the vertices of the input cell parameter.
|
1353
1500
|
if both are set to none, a unit cube centered around the origin is used.
|
1354
1501
|
cell : topologic_core.Cell , optional
|
1355
|
-
The input bounding cell. If set to None, an axes-aligned bounding cell is created from the list of vertices.
|
1502
|
+
The input bounding cell. If set to None, an axes-aligned bounding cell is created from the list of vertices. Default is None.
|
1356
1503
|
tolerance : float , optional
|
1357
|
-
the desired tolerance.
|
1504
|
+
the desired tolerance. Default is 0.0001.
|
1358
1505
|
|
1359
1506
|
|
1360
1507
|
Returns
|
topologicpy/Cluster.py
CHANGED
@@ -76,9 +76,9 @@ class Cluster():
|
|
76
76
|
The method will attempt to evaluate Y based on the specified xRange.
|
77
77
|
xRange and yRange CANNOT be None or unspecified at the same time. One or the other must be specified.
|
78
78
|
xString : str , optional
|
79
|
-
The string used to represent the X independent variable.
|
79
|
+
The string used to represent the X independent variable. Default is 'X' (uppercase).
|
80
80
|
yString : str , optional
|
81
|
-
The string used to represent the Y independent variable.
|
81
|
+
The string used to represent the Y independent variable. Default is 'Y' (uppercase).
|
82
82
|
|
83
83
|
Returns:
|
84
84
|
topologic_core.Cluster
|
@@ -152,9 +152,9 @@ class Cluster():
|
|
152
152
|
*topologies : topologic_core.Topology
|
153
153
|
One or more instances of `topologic_core.Topology` to be processed.
|
154
154
|
transferDictionaries : bool , optional
|
155
|
-
If set to True, the dictionaries from the input topologies are merged and transferred to the cluster. Otherwise they are not.
|
155
|
+
If set to True, the dictionaries from the input topologies are merged and transferred to the cluster. Otherwise they are not. Default is False.
|
156
156
|
silent : bool , optional
|
157
|
-
If set to True, error and warning messages are suppressed.
|
157
|
+
If set to True, error and warning messages are suppressed. Default is False.
|
158
158
|
|
159
159
|
Returns
|
160
160
|
-------
|
@@ -287,14 +287,14 @@ class Cluster():
|
|
287
287
|
The input list of topologies to be clustered.
|
288
288
|
selectors : list , optional
|
289
289
|
If the list of topologies are not vertices then please provide a corresponding list of selectors (vertices) that represent the topologies for clustering. For example, these can be the centroids of the topologies.
|
290
|
-
If set to None, the list of topologies is expected to be a list of vertices.
|
290
|
+
If set to None, the list of topologies is expected to be a list of vertices. Default is None.
|
291
291
|
keys : list, optional
|
292
292
|
The keys in the embedded dictionaries in the topologies. If specified, the values at these keys will be added to the dimensions to be clustered. The values must be numeric. If you wish the x, y, z location to be included,
|
293
|
-
make sure the keys list includes "X", "Y", and/or "Z" (case insensitive).
|
293
|
+
make sure the keys list includes "X", "Y", and/or "Z" (case insensitive). Default is ["x", "y", "z"]
|
294
294
|
epsilon : float , optional
|
295
|
-
The maximum radius around a data point within which other points are considered to be part of the same sense region (cluster).
|
295
|
+
The maximum radius around a data point within which other points are considered to be part of the same sense region (cluster). Default is 0.5.
|
296
296
|
minSamples : int , optional
|
297
|
-
The minimum number of points required to form a dense region (cluster).
|
297
|
+
The minimum number of points required to form a dense region (cluster). Default is 2.
|
298
298
|
|
299
299
|
Returns
|
300
300
|
-------
|
@@ -517,7 +517,7 @@ class Cluster():
|
|
517
517
|
cluster : topologic_core.Cluster
|
518
518
|
The input cluster.
|
519
519
|
tolerance : float , optional
|
520
|
-
The desired tolerance.
|
520
|
+
The desired tolerance. Default is 0.0001.
|
521
521
|
|
522
522
|
Returns
|
523
523
|
-------
|
@@ -564,7 +564,7 @@ class Cluster():
|
|
564
564
|
cluster : topologic_core.Cluster
|
565
565
|
The input cluster.
|
566
566
|
tolerance : float, optional
|
567
|
-
The desired tolerance.
|
567
|
+
The desired tolerance. Default is 0.0001.
|
568
568
|
|
569
569
|
Returns
|
570
570
|
-------
|
@@ -610,7 +610,7 @@ class Cluster():
|
|
610
610
|
cluster : topologic_core.Cluster
|
611
611
|
The input cluster.
|
612
612
|
tolerance : float , optional
|
613
|
-
The desired tolerance.
|
613
|
+
The desired tolerance. Default is 0.0001.
|
614
614
|
|
615
615
|
Returns
|
616
616
|
-------
|
@@ -656,7 +656,7 @@ class Cluster():
|
|
656
656
|
cluster : topologic_core.Cluster
|
657
657
|
The input cluster.
|
658
658
|
tolerance : float , optional
|
659
|
-
The desired tolerance.
|
659
|
+
The desired tolerance. Default is 0.0001.
|
660
660
|
|
661
661
|
Returns
|
662
662
|
-------
|
@@ -702,7 +702,7 @@ class Cluster():
|
|
702
702
|
cluster : topologic_core.Cluster
|
703
703
|
The input cluster.
|
704
704
|
tolerance : float, optional
|
705
|
-
The desired tolerance.
|
705
|
+
The desired tolerance. Default is 0.0001.
|
706
706
|
|
707
707
|
Returns
|
708
708
|
-------
|
@@ -748,7 +748,7 @@ class Cluster():
|
|
748
748
|
cluster : topologic_core.Cluster
|
749
749
|
The input cluster.
|
750
750
|
tolerance : float , optional
|
751
|
-
The desired tolerance.
|
751
|
+
The desired tolerance. Default is 0.0001.
|
752
752
|
|
753
753
|
Returns
|
754
754
|
-------
|
@@ -794,7 +794,7 @@ class Cluster():
|
|
794
794
|
cluster : topologic_core.Cluster
|
795
795
|
The input cluster.
|
796
796
|
tolerance : float , optional
|
797
|
-
The desired tolerance.
|
797
|
+
The desired tolerance. Default is 0.0001.
|
798
798
|
|
799
799
|
Returns
|
800
800
|
-------
|
@@ -866,16 +866,16 @@ class Cluster():
|
|
866
866
|
The input list of topologies. If this is not a list of topologic vertices then please provide a list of selectors
|
867
867
|
selectors : list , optional
|
868
868
|
If the list of topologies are not vertices then please provide a corresponding list of selectors (vertices) that represent the topologies for clustering. For example, these can be the centroids of the topologies.
|
869
|
-
If set to None, the list of topologies is expected to be a list of vertices.
|
869
|
+
If set to None, the list of topologies is expected to be a list of vertices. Default is None.
|
870
870
|
keys : list, optional
|
871
871
|
The keys in the embedded dictionaries in the topologies. If specified, the values at these keys will be added to the dimensions to be clustered. The values must be numeric. If you wish the x, y, z location to be included,
|
872
|
-
make sure the keys list includes "X", "Y", and/or "Z" (case insensitive).
|
872
|
+
make sure the keys list includes "X", "Y", and/or "Z" (case insensitive). Default is ["x", "y", "z"]
|
873
873
|
k : int , optional
|
874
|
-
The desired number of clusters.
|
874
|
+
The desired number of clusters. Default is 4.
|
875
875
|
maxIterations : int , optional
|
876
876
|
The desired maximum number of iterations for the clustering algorithm
|
877
877
|
centroidKey : str , optional
|
878
|
-
The desired dictionary key under which to store the cluster's centroid (this is not to be confused with the actual geometric centroid of the cluster).
|
878
|
+
The desired dictionary key under which to store the cluster's centroid (this is not to be confused with the actual geometric centroid of the cluster). Default is "k_centroid"
|
879
879
|
|
880
880
|
Returns
|
881
881
|
-------
|
@@ -1046,7 +1046,7 @@ class Cluster():
|
|
1046
1046
|
cells : list
|
1047
1047
|
The input list of cells.
|
1048
1048
|
tolerance : float , optional
|
1049
|
-
The desired tolerance.
|
1049
|
+
The desired tolerance. Default is 0.0001.
|
1050
1050
|
|
1051
1051
|
Returns
|
1052
1052
|
-------
|
@@ -1114,21 +1114,21 @@ class Cluster():
|
|
1114
1114
|
wire : topologic_core.Wire , optional
|
1115
1115
|
The input Wire. if set to None, a circle with the input parameters is created. Otherwise, the input parameters are ignored.
|
1116
1116
|
origin : topologic_core.Vertex , optional
|
1117
|
-
The location of the origin of the circle.
|
1117
|
+
The location of the origin of the circle. Default is None which results in the circle being placed at (0, 0, 0).
|
1118
1118
|
radius : float , optional
|
1119
|
-
The radius of the mystic rose.
|
1119
|
+
The radius of the mystic rose. Default is 1.
|
1120
1120
|
sides : int , optional
|
1121
|
-
The number of sides of the mystic rose.
|
1121
|
+
The number of sides of the mystic rose. Default is 16.
|
1122
1122
|
perimeter : bool , optional
|
1123
|
-
If True, the perimeter edges are included in the output.
|
1123
|
+
If True, the perimeter edges are included in the output. Default is True.
|
1124
1124
|
direction : list , optional
|
1125
|
-
The vector representing the up direction of the mystic rose.
|
1125
|
+
The vector representing the up direction of the mystic rose. Default is [0, 0, 1].
|
1126
1126
|
placement : str , optional
|
1127
|
-
The description of the placement of the origin of the mystic rose. This can be "center", or "lowerleft". It is case insensitive.
|
1127
|
+
The description of the placement of the origin of the mystic rose. This can be "center", or "lowerleft". It is case insensitive. Default is "center".
|
1128
1128
|
tolerance : float , optional
|
1129
|
-
The desired tolerance.
|
1129
|
+
The desired tolerance. Default is 0.0001.
|
1130
1130
|
silent : bool , optional
|
1131
|
-
If set to True, error and warning messages are suppressed.
|
1131
|
+
If set to True, error and warning messages are suppressed. Default is False.
|
1132
1132
|
|
1133
1133
|
Returns
|
1134
1134
|
-------
|
@@ -1264,21 +1264,21 @@ class Cluster():
|
|
1264
1264
|
Parameters
|
1265
1265
|
----------
|
1266
1266
|
size : float , optional
|
1267
|
-
The desired size of the tripod.
|
1267
|
+
The desired size of the tripod. Default is 1.0.
|
1268
1268
|
radius : float , optional
|
1269
|
-
The desired radiues of the tripod.
|
1269
|
+
The desired radiues of the tripod. Default is 0.03
|
1270
1270
|
sides : int , optional
|
1271
|
-
The desired number of sides of the tripod.
|
1271
|
+
The desired number of sides of the tripod. Default is 4.
|
1272
1272
|
faceColorKey : str , optional
|
1273
1273
|
The dictionary key under which to store the colors of the axes.
|
1274
1274
|
xColor : str , optional
|
1275
|
-
The color to use for the X axis.
|
1275
|
+
The color to use for the X axis. Default is "red".
|
1276
1276
|
yColor : str , optional
|
1277
|
-
The color to use for the Y axis.
|
1277
|
+
The color to use for the Y axis. Default is "green".
|
1278
1278
|
zColor : str , optional
|
1279
|
-
The color to use for the Z axis.
|
1279
|
+
The color to use for the Z axis. Default is "blue".
|
1280
1280
|
matrix : list , optional
|
1281
|
-
The desired 4X4 transformation matrix to use for transforming the tripod.
|
1281
|
+
The desired 4X4 transformation matrix to use for transforming the tripod. Default is None which means the tripod will be placed at the origin and will be axis-aligned.
|
1282
1282
|
|
1283
1283
|
Returns
|
1284
1284
|
-------
|