topologicpy 0.7.5__py3-none-any.whl → 0.7.8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- topologicpy/Cell.py +62 -53
- topologicpy/CellComplex.py +10 -8
- topologicpy/Edge.py +21 -16
- topologicpy/EnergyModel.py +20 -13
- topologicpy/Face.py +23 -25
- topologicpy/Graph.py +385 -217
- topologicpy/Grid.py +23 -11
- topologicpy/Honeybee.py +16 -15
- topologicpy/Neo4j.py +22 -10
- topologicpy/Plotly.py +49 -62
- topologicpy/Shell.py +79 -54
- topologicpy/Topology.py +95 -50
- topologicpy/Vector.py +4 -2
- topologicpy/Vertex.py +64 -42
- topologicpy/Wire.py +23 -12
- topologicpy/version.py +1 -1
- {topologicpy-0.7.5.dist-info → topologicpy-0.7.8.dist-info}/METADATA +1 -1
- topologicpy-0.7.8.dist-info/RECORD +33 -0
- topologicpy-0.7.5.dist-info/RECORD +0 -33
- {topologicpy-0.7.5.dist-info → topologicpy-0.7.8.dist-info}/LICENSE +0 -0
- {topologicpy-0.7.5.dist-info → topologicpy-0.7.8.dist-info}/WHEEL +0 -0
- {topologicpy-0.7.5.dist-info → topologicpy-0.7.8.dist-info}/top_level.txt +0 -0
topologicpy/Vertex.py
CHANGED
@@ -35,7 +35,7 @@ except:
|
|
35
35
|
|
36
36
|
class Vertex():
|
37
37
|
@staticmethod
|
38
|
-
def AreCollinear(vertices: list, tolerance: float = 0.0001):
|
38
|
+
def AreCollinear(vertices: list, mantissa: int = 6, tolerance: float = 0.0001):
|
39
39
|
"""
|
40
40
|
Returns True if the input list of vertices form a straight line. Returns False otherwise.
|
41
41
|
|
@@ -43,6 +43,8 @@ class Vertex():
|
|
43
43
|
----------
|
44
44
|
vertices : list
|
45
45
|
The input list of vertices.
|
46
|
+
mantissa : int , optional
|
47
|
+
The desired length of the mantissa. The default is 6.
|
46
48
|
tolerance : float, optional
|
47
49
|
The desired tolerance. The default is 0.0001.
|
48
50
|
|
@@ -57,9 +59,9 @@ class Vertex():
|
|
57
59
|
from topologicpy.Vector import Vector
|
58
60
|
import sys
|
59
61
|
def areCollinear(vertices, tolerance=0.0001):
|
60
|
-
point1 =
|
61
|
-
point2 =
|
62
|
-
point3 =
|
62
|
+
point1 = Vertex.Coordinates(vertices[0], mantissa=mantissa)
|
63
|
+
point2 = Vertex.Coordinates(vertices[1], mantissa=mantissa)
|
64
|
+
point3 = Vertex.Coordinates(vertices[2], mantissa=mantissa)
|
63
65
|
|
64
66
|
vector1 = [point2[0] - point1[0], point2[1] - point1[1], point2[2] - point1[2]]
|
65
67
|
vector2 = [point3[0] - point1[0], point3[1] - point1[1], point3[2] - point1[2]]
|
@@ -306,7 +308,7 @@ class Vertex():
|
|
306
308
|
return vertex
|
307
309
|
|
308
310
|
@staticmethod
|
309
|
-
def Centroid(vertices):
|
311
|
+
def Centroid(vertices: list, mantissa: int = 6):
|
310
312
|
"""
|
311
313
|
Returns the centroid of the input list of vertices.
|
312
314
|
|
@@ -314,6 +316,8 @@ class Vertex():
|
|
314
316
|
-----------
|
315
317
|
vertices : list
|
316
318
|
The input list of vertices
|
319
|
+
mantissa : int , optional
|
320
|
+
The desired length of the mantissa. The default is 6.
|
317
321
|
|
318
322
|
Return
|
319
323
|
----------
|
@@ -332,9 +336,9 @@ class Vertex():
|
|
332
336
|
return None
|
333
337
|
if len(vertices) == 1:
|
334
338
|
return vertices[0]
|
335
|
-
cx = sum(Vertex.X(v) for v in vertices) / len(vertices)
|
336
|
-
cy = sum(Vertex.Y(v) for v in vertices) / len(vertices)
|
337
|
-
cz = sum(Vertex.Z(v) for v in vertices) / len(vertices)
|
339
|
+
cx = sum(Vertex.X(v, mantissa=mantissa) for v in vertices) / len(vertices)
|
340
|
+
cy = sum(Vertex.Y(v, mantissa=mantissa) for v in vertices) / len(vertices)
|
341
|
+
cz = sum(Vertex.Z(v, mantissa=mantissa) for v in vertices) / len(vertices)
|
338
342
|
return Vertex.ByCoordinates(cx, cy, cz)
|
339
343
|
|
340
344
|
@staticmethod
|
@@ -379,9 +383,9 @@ class Vertex():
|
|
379
383
|
|
380
384
|
if not Topology.IsInstance(vertex, "Vertex"):
|
381
385
|
return None
|
382
|
-
x =
|
383
|
-
y =
|
384
|
-
z =
|
386
|
+
x = Vertex.X(vertex, mantissa)
|
387
|
+
y = Vertex.Y(vertex, mantissa)
|
388
|
+
z = Vertex.Z(vertex, mantissa)
|
385
389
|
matrix = [[1, 0, 0, x],
|
386
390
|
[0, 1, 0, y],
|
387
391
|
[0, 0, 1, z],
|
@@ -402,7 +406,7 @@ class Vertex():
|
|
402
406
|
return output
|
403
407
|
|
404
408
|
@staticmethod
|
405
|
-
def CounterClockwise2D(vertices):
|
409
|
+
def CounterClockwise2D(vertices: list, mantissa: int = 6):
|
406
410
|
"""
|
407
411
|
Sorts the input list of vertices in a counterclockwise fashion. This method assumes that the vertices are on the XY plane. The Z coordinate is ignored.
|
408
412
|
|
@@ -410,6 +414,8 @@ class Vertex():
|
|
410
414
|
-----------
|
411
415
|
vertices : list
|
412
416
|
The input list of vertices
|
417
|
+
mantissa : int , optional
|
418
|
+
The desired length of the mantissa. The default is 6.
|
413
419
|
|
414
420
|
Return
|
415
421
|
-----------
|
@@ -417,10 +423,22 @@ class Vertex():
|
|
417
423
|
The input list of vertices sorted in a counter clockwise fashion
|
418
424
|
|
419
425
|
"""
|
426
|
+
from topologicpy.Topology import Topology
|
420
427
|
import math
|
428
|
+
|
429
|
+
if not isinstance(vertices, list):
|
430
|
+
print("Vertex.CounterClockwise2D - Error: The input vertices parameter is not a valid list. Returning None.")
|
431
|
+
return None
|
432
|
+
vertices = [v for v in vertices if Topology.IsInstance(v, "Vertex")]
|
433
|
+
if len(vertices) < 1:
|
434
|
+
print("Vertex.CounterClockwise2D - Error: The input vertices parameter does not contain any valid vertices. Returning None.")
|
435
|
+
return None
|
436
|
+
if len(vertices) == 1:
|
437
|
+
return vertices[0]
|
438
|
+
|
421
439
|
# find the centroid of the points
|
422
|
-
cx = sum(Vertex.X(v) for v in vertices) / len(vertices)
|
423
|
-
cy = sum(Vertex.Y(v) for v in vertices) / len(vertices)
|
440
|
+
cx = sum(Vertex.X(v, mantissa=mantissa) for v in vertices) / len(vertices)
|
441
|
+
cy = sum(Vertex.Y(v, mantissa=mantissa) for v in vertices) / len(vertices)
|
424
442
|
|
425
443
|
# sort the points based on their angle with respect to the centroid
|
426
444
|
vertices.sort(key=lambda v: (math.atan2(Vertex.Y(v) - cy, Vertex.X(v) - cx) + 2 * math.pi) % (2 * math.pi))
|
@@ -457,8 +475,7 @@ class Vertex():
|
|
457
475
|
|
458
476
|
|
459
477
|
@staticmethod
|
460
|
-
def Distance(vertex, topology, includeCentroid: bool =True,
|
461
|
-
mantissa: int = 6) -> float:
|
478
|
+
def Distance(vertex, topology, includeCentroid: bool =True, mantissa: int = 6) -> float:
|
462
479
|
"""
|
463
480
|
Returns the distance between the input vertex and the input topology. This method returns the distance to the closest sub-topology in the input topology, optionally including its centroid.
|
464
481
|
|
@@ -527,16 +544,16 @@ class Vertex():
|
|
527
544
|
return distance
|
528
545
|
|
529
546
|
def distance_to_vertex(vertexA, vertexB):
|
530
|
-
a = (Vertex.X(vertexA), Vertex.Y(vertexA), Vertex.Z(vertexA))
|
531
|
-
b = (Vertex.X(vertexB), Vertex.Y(vertexB), Vertex.Z(vertexB))
|
547
|
+
a = (Vertex.X(vertexA, mantissa=mantissa), Vertex.Y(vertexA, mantissa=mantissa), Vertex.Z(vertexA, mantissa=mantissa))
|
548
|
+
b = (Vertex.X(vertexB, mantissa=mantissa), Vertex.Y(vertexB, mantissa=mantissa), Vertex.Z(vertexB, mantissa=mantissa))
|
532
549
|
return distance_point_to_point(a, b)
|
533
550
|
|
534
551
|
def distance_to_edge(vertex, edge):
|
535
|
-
a = (Vertex.X(vertex), Vertex.Y(vertex), Vertex.Z(vertex))
|
552
|
+
a = (Vertex.X(vertex, mantissa=mantissa), Vertex.Y(vertex, mantissa=mantissa), Vertex.Z(vertex, mantissa=mantissa))
|
536
553
|
sv = Edge.StartVertex(edge)
|
537
554
|
ev = Edge.EndVertex(edge)
|
538
|
-
svp = (Vertex.X(sv), Vertex.Y(sv), Vertex.Z(sv))
|
539
|
-
evp = (Vertex.X(ev), Vertex.Y(ev), Vertex.Z(ev))
|
555
|
+
svp = (Vertex.X(sv, mantissa=mantissa), Vertex.Y(sv, mantissa=mantissa), Vertex.Z(sv, mantissa=mantissa))
|
556
|
+
evp = (Vertex.X(ev, mantissa=mantissa), Vertex.Y(ev, mantissa=mantissa), Vertex.Z(ev, mantissa=mantissa))
|
540
557
|
return distance_point_to_line(a,svp, evp)
|
541
558
|
|
542
559
|
def distance_to_face(vertex, face, includeCentroid):
|
@@ -554,7 +571,7 @@ class Vertex():
|
|
554
571
|
b = dic["b"]
|
555
572
|
c = dic["c"]
|
556
573
|
d = dic["d"]
|
557
|
-
x1, y1, z1 = Vertex.Coordinates(vertex)
|
574
|
+
x1, y1, z1 = Vertex.Coordinates(vertex, mantissa=mantissa)
|
558
575
|
d = abs((a * x1 + b * y1 + c * z1 + d))
|
559
576
|
e = (math.sqrt(a * a + b * b + c * c))
|
560
577
|
if e == 0:
|
@@ -598,7 +615,7 @@ class Vertex():
|
|
598
615
|
return None
|
599
616
|
|
600
617
|
@staticmethod
|
601
|
-
def EnclosingCell(vertex, topology, exclusive: bool = True, tolerance: float = 0.0001) -> list:
|
618
|
+
def EnclosingCell(vertex, topology, exclusive: bool = True, mantissa: int = 6, tolerance: float = 0.0001) -> list:
|
602
619
|
"""
|
603
620
|
Returns the list of Cells found in the input topology that enclose the input vertex.
|
604
621
|
|
@@ -610,6 +627,8 @@ class Vertex():
|
|
610
627
|
The input topology.
|
611
628
|
exclusive : bool , optional
|
612
629
|
If set to True, return only the first found enclosing cell. The default is True.
|
630
|
+
mantissa : int , optional
|
631
|
+
The desired length of the mantissa. The default is 6.
|
613
632
|
tolerance : float , optional
|
614
633
|
The tolerance for computing if the input vertex is enclosed in a cell. The default is 0.0001.
|
615
634
|
|
@@ -629,16 +648,15 @@ class Vertex():
|
|
629
648
|
y = []
|
630
649
|
z = []
|
631
650
|
for aVertex in vertices:
|
632
|
-
x.append(
|
633
|
-
y.append(
|
634
|
-
z.append(
|
651
|
+
x.append(Vertex.X(aVertex, mantissa=mantissa))
|
652
|
+
y.append(Vertex.Y(aVertex, mantissa=mantissa))
|
653
|
+
z.append(Vertex.Z(aVertex, mantissa=mantissa))
|
635
654
|
return ([min(x), min(y), min(z), max(x), max(y), max(z)])
|
636
655
|
|
637
656
|
if Topology.IsInstance(topology, "Cell"):
|
638
657
|
cells = [topology]
|
639
658
|
elif Topology.IsInstance(topology, "Cluster") or Topology.IsInstance(topology, "CellComplex"):
|
640
|
-
cells =
|
641
|
-
_ = topology.Cells(None, cells)
|
659
|
+
cells = Topology.Cells(topology)
|
642
660
|
else:
|
643
661
|
return None
|
644
662
|
if len(cells) < 1:
|
@@ -646,7 +664,7 @@ class Vertex():
|
|
646
664
|
enclosingCells = []
|
647
665
|
for i in range(len(cells)):
|
648
666
|
bbox = boundingBox(cells[i])
|
649
|
-
if ((
|
667
|
+
if ((Vertex.X(vertex, mantissa=mantissa) < bbox[0]) or (Vertex.Y(vertex, mantissa=mantissa) < bbox[1]) or (Vertex.Z(vertex, mantissa=mantissa) < bbox[2]) or (Vertex.X(vertex, mantissa=mantissa) > bbox[3]) or (Vertex.Y(vertex, mantissa=mantissa) > bbox[4]) or (Vertex.Z(vertex, mantissa=mantissa) > bbox[5])) == False:
|
650
668
|
if Vertex.IsInternal(vertex, cells[i], tolerance=tolerance):
|
651
669
|
if exclusive:
|
652
670
|
return([cells[i]])
|
@@ -770,7 +788,7 @@ class Vertex():
|
|
770
788
|
return None
|
771
789
|
|
772
790
|
@staticmethod
|
773
|
-
def InterpolateValue(vertex, vertices, n=3, key="intensity", tolerance=0.0001):
|
791
|
+
def InterpolateValue(vertex, vertices: list, n: int = 3, key: str = "intensity", mantissa: int = 6, tolerance: float = 0.0001):
|
774
792
|
"""
|
775
793
|
Interpolates the value of the input vertex based on the values of the *n* nearest vertices.
|
776
794
|
|
@@ -784,6 +802,8 @@ class Vertex():
|
|
784
802
|
The maximum number of nearest vertices to consider. The default is 3.
|
785
803
|
key : str , optional
|
786
804
|
The key that holds the value to be interpolated in the dictionaries of the vertices. The default is "intensity".
|
805
|
+
mantissa : int , optional
|
806
|
+
The desired length of the mantissa. The default is 6.
|
787
807
|
tolerance : float , optional
|
788
808
|
The tolerance for computing if the input vertex is coincident with another vertex in the input list of vertices. The default is 0.0001.
|
789
809
|
|
@@ -860,14 +880,14 @@ class Vertex():
|
|
860
880
|
if len(vertices) == 0:
|
861
881
|
return None
|
862
882
|
|
863
|
-
point = (Vertex.X(vertex), Vertex.Y(vertex), Vertex.Z(vertex))
|
883
|
+
point = (Vertex.X(vertex, mantissa=mantissa), Vertex.Y(vertex, mantissa=mantissa), Vertex.Z(vertex, mantissa=mantissa))
|
864
884
|
data_points = []
|
865
885
|
for v in vertices:
|
866
886
|
d = Topology.Dictionary(v)
|
867
887
|
value = Dictionary.ValueAtKey(d, key)
|
868
888
|
if not value == None:
|
869
889
|
if type(value) == int or type(value) == float:
|
870
|
-
data_points.append((Vertex.X(v), Vertex.Y(v), Vertex.Z(v), value))
|
890
|
+
data_points.append((Vertex.X(v, mantissa=mantissa), Vertex.Y(v, mantissa=mantissa), Vertex.Z(v, mantissa=mantissa), value))
|
871
891
|
if len(data_points) == 0:
|
872
892
|
return None
|
873
893
|
if n > len(data_points):
|
@@ -1155,7 +1175,7 @@ class Vertex():
|
|
1155
1175
|
return False
|
1156
1176
|
|
1157
1177
|
@staticmethod
|
1158
|
-
def NearestVertex(vertex, topology, useKDTree: bool = True):
|
1178
|
+
def NearestVertex(vertex, topology, useKDTree: bool = True, mantissa: int = 6):
|
1159
1179
|
"""
|
1160
1180
|
Returns the vertex found in the input topology that is the nearest to the input vertex.
|
1161
1181
|
|
@@ -1167,7 +1187,9 @@ class Vertex():
|
|
1167
1187
|
The input topology to be searched for the nearest vertex.
|
1168
1188
|
useKDTree : bool , optional
|
1169
1189
|
if set to True, the algorithm will use a KDTree method to search for the nearest vertex. The default is True.
|
1170
|
-
|
1190
|
+
mantissa : int , optional
|
1191
|
+
The desired length of the mantissa. The default is 6.
|
1192
|
+
|
1171
1193
|
Returns
|
1172
1194
|
-------
|
1173
1195
|
topologic_core.Vertex
|
@@ -1178,8 +1200,8 @@ class Vertex():
|
|
1178
1200
|
|
1179
1201
|
def SED(a, b):
|
1180
1202
|
"""Compute the squared Euclidean distance between X and Y."""
|
1181
|
-
p1 = (
|
1182
|
-
p2 = (
|
1203
|
+
p1 = (Vertex.X(a, mantissa=mantissa), Vertex.Y(a, mantissa=mantissa), Vertex.Z(a, mantissa=mantissa))
|
1204
|
+
p2 = (Vertex.X(b, mantissa=mantissa), Vertex.Y(b, mantissa=mantissa), Vertex.Z(b, mantissa=mantissa))
|
1183
1205
|
return sum((i-j)**2 for i, j in zip(p1, p2))
|
1184
1206
|
|
1185
1207
|
BT = collections.namedtuple("BT", ["value", "left", "right"])
|
@@ -1188,19 +1210,19 @@ class Vertex():
|
|
1188
1210
|
right-subtrees.
|
1189
1211
|
"""
|
1190
1212
|
def firstItem(v):
|
1191
|
-
return
|
1213
|
+
return Vertex.X(v, mantissa=mantissa)
|
1192
1214
|
def secondItem(v):
|
1193
|
-
return
|
1215
|
+
return Vertex.Y(v, mantissa=mantissa)
|
1194
1216
|
def thirdItem(v):
|
1195
|
-
return
|
1217
|
+
return Vertex.Z(v, mantissa=mantissa)
|
1196
1218
|
|
1197
1219
|
def itemAtIndex(v, index):
|
1198
1220
|
if index == 0:
|
1199
|
-
return
|
1221
|
+
return Vertex.X(v, mantissa=mantissa)
|
1200
1222
|
elif index == 1:
|
1201
|
-
return
|
1223
|
+
return Vertex.Y(v, mantissa=mantissa)
|
1202
1224
|
elif index == 2:
|
1203
|
-
return
|
1225
|
+
return Vertex.Z(v, mantissa=mantissa)
|
1204
1226
|
|
1205
1227
|
def sortList(vertices, index):
|
1206
1228
|
if index == 0:
|
topologicpy/Wire.py
CHANGED
@@ -143,7 +143,7 @@ class Wire(Topology):
|
|
143
143
|
return arc
|
144
144
|
|
145
145
|
@staticmethod
|
146
|
-
def BoundingRectangle(topology, optimize: int = 0, tolerance=0.0001):
|
146
|
+
def BoundingRectangle(topology, optimize: int = 0, mantissa: int = 6, tolerance=0.0001):
|
147
147
|
"""
|
148
148
|
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.
|
149
149
|
|
@@ -153,6 +153,8 @@ class Wire(Topology):
|
|
153
153
|
The input topology.
|
154
154
|
optimize : int , optional
|
155
155
|
If set to an integer from 1 (low optimization) to 10 (high optimization), the method will attempt to optimize the bounding rectangle so that it reduces its surface area. The default is 0 which will result in an axis-aligned bounding rectangle. The default is 0.
|
156
|
+
mantissa : int , optional
|
157
|
+
The desired length of the mantissa. The default is 6.
|
156
158
|
tolerance : float , optional
|
157
159
|
The desired tolerance. The default is 0.0001.
|
158
160
|
|
@@ -177,8 +179,8 @@ class Wire(Topology):
|
|
177
179
|
x = []
|
178
180
|
y = []
|
179
181
|
for aVertex in vertices:
|
180
|
-
x.append(
|
181
|
-
y.append(
|
182
|
+
x.append(Vertex.X(aVertex, mantissa=mantissa))
|
183
|
+
y.append(Vertex.Y(aVertex, mantissa=mantissa))
|
182
184
|
minX = min(x)
|
183
185
|
minY = min(y)
|
184
186
|
maxX = max(x)
|
@@ -205,7 +207,7 @@ class Wire(Topology):
|
|
205
207
|
w = Wire.ByVertices(vList)
|
206
208
|
f = Face.ByWire(w, tolerance=tolerance)
|
207
209
|
f_origin = Topology.Centroid(f)
|
208
|
-
normal = Face.Normal(f)
|
210
|
+
normal = Face.Normal(f, mantissa=mantissa)
|
209
211
|
topology = Topology.Flatten(topology, origin=f_origin, direction=normal)
|
210
212
|
|
211
213
|
boundingRectangle = br(topology)
|
@@ -757,7 +759,7 @@ class Wire(Topology):
|
|
757
759
|
return new_wire
|
758
760
|
|
759
761
|
@staticmethod
|
760
|
-
def ConvexHull(topology, tolerance: float = 0.0001):
|
762
|
+
def ConvexHull(topology, mantissa: int = 6, tolerance: float = 0.0001):
|
761
763
|
"""
|
762
764
|
Returns a wire representing the 2D convex hull of the input topology. The vertices of the topology are assumed to be coplanar.
|
763
765
|
|
@@ -765,6 +767,8 @@ class Wire(Topology):
|
|
765
767
|
----------
|
766
768
|
topology : topologic_core.Topology
|
767
769
|
The input topology.
|
770
|
+
mantissa : int , optional
|
771
|
+
The desired length of the mantissa. The default is 6.
|
768
772
|
tolerance : float , optional
|
769
773
|
The desired tolerance. The default is 0.0001.
|
770
774
|
|
@@ -875,13 +879,13 @@ class Wire(Topology):
|
|
875
879
|
w = Wire.ByVertices(v)
|
876
880
|
f = Face.ByWire(w, tolerance=tolerance)
|
877
881
|
origin = Topology.Centroid(f)
|
878
|
-
normal = Face.Normal(f)
|
882
|
+
normal = Face.Normal(f, mantissa=mantissa)
|
879
883
|
f = Topology.Flatten(f, origin=origin, direction=normal)
|
880
884
|
topology = Topology.Flatten(topology, origin=origin, direction=normal)
|
881
885
|
vertices = Topology.Vertices(topology)
|
882
886
|
points = []
|
883
887
|
for v in vertices:
|
884
|
-
points.append((Vertex.X(v), Vertex.Y(v)))
|
888
|
+
points.append((Vertex.X(v, mantissa=mantissa), Vertex.Y(v, mantissa=mantissa)))
|
885
889
|
hull = convex_hull(points, len(points))
|
886
890
|
hull_vertices = []
|
887
891
|
for p in hull:
|
@@ -1031,7 +1035,7 @@ class Wire(Topology):
|
|
1031
1035
|
return edges
|
1032
1036
|
|
1033
1037
|
@staticmethod
|
1034
|
-
def Einstein(origin= None, radius: float = 0.5, direction: list = [0, 0, 1], placement: str = "center"):
|
1038
|
+
def Einstein(origin= None, radius: float = 0.5, direction: list = [0, 0, 1], placement: str = "center", mantissa: int = 6):
|
1035
1039
|
"""
|
1036
1040
|
Creates an aperiodic monotile, also called an 'einstein' tile (meaning one tile in German, not the name of the famous physist). See https://arxiv.org/abs/2303.10798
|
1037
1041
|
|
@@ -1045,11 +1049,18 @@ class Wire(Topology):
|
|
1045
1049
|
The vector representing the up direction of the ellipse. The default is [0, 0, 1].
|
1046
1050
|
placement : str , optional
|
1047
1051
|
The description of the placement of the origin of the hexagon determining the location of the tile. This can be "center", or "lowerleft". It is case insensitive. The default is "center".
|
1048
|
-
|
1052
|
+
mantissa : int , optional
|
1053
|
+
The desired length of the mantissa. The default is 6.
|
1054
|
+
Returns
|
1055
|
+
-------
|
1056
|
+
topologic_core.Wire
|
1057
|
+
The created wire.
|
1058
|
+
|
1049
1059
|
"""
|
1050
1060
|
from topologicpy.Vertex import Vertex
|
1051
1061
|
from topologicpy.Topology import Topology
|
1052
1062
|
import math
|
1063
|
+
|
1053
1064
|
def cos(angle):
|
1054
1065
|
return math.cos(math.radians(angle))
|
1055
1066
|
def sin(angle):
|
@@ -1074,9 +1085,9 @@ class Wire(Topology):
|
|
1074
1085
|
|
1075
1086
|
if placement.lower() == "lowerleft":
|
1076
1087
|
einstein = Topology.Translate(einstein, radius, d, 0)
|
1077
|
-
dx = Vertex.X(origin)
|
1078
|
-
dy = Vertex.Y(origin)
|
1079
|
-
dz = Vertex.Z(origin)
|
1088
|
+
dx = Vertex.X(origin, mantissa=mantissa)
|
1089
|
+
dy = Vertex.Y(origin, mantissa=mantissa)
|
1090
|
+
dz = Vertex.Z(origin, mantissa=mantissa)
|
1080
1091
|
einstein = Topology.Translate(einstein, dx, dy, dz)
|
1081
1092
|
if direction != [0, 0, 1]:
|
1082
1093
|
einstein = Topology.Orient(einstein, origin=origin, dirA=[0, 0, 1], dirB=direction)
|
topologicpy/version.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = '0.7.
|
1
|
+
__version__ = '0.7.8'
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: topologicpy
|
3
|
-
Version: 0.7.
|
3
|
+
Version: 0.7.8
|
4
4
|
Summary: An Advanced Spatial Modelling and Analysis Software Library for Architecture, Engineering, and Construction.
|
5
5
|
Author-email: Wassim Jabi <wassim.jabi@gmail.com>
|
6
6
|
License: GNU AFFERO GENERAL PUBLIC LICENSE
|
@@ -0,0 +1,33 @@
|
|
1
|
+
topologicpy/Aperture.py,sha256=p9pUzTQSBWoUaDiug1V1R1hnEIEwYSXFg2t7iRAmNRY,2723
|
2
|
+
topologicpy/Cell.py,sha256=vaOq9wpkrsfOuLiGnrWFsJAmqNXkIsRnsEtvsDutZjQ,98858
|
3
|
+
topologicpy/CellComplex.py,sha256=TcvDtN_ma66lMTpTyM-mRxoEhX9dS71Vei9eVvaPrkk,46679
|
4
|
+
topologicpy/Cluster.py,sha256=HvomWm_V4bx76YMxqOEhAUrsvcU6z5e_zry6WxMuV2M,54819
|
5
|
+
topologicpy/Color.py,sha256=UlmRcCSOhqcM_OyMWz4t3Kr75KcgXDhz3uctAJ2n7Ic,18031
|
6
|
+
topologicpy/Context.py,sha256=ppApYKngZZCQBFWaxIMi2z2dokY23c935IDCBosxDAE,3055
|
7
|
+
topologicpy/DGL.py,sha256=RpkLnAzjg6arY7cEMs2pDFYzRdkerVg1Wbm9hcE3QaM,138991
|
8
|
+
topologicpy/Dictionary.py,sha256=pMbfE2RYGCNpVr2x58qiHRc-aBWnp1jLlyzwS9nz6-w,25891
|
9
|
+
topologicpy/Edge.py,sha256=KCQm9QfwjsYO4yKE4p4elpha9c4MY6EWAEaK_6mTAjo,52239
|
10
|
+
topologicpy/EnergyModel.py,sha256=ni0H1JgvLl1-q90yK9Sm1qj5P1fTuidlimEIcwuj6qE,53287
|
11
|
+
topologicpy/Face.py,sha256=uPVVFF6CLzEW2JaTllQJp7nBsS2w3wAz7qwfujWTQAk,97474
|
12
|
+
topologicpy/Graph.py,sha256=51VViKQaYIuaMOoU3SQtzi7LJ6yisloY7wU-Ypj1gJo,380319
|
13
|
+
topologicpy/Grid.py,sha256=2uDFDxg4NqROC-7bNi1BjK5Uz__BPH13afJ-VDBRW0M,18466
|
14
|
+
topologicpy/Helper.py,sha256=07V9IFu5ilMpvAdZVhIbdBOjBJSRTtJ0BfR1IoRaRXU,17743
|
15
|
+
topologicpy/Honeybee.py,sha256=dlr5OEH93q51ZmEgvi8PXGfCHBDAjIZ1cm38Rft1Bz4,20235
|
16
|
+
topologicpy/Matrix.py,sha256=VV-kbT0Qt5QO38HRFJmD4IMnQUzYbLjBF4xaFAqLh3Q,8352
|
17
|
+
topologicpy/Neo4j.py,sha256=hNtKWzjb8dQvV2MARDyqW7OInn2LWNiVaA5JmcJl9RM,19569
|
18
|
+
topologicpy/Plotly.py,sha256=IYyUIlLYn8YrjPnxXo4SkRzyrI3hVM9dtMZyA3KfWJ8,98845
|
19
|
+
topologicpy/Polyskel.py,sha256=MYHKFOQBlUNqoUhAdOcKRIHpSk0dWWVrZgXK34NkvFM,15936
|
20
|
+
topologicpy/Shell.py,sha256=uPf5Ch8wQ-pbKvXMY_DV9tPXyz4BPmofFVYdIzbWFh4,76960
|
21
|
+
topologicpy/Speckle.py,sha256=rUS6PCaxIjEF5_fUruxvMH47FMKg-ohcoU0qAUb-yNM,14267
|
22
|
+
topologicpy/Sun.py,sha256=3tYb8kssU882lE1gEWg2mxDvCCY_LAVElkyUT6wa-ZU,36935
|
23
|
+
topologicpy/Topology.py,sha256=SymcisEpNIuqpKiBoz7zJrLtS_28R5GDbG-SiwJOirY,308743
|
24
|
+
topologicpy/Vector.py,sha256=2OXmty9CKZZzfsg5T4ckml-lPUUvgDvqokcKDsZVN9Y,29806
|
25
|
+
topologicpy/Vertex.py,sha256=WjQZf-r8h_Cjwkt_qNN483FCUql20fbv72Ymiq7ZYtw,67462
|
26
|
+
topologicpy/Wire.py,sha256=efqePp91BvAdj4JitSW_f-xeGoTFg_AxP5g5pmbBVFw,139047
|
27
|
+
topologicpy/__init__.py,sha256=D7ky87CAQMiS2KE6YLvcTLkTgA2PY7rASe6Z23pjp9k,872
|
28
|
+
topologicpy/version.py,sha256=a7wkX95rB7MKSi7_39xJlxtx2D_-UcZRwY8dnpzjx6w,22
|
29
|
+
topologicpy-0.7.8.dist-info/LICENSE,sha256=TfPDBt3ar0uv_f9cqCDMZ5rIzW3CY8anRRd4PkL6ejs,34522
|
30
|
+
topologicpy-0.7.8.dist-info/METADATA,sha256=5ElQumbM_dp9q0pHrGBTf585bMtBm5yQ8Is1dCFKnuE,46950
|
31
|
+
topologicpy-0.7.8.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
32
|
+
topologicpy-0.7.8.dist-info/top_level.txt,sha256=J30bDzW92Ob7hw3zA8V34Jlp-vvsfIkGzkr8sqvb4Uw,12
|
33
|
+
topologicpy-0.7.8.dist-info/RECORD,,
|
@@ -1,33 +0,0 @@
|
|
1
|
-
topologicpy/Aperture.py,sha256=p9pUzTQSBWoUaDiug1V1R1hnEIEwYSXFg2t7iRAmNRY,2723
|
2
|
-
topologicpy/Cell.py,sha256=MeVDLetCH3ow0QnY94JpRLe8xhXL9nFXsv5_m6uk8qM,96684
|
3
|
-
topologicpy/CellComplex.py,sha256=6BdCjiE3R4Gcm2K04eBzKyP-2ZeABfw4iUgNEuFQjAI,46352
|
4
|
-
topologicpy/Cluster.py,sha256=HvomWm_V4bx76YMxqOEhAUrsvcU6z5e_zry6WxMuV2M,54819
|
5
|
-
topologicpy/Color.py,sha256=UlmRcCSOhqcM_OyMWz4t3Kr75KcgXDhz3uctAJ2n7Ic,18031
|
6
|
-
topologicpy/Context.py,sha256=ppApYKngZZCQBFWaxIMi2z2dokY23c935IDCBosxDAE,3055
|
7
|
-
topologicpy/DGL.py,sha256=RpkLnAzjg6arY7cEMs2pDFYzRdkerVg1Wbm9hcE3QaM,138991
|
8
|
-
topologicpy/Dictionary.py,sha256=pMbfE2RYGCNpVr2x58qiHRc-aBWnp1jLlyzwS9nz6-w,25891
|
9
|
-
topologicpy/Edge.py,sha256=jbJHyPHlLF94RkUKL479B4dPC202K0Xd7bQsPcFwoHc,51296
|
10
|
-
topologicpy/EnergyModel.py,sha256=UBLim01lZLikVQmJAHEeja-KvF4tgzTxsSxwNDaezz4,52500
|
11
|
-
topologicpy/Face.py,sha256=clf0qf8c0SnzOUOHw11Z4e_Y4ovhRmSOGmPd5_50Fa8,97195
|
12
|
-
topologicpy/Graph.py,sha256=GsWySXL-cTd7bl-QWpl3Aw9Hr0KyACzIa4iRenTB63s,368030
|
13
|
-
topologicpy/Grid.py,sha256=XM0iQtQbMQoYHf7S0ppSe-dxy93Y9VpI_vUkElWqnYA,17050
|
14
|
-
topologicpy/Helper.py,sha256=07V9IFu5ilMpvAdZVhIbdBOjBJSRTtJ0BfR1IoRaRXU,17743
|
15
|
-
topologicpy/Honeybee.py,sha256=C0_Ity1CKGZwgOBh_iRypObF2ApQ7nAD5oAEIUGGnvU,19914
|
16
|
-
topologicpy/Matrix.py,sha256=VV-kbT0Qt5QO38HRFJmD4IMnQUzYbLjBF4xaFAqLh3Q,8352
|
17
|
-
topologicpy/Neo4j.py,sha256=Voj-0xnVJtYPzAPyL05YPb6ynX_2UQx9cyHTrI4r1hE,18860
|
18
|
-
topologicpy/Plotly.py,sha256=WK4mtBFEWP_MTl_Dm4K_zNmgTO0PixUWWRB1278vZsw,99569
|
19
|
-
topologicpy/Polyskel.py,sha256=MYHKFOQBlUNqoUhAdOcKRIHpSk0dWWVrZgXK34NkvFM,15936
|
20
|
-
topologicpy/Shell.py,sha256=6hidTQ6MW5q_es-WbTeI_yt7Sd7BMxWU_qfoherVZhE,74343
|
21
|
-
topologicpy/Speckle.py,sha256=rUS6PCaxIjEF5_fUruxvMH47FMKg-ohcoU0qAUb-yNM,14267
|
22
|
-
topologicpy/Sun.py,sha256=3tYb8kssU882lE1gEWg2mxDvCCY_LAVElkyUT6wa-ZU,36935
|
23
|
-
topologicpy/Topology.py,sha256=VShlTik3ggY4Ch4649p3SGZ8UyXIsQ7t3KQO7bjRN8A,305176
|
24
|
-
topologicpy/Vector.py,sha256=FHbrCb9GVLOUV_kqcplh4D88CVxlID6qX_wEQOw4rD0,29565
|
25
|
-
topologicpy/Vertex.py,sha256=YgbbCcqABvb97z2-yEytpp5T3yoZPlQplR_vMQkQ9OA,65180
|
26
|
-
topologicpy/Wire.py,sha256=MUEboxo11kMgwnZySSkwiyzBG2wv0wPiinf2cW4UVv8,138424
|
27
|
-
topologicpy/__init__.py,sha256=D7ky87CAQMiS2KE6YLvcTLkTgA2PY7rASe6Z23pjp9k,872
|
28
|
-
topologicpy/version.py,sha256=YGgeu1tBDTiiHbKl1TkbKHeb7CjnrObEQKS9Miv1iBU,22
|
29
|
-
topologicpy-0.7.5.dist-info/LICENSE,sha256=TfPDBt3ar0uv_f9cqCDMZ5rIzW3CY8anRRd4PkL6ejs,34522
|
30
|
-
topologicpy-0.7.5.dist-info/METADATA,sha256=pTjF0iR8gLPPQ8E7s7A0-fDMrm5vepTlMF88sjztM2M,46950
|
31
|
-
topologicpy-0.7.5.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
32
|
-
topologicpy-0.7.5.dist-info/top_level.txt,sha256=J30bDzW92Ob7hw3zA8V34Jlp-vvsfIkGzkr8sqvb4Uw,12
|
33
|
-
topologicpy-0.7.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|