topologicpy 0.8.30__py3-none-any.whl → 0.8.33__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 +5 -3
- topologicpy/CSG.py +1 -1
- topologicpy/Cell.py +1105 -12
- topologicpy/CellComplex.py +213 -1
- topologicpy/Cluster.py +4 -2
- topologicpy/Edge.py +61 -28
- topologicpy/Face.py +384 -101
- topologicpy/Graph.py +149 -2
- topologicpy/Plotly.py +0 -1
- topologicpy/ShapeGrammar.py +65 -6
- topologicpy/Topology.py +56 -416
- topologicpy/Vertex.py +1 -1
- topologicpy/Wire.py +95 -45
- topologicpy/version.py +1 -1
- {topologicpy-0.8.30.dist-info → topologicpy-0.8.33.dist-info}/METADATA +1 -1
- {topologicpy-0.8.30.dist-info → topologicpy-0.8.33.dist-info}/RECORD +19 -19
- {topologicpy-0.8.30.dist-info → topologicpy-0.8.33.dist-info}/WHEEL +1 -1
- {topologicpy-0.8.30.dist-info → topologicpy-0.8.33.dist-info}/licenses/LICENSE +0 -0
- {topologicpy-0.8.30.dist-info → topologicpy-0.8.33.dist-info}/top_level.txt +0 -0
topologicpy/Wire.py
CHANGED
@@ -146,7 +146,7 @@ class Wire():
|
|
146
146
|
vertices = []
|
147
147
|
for arc_point in arc_points:
|
148
148
|
vertices.append(Vertex.ByCoordinates(list(arc_point)))
|
149
|
-
arc = Wire.ByVertices(vertices, close=False, tolerance=tolerance)
|
149
|
+
arc = Wire.ByVertices(vertices, close=False, tolerance=tolerance, silent=True) #We want to force suppress errors and warnings here.
|
150
150
|
if not Topology.IsInstance(arc, "Wire"):
|
151
151
|
if not silent:
|
152
152
|
print("Wire.Arc - Error: Could not create an arc. Returning None.")
|
@@ -204,10 +204,10 @@ class Wire():
|
|
204
204
|
print("Wire.ArcByEdge - Warning: Could not create an arc. Returning the original edge.")
|
205
205
|
return edge
|
206
206
|
cv = Edge.EndVertex(norm)
|
207
|
-
return Wire.Arc(sv, cv, ev, sides=sides, close=close)
|
207
|
+
return Wire.Arc(sv, cv, ev, sides=sides, close=close, tolerance=tolerance, silent=True) # we want to force suppress errors and warnings here
|
208
208
|
|
209
209
|
@staticmethod
|
210
|
-
def BoundingRectangle(topology, optimize: int = 0, mantissa: int = 6, tolerance=0.0001):
|
210
|
+
def BoundingRectangle(topology, optimize: int = 0, mantissa: int = 6, tolerance: float = 0.0001, silent: bool = False):
|
211
211
|
"""
|
212
212
|
Returns a wire representing a bounding rectangle of the input topology. The returned wire contains a dictionary with key "zrot" that represents rotations around the Z axis. If applied the resulting wire will become axis-aligned.
|
213
213
|
|
@@ -223,7 +223,9 @@ class Wire():
|
|
223
223
|
The desired length of the mantissa. The default is 6.
|
224
224
|
tolerance : float , optional
|
225
225
|
The desired tolerance. The default is 0.0001.
|
226
|
-
|
226
|
+
silent : bool , optional
|
227
|
+
If set to True, no error and warning messages are printed. Otherwise, they are. The default is False.
|
228
|
+
|
227
229
|
Returns
|
228
230
|
-------
|
229
231
|
topologic_core.Wire
|
@@ -251,11 +253,14 @@ class Wire():
|
|
251
253
|
return [x_min, y_min, maxX, maxY]
|
252
254
|
|
253
255
|
if not Topology.IsInstance(topology, "Topology"):
|
256
|
+
if not silent:
|
257
|
+
print("Wire.BoundingRectangle - Error: The input topology parameter is not a valid topology. Returning None.")
|
254
258
|
return None
|
255
259
|
|
256
260
|
vertices = Topology.SubTopologies(topology=topology, subTopologyType="vertex")
|
257
261
|
if Vertex.AreCollinear(vertices, mantissa=mantissa, tolerance=tolerance):
|
258
|
-
|
262
|
+
if not silent:
|
263
|
+
print("Wire.BoundingRectangle - Error: All vertices of the input topology parameter are collinear and thus no bounding rectangle can be created. Returning None.")
|
259
264
|
return None
|
260
265
|
start = time.time()
|
261
266
|
period = 0
|
@@ -266,15 +271,18 @@ class Wire():
|
|
266
271
|
end = time.time()
|
267
272
|
period = end - start
|
268
273
|
if result == True:
|
269
|
-
|
274
|
+
if not silent:
|
275
|
+
print("Wire.BoundingRectangle - Error: Could not find three vertices that are not colinear within 30 seconds. Returning None.")
|
270
276
|
return None
|
271
|
-
w = Wire.ByVertices(vList, close=True, tolerance=tolerance)
|
277
|
+
w = Wire.ByVertices(vList, close=True, tolerance=tolerance, silent=silent)
|
272
278
|
if not Topology.IsInstance(w, "Wire"):
|
273
|
-
|
279
|
+
if not silent:
|
280
|
+
print("Wire.BoundingRectangle - Error: Could not create wire from three vertices. Returning None.")
|
274
281
|
return None
|
275
282
|
f = Face.ByWire(w, tolerance=tolerance)
|
276
283
|
if not Topology.IsInstance(f, "Face"):
|
277
|
-
|
284
|
+
if not silent:
|
285
|
+
print("Wire.BoundingRectangle - Error: Could not create face from wire. Returning None.")
|
278
286
|
return None
|
279
287
|
f_origin = Topology.Centroid(f)
|
280
288
|
normal = Face.Normal(f, mantissa=mantissa)
|
@@ -329,7 +337,7 @@ class Wire():
|
|
329
337
|
vb3 = Vertex.ByCoordinates(maxX, maxY, 0)
|
330
338
|
vb4 = Vertex.ByCoordinates(x_min, maxY, 0)
|
331
339
|
|
332
|
-
boundingRectangle = Wire.ByVertices([vb1, vb2, vb3, vb4], close=True)
|
340
|
+
boundingRectangle = Wire.ByVertices([vb1, vb2, vb3, vb4], close=True, tolerance=tolerance, silent=silent)
|
333
341
|
boundingRectangle = Topology.Rotate(boundingRectangle, origin=origin, axis=[0, 0, 1], angle=-best_z)
|
334
342
|
boundingRectangle = Topology.Unflatten(boundingRectangle, origin=f_origin, direction=normal)
|
335
343
|
dictionary = Dictionary.ByKeysValues(["zrot"], [best_z])
|
@@ -337,7 +345,7 @@ class Wire():
|
|
337
345
|
return boundingRectangle
|
338
346
|
|
339
347
|
@staticmethod
|
340
|
-
def ByEdges(edges: list, orient: bool = False, tolerance: float = 0.0001):
|
348
|
+
def ByEdges(edges: list, orient: bool = False, tolerance: float = 0.0001, silent: bool = False):
|
341
349
|
"""
|
342
350
|
Creates a wire from the input list of edges.
|
343
351
|
|
@@ -348,7 +356,9 @@ class Wire():
|
|
348
356
|
orient : bool , optional
|
349
357
|
If set to True the edges are oriented head to tail. Otherwise, they are not. The default is False.
|
350
358
|
tolerance : float , optional
|
351
|
-
The desired tolerance. The default is 0.0001
|
359
|
+
The desired tolerance. The default is 0.0001.
|
360
|
+
silent : bool , optional
|
361
|
+
If set to True, no error and warning messages are printed. Otherwise, they are. The default is False.
|
352
362
|
|
353
363
|
Returns
|
354
364
|
-------
|
@@ -363,14 +373,16 @@ class Wire():
|
|
363
373
|
return None
|
364
374
|
edgeList = [x for x in edges if Topology.IsInstance(x, "Edge")]
|
365
375
|
if len(edgeList) == 0:
|
366
|
-
|
376
|
+
if not silent:
|
377
|
+
print("Wire.ByEdges - Error: The input edges list does not contain any valid edges. Returning None.")
|
367
378
|
return None
|
368
379
|
if len(edgeList) == 1:
|
369
380
|
wire = topologic.Wire.ByEdges(edgeList) # Hook to Core
|
370
381
|
else:
|
371
382
|
wire = Topology.SelfMerge(Cluster.ByTopologies(edgeList), tolerance=tolerance)
|
372
383
|
if not Topology.IsInstance(wire, "Wire"):
|
373
|
-
|
384
|
+
if not silent:
|
385
|
+
print("Wire.ByEdges - Error: The operation failed. Returning None.")
|
374
386
|
wire = None
|
375
387
|
if Wire.IsManifold(wire):
|
376
388
|
if orient == True:
|
@@ -598,7 +610,7 @@ class Wire():
|
|
598
610
|
# #w_e = Edge.SetLength(w_e, Edge.Length(w_e)+(2*epsilon), bothSides = True)
|
599
611
|
# wire_edges.append(w_e)
|
600
612
|
|
601
|
-
return_wire = Wire.ByVertices(final_vertices, close=Wire.IsClosed(wire), tolerance=tolerance)
|
613
|
+
return_wire = Wire.ByVertices(final_vertices, close=Wire.IsClosed(wire), tolerance=tolerance, silent=silent)
|
602
614
|
#wire_edges = Topology.Edges(wire_edges)
|
603
615
|
wire_edges = [Edge.SetLength(w_e, Edge.Length(w_e)+(2*epsilon), bothSides=True) for w_e in Topology.Edges(return_wire)]
|
604
616
|
return_wire_edges = Topology.Edges(return_wire)
|
@@ -838,7 +850,7 @@ class Wire():
|
|
838
850
|
return return_wire
|
839
851
|
|
840
852
|
@staticmethod
|
841
|
-
def ByVertices(vertices: list, close: bool = True, tolerance: float = 0.0001):
|
853
|
+
def ByVertices(vertices: list, close: bool = True, tolerance: float = 0.0001, silent: bool = False):
|
842
854
|
"""
|
843
855
|
Creates a wire from the input list of vertices.
|
844
856
|
|
@@ -850,6 +862,8 @@ class Wire():
|
|
850
862
|
If True the last vertex will be connected to the first vertex to close the wire. The default is True.
|
851
863
|
tolerance : float , optional
|
852
864
|
The desired tolerance. The default is 0.0001.
|
865
|
+
silent : bool , optional
|
866
|
+
If set to True, no error and warning messages are printed. Otherwise, they are. The default is False.
|
853
867
|
|
854
868
|
Returns
|
855
869
|
-------
|
@@ -860,37 +874,57 @@ class Wire():
|
|
860
874
|
from topologicpy.Edge import Edge
|
861
875
|
from topologicpy.Cluster import Cluster
|
862
876
|
from topologicpy.Topology import Topology
|
877
|
+
import inspect
|
863
878
|
|
864
879
|
if not isinstance(vertices, list):
|
865
880
|
return None
|
866
881
|
vertexList = [x for x in vertices if Topology.IsInstance(x, "Vertex")]
|
867
882
|
if len(vertexList) < 2:
|
868
|
-
|
883
|
+
if not silent:
|
884
|
+
print("Wire.ByVertices - Error: The number of vertices is less than 2. Returning None.")
|
885
|
+
curframe = inspect.currentframe()
|
886
|
+
calframe = inspect.getouterframes(curframe, 2)
|
887
|
+
print('caller name:', calframe[1][3])
|
869
888
|
return None
|
870
889
|
edges = []
|
871
890
|
for i in range(len(vertexList)-1):
|
872
891
|
v1 = vertexList[i]
|
873
892
|
v2 = vertexList[i+1]
|
874
|
-
e = Edge.
|
893
|
+
e = Edge.ByVertices([v1, v2], tolerance=tolerance, silent=silent)
|
875
894
|
if Topology.IsInstance(e, "Edge"):
|
876
895
|
edges.append(e)
|
896
|
+
else:
|
897
|
+
if not silent:
|
898
|
+
curframe = inspect.currentframe()
|
899
|
+
calframe = inspect.getouterframes(curframe, 2)
|
900
|
+
print('caller name:', calframe[1][3])
|
877
901
|
if close:
|
878
902
|
v1 = vertexList[-1]
|
879
903
|
v2 = vertexList[0]
|
880
|
-
e = Edge.
|
904
|
+
e = Edge.ByVertices([v1, v2], tolerance=tolerance, silent=True) # We want to force suppress errors and warnings here.
|
881
905
|
if Topology.IsInstance(e, "Edge"):
|
882
906
|
edges.append(e)
|
907
|
+
else:
|
908
|
+
if not silent:
|
909
|
+
print("Wire.ByVertices - Warning: Degenerate edge. Skipping.")
|
910
|
+
curframe = inspect.currentframe()
|
911
|
+
calframe = inspect.getouterframes(curframe, 2)
|
912
|
+
print('caller name:', calframe[1][3])
|
883
913
|
if len(edges) < 1:
|
884
|
-
|
914
|
+
if not silent:
|
915
|
+
print("Wire.ByVertices - Error: The number of edges is less than 1. Returning None.")
|
916
|
+
curframe = inspect.currentframe()
|
917
|
+
calframe = inspect.getouterframes(curframe, 2)
|
918
|
+
print('caller name:', calframe[1][3])
|
885
919
|
return None
|
886
920
|
elif len(edges) == 1:
|
887
|
-
wire = Wire.ByEdges(edges, orient=False)
|
921
|
+
wire = Wire.ByEdges(edges, orient=False, silent=silent)
|
888
922
|
else:
|
889
923
|
wire = Topology.SelfMerge(Cluster.ByTopologies(edges), tolerance=tolerance)
|
890
924
|
return wire
|
891
925
|
|
892
926
|
@staticmethod
|
893
|
-
def ByVerticesCluster(cluster, close: bool = True, tolerance: float = 0.0001):
|
927
|
+
def ByVerticesCluster(cluster, close: bool = True, tolerance: float = 0.0001, silent: bool = False):
|
894
928
|
"""
|
895
929
|
Creates a wire from the input cluster of vertices.
|
896
930
|
|
@@ -902,7 +936,9 @@ class Wire():
|
|
902
936
|
If True the last vertex will be connected to the first vertex to close the wire. The default is True.
|
903
937
|
tolerance : float , optional
|
904
938
|
The desired tolerance. The default is 0.0001
|
905
|
-
|
939
|
+
silent : bool , optional
|
940
|
+
If set to True, no error and warning messages are printed. Otherwise, they are. The default is False.
|
941
|
+
|
906
942
|
Returns
|
907
943
|
-------
|
908
944
|
topologic_core.Wire
|
@@ -912,12 +948,14 @@ class Wire():
|
|
912
948
|
from topologicpy.Topology import Topology
|
913
949
|
|
914
950
|
if not Topology.IsInstance(cluster, "Cluster"):
|
951
|
+
if not silent:
|
952
|
+
print("Wire.ByVerticesCluster - Error: The input cluster parameter is not a valid cluster. Returning None.")
|
915
953
|
return None
|
916
954
|
vertices = Topology.Vertices(cluster)
|
917
|
-
return Wire.ByVertices(vertices, close=close, tolerance=tolerance)
|
955
|
+
return Wire.ByVertices(vertices, close=close, tolerance=tolerance, silent=silent)
|
918
956
|
|
919
957
|
@staticmethod
|
920
|
-
def Circle(origin= None, radius: float = 0.5, sides: int = 16, fromAngle: float = 0.0, toAngle: float = 360.0, close: bool = True, direction: list = [0, 0, 1], placement: str = "center", tolerance: float = 0.0001):
|
958
|
+
def Circle(origin= None, radius: float = 0.5, sides: int = 16, fromAngle: float = 0.0, toAngle: float = 360.0, close: bool = True, direction: list = [0, 0, 1], placement: str = "center", tolerance: float = 0.0001, silent: bool = False):
|
921
959
|
"""
|
922
960
|
Creates a circle.
|
923
961
|
|
@@ -954,10 +992,12 @@ class Wire():
|
|
954
992
|
if not Topology.IsInstance(origin, "Vertex"):
|
955
993
|
origin = Vertex.ByCoordinates(0, 0, 0)
|
956
994
|
if not Topology.IsInstance(origin, "Vertex"):
|
957
|
-
|
995
|
+
if not silent:
|
996
|
+
print("Wire.Circle - Error: The input origin parameter is not a valid Vertex. Returning None.")
|
958
997
|
return None
|
959
998
|
if not placement.lower() in ["center", "lowerleft", "upperleft", "lowerright", "upperright"]:
|
960
|
-
|
999
|
+
if not silent:
|
1000
|
+
print("Wire.Circle - Error: The input placement parameter is not a recognized string. Returning None.")
|
961
1001
|
return None
|
962
1002
|
radius = abs(radius)
|
963
1003
|
if radius <= tolerance:
|
@@ -987,9 +1027,9 @@ class Wire():
|
|
987
1027
|
baseV.append(Vertex.ByCoordinates(x, y, z))
|
988
1028
|
|
989
1029
|
if angleRange == 360:
|
990
|
-
baseWire = Wire.ByVertices(baseV[::-1], close=False, tolerance=tolerance) #reversing the list so that the normal points up in Blender
|
1030
|
+
baseWire = Wire.ByVertices(baseV[::-1], close=False, tolerance=tolerance, silent=silent) #reversing the list so that the normal points up in Blender
|
991
1031
|
else:
|
992
|
-
baseWire = Wire.ByVertices(baseV[::-1], close=close, tolerance=tolerance) #reversing the list so that the normal points up in Blender
|
1032
|
+
baseWire = Wire.ByVertices(baseV[::-1], close=close, tolerance=tolerance, silent=silent) #reversing the list so that the normal points up in Blender
|
993
1033
|
|
994
1034
|
if placement.lower() == "lowerleft":
|
995
1035
|
baseWire = Topology.Translate(baseWire, radius, radius, 0)
|
@@ -2337,14 +2377,14 @@ class Wire():
|
|
2337
2377
|
v1 = Topology.TranslateByDirectionDistance(v, dir1, a)
|
2338
2378
|
center = Topology.TranslateByDirectionDistance(v, dir_bisector, h)
|
2339
2379
|
v2 = Topology.TranslateByDirectionDistance(v, dir2, a)
|
2340
|
-
fillet = Wire.Circle(origin=center, radius=radius, close=True)
|
2341
|
-
bisector = Edge.ByVertices(v, center)
|
2380
|
+
fillet = Wire.Circle(origin=center, radius=radius, close=True, tolerance=tolerance, silent=silent)
|
2381
|
+
bisector = Edge.ByVertices(v, center, tolerance=tolerance, silent=silent)
|
2342
2382
|
mid_vertex = Topology.Slice(bisector, fillet)
|
2343
2383
|
mid_vertex = Topology.Vertices(mid_vertex)[1]
|
2344
|
-
fillet = Wire.Arc(v1, mid_vertex, v2, sides=sides, close= False)
|
2384
|
+
fillet = Wire.Arc(v1, mid_vertex, v2, sides=sides, close= False, tolerance=tolerance, silent=silent)
|
2345
2385
|
f_sv = Wire.StartVertex(fillet)
|
2346
2386
|
if Vertex.Distance(f_sv, edge1) < Vertex.Distance(f_sv, edge0):
|
2347
|
-
fillet = Wire.Reverse(fillet)
|
2387
|
+
fillet = Wire.Reverse(fillet, silent=True)
|
2348
2388
|
final_vertices += Topology.Vertices(fillet)
|
2349
2389
|
else:
|
2350
2390
|
if not silent:
|
@@ -2353,7 +2393,7 @@ class Wire():
|
|
2353
2393
|
final_vertices.append(v)
|
2354
2394
|
else:
|
2355
2395
|
final_vertices.append(v)
|
2356
|
-
flat_wire = Wire.ByVertices(final_vertices, close=Wire.IsClosed(wire), tolerance=tolerance)
|
2396
|
+
flat_wire = Wire.ByVertices(final_vertices, close=Wire.IsClosed(wire), tolerance=tolerance, silent=True)
|
2357
2397
|
# Unflatten the wire
|
2358
2398
|
return_wire = Topology.Unflatten(flat_wire, origin=Vertex.Origin(), direction=normal)
|
2359
2399
|
return return_wire
|
@@ -3525,7 +3565,7 @@ class Wire():
|
|
3525
3565
|
return w
|
3526
3566
|
|
3527
3567
|
@staticmethod
|
3528
|
-
def Rectangle(origin= None, width: float = 1.0, length: float = 1.0, direction: list = [0, 0, 1], placement: str = "center", angTolerance: float = 0.1, tolerance: float = 0.0001):
|
3568
|
+
def Rectangle(origin= None, width: float = 1.0, length: float = 1.0, direction: list = [0, 0, 1], placement: str = "center", angTolerance: float = 0.1, tolerance: float = 0.0001, silent: bool = False):
|
3529
3569
|
"""
|
3530
3570
|
Creates a rectangle.
|
3531
3571
|
|
@@ -3545,6 +3585,8 @@ class Wire():
|
|
3545
3585
|
The desired angular tolerance. The default is 0.1.
|
3546
3586
|
tolerance : float , optional
|
3547
3587
|
The desired tolerance. The default is 0.0001.
|
3588
|
+
silent : bool , optional
|
3589
|
+
If set to True, no error and warning messages are printed. Otherwise, they are. The default is False.
|
3548
3590
|
|
3549
3591
|
Returns
|
3550
3592
|
-------
|
@@ -3558,18 +3600,22 @@ class Wire():
|
|
3558
3600
|
if not Topology.IsInstance(origin, "Vertex"):
|
3559
3601
|
origin = Vertex.ByCoordinates(0, 0, 0)
|
3560
3602
|
if not Topology.IsInstance(origin, "Vertex"):
|
3561
|
-
|
3603
|
+
if not silent:
|
3604
|
+
print("Wire.Rectangle - Error: specified origin is not a topologic vertex. Returning None.")
|
3562
3605
|
return None
|
3563
3606
|
if not placement.lower() in ["center", "lowerleft", "upperleft", "lowerright", "upperright"]:
|
3564
|
-
|
3607
|
+
if not silent:
|
3608
|
+
print("Wire.Rectangle - Error: Could not find placement in the list of placements. Returning None.")
|
3565
3609
|
return None
|
3566
3610
|
width = abs(width)
|
3567
3611
|
length = abs(length)
|
3568
3612
|
if width <= tolerance or length <= tolerance:
|
3569
|
-
|
3613
|
+
if not silent:
|
3614
|
+
print("Wire.Rectangle - Error: One or more of the specified dimensions is below the tolerance value. Returning None.")
|
3570
3615
|
return None
|
3571
3616
|
if (abs(direction[0]) + abs(direction[1]) + abs(direction[2])) <= tolerance:
|
3572
|
-
|
3617
|
+
if not silent:
|
3618
|
+
print("Wire.Rectangle - Error: The direction vector magnitude is below the tolerance value. Returning None.")
|
3573
3619
|
return None
|
3574
3620
|
xOffset = 0
|
3575
3621
|
yOffset = 0
|
@@ -3591,7 +3637,7 @@ class Wire():
|
|
3591
3637
|
vb3 = Vertex.ByCoordinates(Vertex.X(origin)+width*0.5+xOffset,Vertex.Y(origin)+length*0.5+yOffset,Vertex.Z(origin))
|
3592
3638
|
vb4 = Vertex.ByCoordinates(Vertex.X(origin)-width*0.5+xOffset,Vertex.Y(origin)+length*0.5+yOffset,Vertex.Z(origin))
|
3593
3639
|
|
3594
|
-
baseWire = Wire.ByVertices([vb1, vb2, vb3, vb4], close=True, tolerance=tolerance)
|
3640
|
+
baseWire = Wire.ByVertices([vb1, vb2, vb3, vb4], close=True, tolerance=tolerance, silent=silent)
|
3595
3641
|
if direction != [0, 0, 1]:
|
3596
3642
|
baseWire = Topology.Orient(baseWire, origin=origin, dirA=[0, 0, 1], dirB=direction)
|
3597
3643
|
return baseWire
|
@@ -3772,7 +3818,7 @@ class Wire():
|
|
3772
3818
|
return return_list
|
3773
3819
|
|
3774
3820
|
@staticmethod
|
3775
|
-
def Reverse(wire, transferDictionaries = False, tolerance: float = 0.0001):
|
3821
|
+
def Reverse(wire, transferDictionaries = False, tolerance: float = 0.0001, silent: bool = False):
|
3776
3822
|
"""
|
3777
3823
|
Creates a wire that has the reverse direction of the input wire.
|
3778
3824
|
|
@@ -3784,6 +3830,8 @@ class Wire():
|
|
3784
3830
|
If set to True the dictionaries of the input wire are transferred to the new wire. Othwerwise, they are not. The default is False.
|
3785
3831
|
tolerance : float , optional
|
3786
3832
|
The desired tolerance. The default is 0.0001.
|
3833
|
+
silent : bool, optional
|
3834
|
+
If set to True, no error and warning messages are printed. Otherwise, they are. The default is False.
|
3787
3835
|
|
3788
3836
|
Returns
|
3789
3837
|
-------
|
@@ -3794,10 +3842,12 @@ class Wire():
|
|
3794
3842
|
from topologicpy.Topology import Topology
|
3795
3843
|
|
3796
3844
|
if not Topology.IsInstance(wire, "Wire"):
|
3797
|
-
|
3845
|
+
if not silent:
|
3846
|
+
print("Wire.Reverse - Error: The input wire parameter is not a valid wire. Returning None.")
|
3798
3847
|
return None
|
3799
3848
|
if not Wire.IsManifold(wire):
|
3800
|
-
|
3849
|
+
if not silent:
|
3850
|
+
print("Wire.Reverse - Error: The input wire parameter is not a manifold wire. Returning None.")
|
3801
3851
|
return None
|
3802
3852
|
|
3803
3853
|
original_vertices = Topology.Vertices(wire)
|
@@ -3811,11 +3861,11 @@ class Wire():
|
|
3811
3861
|
edge_selectors.append(s)
|
3812
3862
|
vertices = Topology.Vertices(wire)
|
3813
3863
|
vertices.reverse()
|
3814
|
-
return_wire = Wire.ByVertices(vertices, close=Wire.IsClosed(wire), tolerance=tolerance)
|
3864
|
+
return_wire = Wire.ByVertices(vertices, close=Wire.IsClosed(wire), tolerance=tolerance, silent=silent)
|
3815
3865
|
if transferDictionaries:
|
3816
3866
|
return_wire = Topology.TransferDictionariesBySelectors(return_wire, selectors=edge_selectors, tranEdges=True)
|
3817
3867
|
return_wire = Topology.TransferDictionariesBySelectors(return_wire, selectors=original_vertices, tranVertices=True)
|
3818
|
-
return_wire = Topology.SetDictionary(return_wire, Topology.Dictionary(wire), silent=
|
3868
|
+
return_wire = Topology.SetDictionary(return_wire, Topology.Dictionary(wire), silent=silent)
|
3819
3869
|
return return_wire
|
3820
3870
|
|
3821
3871
|
@staticmethod
|
topologicpy/version.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = '0.8.
|
1
|
+
__version__ = '0.8.33'
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: topologicpy
|
3
|
-
Version: 0.8.
|
3
|
+
Version: 0.8.33
|
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
|
@@ -1,38 +1,38 @@
|
|
1
1
|
topologicpy/ANN.py,sha256=DrNAhNHp-jSvsPc1fb7KVPU46cYmejAvghhknOM430Y,47932
|
2
2
|
topologicpy/Aperture.py,sha256=wNn5miB_IrGCBYuQ18HXQYRva20dUC3id4AJCulL7to,2723
|
3
|
-
topologicpy/BVH.py,sha256=
|
4
|
-
topologicpy/CSG.py,sha256=
|
5
|
-
topologicpy/Cell.py,sha256=
|
6
|
-
topologicpy/CellComplex.py,sha256=
|
7
|
-
topologicpy/Cluster.py,sha256=
|
3
|
+
topologicpy/BVH.py,sha256=ti-23A2HIxaqnJ3C9GWhCjQev9qQwdrSfZVfXVZujYE,13127
|
4
|
+
topologicpy/CSG.py,sha256=hqFPg3RvAnRgzwyyWbc4N80ZYO9AfvbWn0RsjXvaz8k,15695
|
5
|
+
topologicpy/Cell.py,sha256=WQyi2xKT5PFovGZzu1oiw0ICuJultsOXnNbfELrMLTI,173467
|
6
|
+
topologicpy/CellComplex.py,sha256=nrQmlqr0wUkd6CrpaMRfgBo6O8Crgk1rM1jDEphiDmc,70051
|
7
|
+
topologicpy/Cluster.py,sha256=Wv81yPlQ3Qlnylpvs2aBVNV77M0Z9oHTUfTeLbAuX74,58790
|
8
8
|
topologicpy/Color.py,sha256=ZVVQRKGjebY9aOU1gpN_AbssdRRiVKlZV3f8TrsTNgg,20307
|
9
9
|
topologicpy/Context.py,sha256=G3CwMvN8Jw2rnQRwB-n4MaQq_wLS0vPimbXKwsdMJ80,3055
|
10
10
|
topologicpy/DGL.py,sha256=HQXy9iDnrvWGDxaBfe5pRbweQ2zLBvAf6UdjfhKkQYI,139041
|
11
11
|
topologicpy/Dictionary.py,sha256=Lf24WHW8q_RCq0l8VpT3XJTn6UuStY66JI4Lb4W08jI,34126
|
12
|
-
topologicpy/Edge.py,sha256=
|
12
|
+
topologicpy/Edge.py,sha256=6M7UMPZj_JXXH9mFieEcQu3haYQ6Rn64yRcL0b_axl8,73484
|
13
13
|
topologicpy/EnergyModel.py,sha256=Pyb28gDDwhzlQIH0xqAygqS0P3SJxWyyV7OWS_AAfRs,53856
|
14
|
-
topologicpy/Face.py,sha256=
|
15
|
-
topologicpy/Graph.py,sha256=
|
14
|
+
topologicpy/Face.py,sha256=1r6j4DOhDJEVyRTuFhxh1wmRMEvqZe8FQ0_Yy-J0pzg,202021
|
15
|
+
topologicpy/Graph.py,sha256=0w3GP1CuJyE6xq1mALB93R3s4OFJnF6k9HkRZDhwkoQ,581043
|
16
16
|
topologicpy/Grid.py,sha256=EbI2NcYhQDpD5mItd7A1Lpr8Puuf87vZPWuoh7_gChQ,18483
|
17
17
|
topologicpy/Helper.py,sha256=JdvC30WMrla46mTj5TdwCV_bRv-6y8vK5Bkx0prluy4,29100
|
18
18
|
topologicpy/Honeybee.py,sha256=yctkwfdupKnp7bAOjP1Z4YaYpRrWoMEb4gz9Z5zaWwE,21751
|
19
19
|
topologicpy/Matrix.py,sha256=BHGDRkBn1pf5DkRoY8feAhDGHTF3bjFM4jluiEb_A0w,22779
|
20
20
|
topologicpy/Neo4j.py,sha256=vNMaqTWerwr-3luLjYEXNhf8T97aFee6x5sIKBHY73s,22392
|
21
|
-
topologicpy/Plotly.py,sha256=
|
21
|
+
topologicpy/Plotly.py,sha256=5E6M2N0MbdkA5iMZ_Y71PaPB9wilEneYVUba8RqeKe0,119400
|
22
22
|
topologicpy/Polyskel.py,sha256=oVfM4lqSMPTjnkHfsRU9VI8Blt6Vf0LVPkD9ebz7Wmw,27082
|
23
23
|
topologicpy/PyG.py,sha256=zvV6jtnol_aFiN6JRoMpYwBVfOU2aFs9gdWSdEo6mtU,109757
|
24
|
-
topologicpy/ShapeGrammar.py,sha256=
|
24
|
+
topologicpy/ShapeGrammar.py,sha256=ay2kOkMvoa_KqGd_ZCLgDk0hmyMniI636N_YbMsyM60,23259
|
25
25
|
topologicpy/Shell.py,sha256=h8S2nP1e0JtMxeOdAFZVhOYTJWTW8vlZRM5lxK0gu2o,89577
|
26
26
|
topologicpy/Speckle.py,sha256=-eiTqJugd7pHiHpD3pDUcDO6CGhVyPV14HFRzaqEoaw,18187
|
27
27
|
topologicpy/Sun.py,sha256=_VBBAUIDhvpkp72JBZlv7k9qx9jYubm3yM56UZ1Nc6c,36837
|
28
|
-
topologicpy/Topology.py,sha256=
|
28
|
+
topologicpy/Topology.py,sha256=SFC3YBiLDH5zoZgJ1fPyZ72W_fTSbjkMOoXPI2mexU8,457623
|
29
29
|
topologicpy/Vector.py,sha256=mx7fgABdioikPWM9HzXKzmqfx3u_XBcU_jlLD4qK2x8,42407
|
30
|
-
topologicpy/Vertex.py,sha256=
|
31
|
-
topologicpy/Wire.py,sha256=
|
30
|
+
topologicpy/Vertex.py,sha256=sY9M7sMep7iTGiRYlmr8ed18Yz_RLyH6-Fm_L6SJTTw,84688
|
31
|
+
topologicpy/Wire.py,sha256=5k6KflNQv2HGI1ncWLywwjqdNzJGJT2IsPbU7qnfM2Q,231723
|
32
32
|
topologicpy/__init__.py,sha256=RMftibjgAnHB1vdL-muo71RwMS4972JCxHuRHOlU428,928
|
33
|
-
topologicpy/version.py,sha256=
|
34
|
-
topologicpy-0.8.
|
35
|
-
topologicpy-0.8.
|
36
|
-
topologicpy-0.8.
|
37
|
-
topologicpy-0.8.
|
38
|
-
topologicpy-0.8.
|
33
|
+
topologicpy/version.py,sha256=n8OQUN0fcpz2N9lYYXEoI8M_7OTKzN9D-4I2JYQIW6s,23
|
34
|
+
topologicpy-0.8.33.dist-info/licenses/LICENSE,sha256=FK0vJ73LuE8PYJAn7LutsReWR47-Ooovw2dnRe5yV6Q,681
|
35
|
+
topologicpy-0.8.33.dist-info/METADATA,sha256=UeGTrzifYBHgIosB2QHKADZQ3Kd8PmoG4ZRUAgWhp6A,10535
|
36
|
+
topologicpy-0.8.33.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
37
|
+
topologicpy-0.8.33.dist-info/top_level.txt,sha256=J30bDzW92Ob7hw3zA8V34Jlp-vvsfIkGzkr8sqvb4Uw,12
|
38
|
+
topologicpy-0.8.33.dist-info/RECORD,,
|
File without changes
|
File without changes
|