topologicpy 0.3.0__py3-none-any.whl → 0.3.2__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/Aperture.py +3 -3
- topologicpy/Cluster.py +24 -6
- topologicpy/Context.py +19 -19
- topologicpy/DGL.py +620 -453
- topologicpy/Edge.py +36 -31
- topologicpy/Face.py +120 -73
- topologicpy/Graph.py +338 -64
- topologicpy/Plotly.py +122 -16
- topologicpy/Topology.py +26 -23
- topologicpy/Vertex.py +35 -22
- topologicpy/Wire.py +114 -44
- topologicpy/__init__.py +1 -1
- {topologicpy-0.3.0.dist-info → topologicpy-0.3.2.dist-info}/METADATA +1 -1
- {topologicpy-0.3.0.dist-info → topologicpy-0.3.2.dist-info}/RECORD +17 -17
- {topologicpy-0.3.0.dist-info → topologicpy-0.3.2.dist-info}/LICENSE +0 -0
- {topologicpy-0.3.0.dist-info → topologicpy-0.3.2.dist-info}/WHEEL +0 -0
- {topologicpy-0.3.0.dist-info → topologicpy-0.3.2.dist-info}/top_level.txt +0 -0
topologicpy/Wire.py
CHANGED
|
@@ -10,7 +10,7 @@ import numpy as np
|
|
|
10
10
|
|
|
11
11
|
class Wire(topologic.Wire):
|
|
12
12
|
@staticmethod
|
|
13
|
-
def BoundingRectangle(topology, optimize=0):
|
|
13
|
+
def BoundingRectangle(topology: topologic.Topology, optimize: int = 0) -> topologic.Wire:
|
|
14
14
|
"""
|
|
15
15
|
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.
|
|
16
16
|
|
|
@@ -132,7 +132,7 @@ class Wire(topologic.Wire):
|
|
|
132
132
|
return boundingRectangle
|
|
133
133
|
|
|
134
134
|
@staticmethod
|
|
135
|
-
def ByEdges(edges):
|
|
135
|
+
def ByEdges(edges: list) -> topologic.Wire:
|
|
136
136
|
"""
|
|
137
137
|
Creates a wire from the input list of edges.
|
|
138
138
|
|
|
@@ -167,7 +167,7 @@ class Wire(topologic.Wire):
|
|
|
167
167
|
return wire
|
|
168
168
|
|
|
169
169
|
@staticmethod
|
|
170
|
-
def ByEdgesCluster(cluster):
|
|
170
|
+
def ByEdgesCluster(cluster: topologic.Cluster) -> topologic.Wire:
|
|
171
171
|
"""
|
|
172
172
|
Creates a wire from the input cluster of edges.
|
|
173
173
|
|
|
@@ -189,7 +189,7 @@ class Wire(topologic.Wire):
|
|
|
189
189
|
return Wire.ByEdges(edges)
|
|
190
190
|
|
|
191
191
|
@staticmethod
|
|
192
|
-
def ByOffset(wire, offset=1.0, miter=False, miterThreshold=None, offsetKey=None, miterThresholdKey=None, step=True):
|
|
192
|
+
def ByOffset(wire: topologic.Wire, offset: float = 1.0, miter: bool = False, miterThreshold: float = None, offsetKey: str = None, miterThresholdKey: str = None, step: bool = True) -> topologic.Wire:
|
|
193
193
|
"""
|
|
194
194
|
Creates an offset wire from the input wire.
|
|
195
195
|
|
|
@@ -297,8 +297,6 @@ class Wire(topologic.Wire):
|
|
|
297
297
|
intV = Edge.Intersect2D(tempEdge1,tempEdge2)
|
|
298
298
|
newVertices.append(intV)
|
|
299
299
|
dupVertices.append(vertices[0])
|
|
300
|
-
|
|
301
|
-
|
|
302
300
|
else:
|
|
303
301
|
newVertices.append(Edge.StartVertex(newEdges[0]))
|
|
304
302
|
|
|
@@ -395,7 +393,7 @@ class Wire(topologic.Wire):
|
|
|
395
393
|
return newWire
|
|
396
394
|
|
|
397
395
|
@staticmethod
|
|
398
|
-
def ByVertices(vertices, close=True):
|
|
396
|
+
def ByVertices(vertices: list, close: bool = True) -> topologic.Wire:
|
|
399
397
|
"""
|
|
400
398
|
Creates a wire from the input list of vertices.
|
|
401
399
|
|
|
@@ -444,7 +442,7 @@ class Wire(topologic.Wire):
|
|
|
444
442
|
return Cluster.SelfMerge(c)
|
|
445
443
|
|
|
446
444
|
@staticmethod
|
|
447
|
-
def ByVerticesCluster(cluster, close=True):
|
|
445
|
+
def ByVerticesCluster(cluster: topologic.Cluster, close: bool = True) -> topologic.Wire:
|
|
448
446
|
"""
|
|
449
447
|
Creates a wire from the input cluster of vertices.
|
|
450
448
|
|
|
@@ -468,7 +466,7 @@ class Wire(topologic.Wire):
|
|
|
468
466
|
return Wire.ByVertices(vertices, close)
|
|
469
467
|
|
|
470
468
|
@staticmethod
|
|
471
|
-
def Circle(origin=None, radius=0.5, sides=16, fromAngle=0, toAngle=360, close=True, direction=[0,0,1], placement="center", tolerance=0.0001):
|
|
469
|
+
def Circle(origin: topologic.Vertex = 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) -> topologic.Wire:
|
|
472
470
|
"""
|
|
473
471
|
Creates a circle.
|
|
474
472
|
|
|
@@ -553,9 +551,8 @@ class Wire(topologic.Wire):
|
|
|
553
551
|
baseWire = topologic.TopologyUtility.Rotate(baseWire, origin, 0, 0, 1, phi)
|
|
554
552
|
return baseWire
|
|
555
553
|
|
|
556
|
-
|
|
557
554
|
@staticmethod
|
|
558
|
-
def Cycles(wire, maxVertices=4, tolerance=0.0001):
|
|
555
|
+
def Cycles(wire: topologic.Wire, maxVertices: int = 4, tolerance: float = 0.0001) -> list:
|
|
559
556
|
"""
|
|
560
557
|
Returns the closed circuits of wires found within the input wire.
|
|
561
558
|
|
|
@@ -671,7 +668,7 @@ class Wire(topologic.Wire):
|
|
|
671
668
|
return resultWires
|
|
672
669
|
|
|
673
670
|
@staticmethod
|
|
674
|
-
def Edges(wire):
|
|
671
|
+
def Edges(wire: topologic.Wire) -> list:
|
|
675
672
|
"""
|
|
676
673
|
Returns the edges of the input wire.
|
|
677
674
|
|
|
@@ -693,7 +690,59 @@ class Wire(topologic.Wire):
|
|
|
693
690
|
return edges
|
|
694
691
|
|
|
695
692
|
@staticmethod
|
|
696
|
-
def
|
|
693
|
+
def Einstein(origin: topologic.Vertex = None, radius: float = 0.5, direction: list = [0,0,1], placement: str = "center") -> topologic.Wire:
|
|
694
|
+
"""
|
|
695
|
+
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
|
|
696
|
+
|
|
697
|
+
Parameters
|
|
698
|
+
----------
|
|
699
|
+
origin : topologic.Vertex , optional
|
|
700
|
+
The location of the origin of the tile. The default is None which results in the tiles first vertex being placed at (0,0,0).
|
|
701
|
+
radius : float , optional
|
|
702
|
+
The radius of the hexagon determining the size of the tile. The default is 0.5.
|
|
703
|
+
direction : list , optional
|
|
704
|
+
The vector representing the up direction of the ellipse. The default is [0,0,1].
|
|
705
|
+
placement : str , optional
|
|
706
|
+
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".
|
|
707
|
+
|
|
708
|
+
"""
|
|
709
|
+
from topologicpy.Vertex import Vertex
|
|
710
|
+
from topologicpy.Topology import Topology
|
|
711
|
+
import math
|
|
712
|
+
def cos(angle):
|
|
713
|
+
return math.cos(math.radians(angle))
|
|
714
|
+
def sin(angle):
|
|
715
|
+
return math.sin(math.radians(angle))
|
|
716
|
+
if not origin:
|
|
717
|
+
origin = Vertex.ByCoordinates(0,0,0)
|
|
718
|
+
d = cos(30)*radius
|
|
719
|
+
v1 = Vertex.ByCoordinates(0,0,0)
|
|
720
|
+
v2 = Vertex.ByCoordinates(cos(30)*d, sin(30)*d, 0)
|
|
721
|
+
v3 = Vertex.ByCoordinates(radius, 0)
|
|
722
|
+
v4 = Vertex.ByCoordinates(2*radius, 0)
|
|
723
|
+
v5 = Vertex.ByCoordinates(2*radius+cos(60)*radius*0.5, sin(30)*d, 0)
|
|
724
|
+
v6 = Vertex.ByCoordinates(1.5*radius, d)
|
|
725
|
+
v7 = Vertex.ByCoordinates(1.5*radius, 2*d)
|
|
726
|
+
v8 = Vertex.ByCoordinates(radius, 2*d)
|
|
727
|
+
v9 = Vertex.ByCoordinates(radius-cos(60)*0.5*radius, 2*d+sin(60)*0.5*radius)
|
|
728
|
+
v10 = Vertex.ByCoordinates(0, 2*d)
|
|
729
|
+
v11 = Vertex.ByCoordinates(0, d)
|
|
730
|
+
v12 = Vertex.ByCoordinates(-radius*0.5, d)
|
|
731
|
+
v13 = Vertex.ByCoordinates(-cos(30)*d, sin(30)*d, 0)
|
|
732
|
+
einstein = Wire.ByVertices([v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13], close=True)
|
|
733
|
+
|
|
734
|
+
if placement.lower() == "lowerleft":
|
|
735
|
+
einstein = Topology.Translate(einstein, radius, d, 0)
|
|
736
|
+
dx = Vertex.X(origin)
|
|
737
|
+
dy = Vertex.Y(origin)
|
|
738
|
+
dz = Vertex.Z(origin)
|
|
739
|
+
einstein = Topology.Translate(einstein, dx, dy, dz)
|
|
740
|
+
if direction != [0,0,1]:
|
|
741
|
+
einstein = Topology.Orient(einstein, origin=origin, dirA=[0,0,1], dirB=direction)
|
|
742
|
+
return einstein
|
|
743
|
+
|
|
744
|
+
@staticmethod
|
|
745
|
+
def Ellipse(origin: topologic.Vertex = None, inputMode: int = 1, width: float = 2.0, length: float = 1.0, focalLength: float = 0.866025, eccentricity: float = 0.866025, majorAxisLength: float = 1.0, minorAxisLength: float = 0.5, sides: float = 32, fromAngle: float = 0.0, toAngle: float = 360.0, close: bool = True, direction: list = [0,0,1], placement: str = "center", tolerance: float = 0.0001) -> topologic.Wire:
|
|
697
746
|
"""
|
|
698
747
|
Creates an ellipse and returns all its geometry and parameters.
|
|
699
748
|
|
|
@@ -745,7 +794,7 @@ class Wire(topologic.Wire):
|
|
|
745
794
|
return ellipseAll["ellipse"]
|
|
746
795
|
|
|
747
796
|
@staticmethod
|
|
748
|
-
def EllipseAll(origin=None, inputMode=1, width=2.0, length=1.0, focalLength= 0.866025, eccentricity=0.866025, majorAxisLength=1.0, minorAxisLength=0.5, sides=32, fromAngle=0, toAngle=360, close=True, direction=[0,0,1], placement="center", tolerance=0.0001):
|
|
797
|
+
def EllipseAll(origin: topologic.Vertex = None, inputMode: int = 1, width: float = 2.0, length: float = 1.0, focalLength: float = 0.866025, eccentricity: float = 0.866025, majorAxisLength: float = 1.0, minorAxisLength: float = 0.5, sides: int = 32, fromAngle: float = 0.0, toAngle: float = 360.0, close: bool = True, direction: list = [0,0,1], placement: str ="center", tolerance: float = 0.0001) -> topologic.Wire:
|
|
749
798
|
"""
|
|
750
799
|
Creates an ellipse and returns all its geometry and parameters.
|
|
751
800
|
|
|
@@ -914,7 +963,7 @@ class Wire(topologic.Wire):
|
|
|
914
963
|
return d
|
|
915
964
|
|
|
916
965
|
@staticmethod
|
|
917
|
-
def Flatten(wire, oldLocation=None, newLocation=None, direction=None):
|
|
966
|
+
def Flatten(wire: topologic.Wire, oldLocation: topologic.Vertex =None, newLocation: topologic.Vertex = None, direction: list = None):
|
|
918
967
|
"""
|
|
919
968
|
Flattens the input wire such that its center of mass is located at the origin and the specified direction is pointed in the positive Z axis.
|
|
920
969
|
|
|
@@ -986,7 +1035,7 @@ class Wire(topologic.Wire):
|
|
|
986
1035
|
return flatWire
|
|
987
1036
|
|
|
988
1037
|
@staticmethod
|
|
989
|
-
def Interpolate(wires: list, n: int = 5, outputType: str = "default", replication: str = "default"):
|
|
1038
|
+
def Interpolate(wires: list, n: int = 5, outputType: str = "default", replication: str = "default") -> topologic.Topology:
|
|
990
1039
|
"""
|
|
991
1040
|
Creates *n* number of wires that interpolate between wireA and wireB.
|
|
992
1041
|
|
|
@@ -1109,7 +1158,7 @@ class Wire(topologic.Wire):
|
|
|
1109
1158
|
return Topology.SelfMerge(Cluster.ByTopologies(finalWires+ridges))
|
|
1110
1159
|
|
|
1111
1160
|
@staticmethod
|
|
1112
|
-
def Invert(wire):
|
|
1161
|
+
def Invert(wire: topologic.Wire) -> topologic.Wire:
|
|
1113
1162
|
"""
|
|
1114
1163
|
Creates a wire that is an inverse (mirror) of the input wire.
|
|
1115
1164
|
|
|
@@ -1131,7 +1180,7 @@ class Wire(topologic.Wire):
|
|
|
1131
1180
|
return Wire.ByVertices(reversed_vertices)
|
|
1132
1181
|
|
|
1133
1182
|
@staticmethod
|
|
1134
|
-
def IsClosed(wire):
|
|
1183
|
+
def IsClosed(wire: topologic.Wire) -> bool:
|
|
1135
1184
|
"""
|
|
1136
1185
|
Returns True if the input wire is closed. Returns False otherwise.
|
|
1137
1186
|
|
|
@@ -1153,7 +1202,7 @@ class Wire(topologic.Wire):
|
|
|
1153
1202
|
return status
|
|
1154
1203
|
|
|
1155
1204
|
@staticmethod
|
|
1156
|
-
def IsInside(wire, vertex, tolerance=0.0001):
|
|
1205
|
+
def IsInside(wire: topologic.Wire, vertex: topologic.Vertex, tolerance: float = 0.0001) -> bool:
|
|
1157
1206
|
"""
|
|
1158
1207
|
Returns True if the input vertex is inside the input wire. Returns False otherwise.
|
|
1159
1208
|
|
|
@@ -1187,16 +1236,16 @@ class Wire(topologic.Wire):
|
|
|
1187
1236
|
return False
|
|
1188
1237
|
|
|
1189
1238
|
@staticmethod
|
|
1190
|
-
def Isovist(
|
|
1239
|
+
def Isovist(wire: topologic.Wire, viewPoint: topologic.Vertex, obstaclesCluster: topologic.Cluster, tolerance: float = 0.0001) -> list:
|
|
1191
1240
|
"""
|
|
1192
1241
|
Returns a list of faces representing the isovist projection from the input viewpoint.
|
|
1193
1242
|
|
|
1194
1243
|
Parameters
|
|
1195
1244
|
----------
|
|
1245
|
+
wire : topologic.Wire
|
|
1246
|
+
The wire representing the external boundary (border) of the isovist.
|
|
1196
1247
|
viewPoint : topologic.Vertex
|
|
1197
1248
|
The vertex representing the location of the viewpoint of the isovist.
|
|
1198
|
-
externalBoundary : topologic.Wire
|
|
1199
|
-
The wire representing the external boundary (border) of the isovist.
|
|
1200
1249
|
obstaclesCluster : topologic.Cluster
|
|
1201
1250
|
A cluster of wires representing the obstacles within the externalBoundary.
|
|
1202
1251
|
|
|
@@ -1220,13 +1269,13 @@ class Wire(topologic.Wire):
|
|
|
1220
1269
|
internalVertices = []
|
|
1221
1270
|
_ = obstaclesCluster.Vertices(None, internalVertices)
|
|
1222
1271
|
# 1. Create a Face with external and internal boundaries
|
|
1223
|
-
face = topologic.Face.ByExternalInternalBoundaries(
|
|
1272
|
+
face = topologic.Face.ByExternalInternalBoundaries(wire, internalBoundaries, False)
|
|
1224
1273
|
# 2. Draw Rays from viewpoint through each Vertex of the obstacles extending to the External Boundary
|
|
1225
1274
|
# 2.1 Get the Edges and Vertices of the External Boundary
|
|
1226
1275
|
exBoundaryEdges = []
|
|
1227
|
-
_ =
|
|
1276
|
+
_ = wire.Edges(None, exBoundaryEdges)
|
|
1228
1277
|
exBoundaryVertices = []
|
|
1229
|
-
_ =
|
|
1278
|
+
_ = wire.Vertices(None, exBoundaryVertices)
|
|
1230
1279
|
testTopologies = exBoundaryEdges+exBoundaryVertices
|
|
1231
1280
|
# 1.2 Find the maximum distance from the viewpoint to the edges and vertices of the external boundary
|
|
1232
1281
|
distances = []
|
|
@@ -1242,7 +1291,7 @@ class Wire(topologic.Wire):
|
|
|
1242
1291
|
newV = topologic.TopologyUtility.Scale(aVertex, viewPoint, scaleFactor, scaleFactor, scaleFactor)
|
|
1243
1292
|
try:
|
|
1244
1293
|
ray = topologic.Edge.ByStartVertexEndVertex(viewPoint, newV)
|
|
1245
|
-
topologyC = ray.Intersect(
|
|
1294
|
+
topologyC = ray.Intersect(wire, False)
|
|
1246
1295
|
vertices = []
|
|
1247
1296
|
_ = topologyC.Vertices(None, vertices)
|
|
1248
1297
|
if topologyC:
|
|
@@ -1293,9 +1342,8 @@ class Wire(topologic.Wire):
|
|
|
1293
1342
|
finalFaces.append(aFace)
|
|
1294
1343
|
return finalFaces
|
|
1295
1344
|
|
|
1296
|
-
|
|
1297
1345
|
@staticmethod
|
|
1298
|
-
def IsSimilar(wireA, wireB,
|
|
1346
|
+
def IsSimilar(wireA: topologic.Wire, wireB: topologic.Wire, angTolerance: float = 0.1, tolerance: float = 0.0001) -> bool:
|
|
1299
1347
|
"""
|
|
1300
1348
|
Returns True if the input wires are similar. Returns False otherwise. The wires must be closed.
|
|
1301
1349
|
|
|
@@ -1305,10 +1353,10 @@ class Wire(topologic.Wire):
|
|
|
1305
1353
|
The first input wire.
|
|
1306
1354
|
wireB : topologic.Wire
|
|
1307
1355
|
The second input wire.
|
|
1308
|
-
tolerance : float , optional
|
|
1309
|
-
The desired tolerance. The default is 0.0001.
|
|
1310
1356
|
angTolerance : float , optional
|
|
1311
1357
|
The desired angular tolerance. The default is 0.1.
|
|
1358
|
+
tolerance : float , optional
|
|
1359
|
+
The desired tolerance. The default is 0.0001.
|
|
1312
1360
|
|
|
1313
1361
|
Returns
|
|
1314
1362
|
-------
|
|
@@ -1393,9 +1441,8 @@ class Wire(topologic.Wire):
|
|
|
1393
1441
|
return True
|
|
1394
1442
|
return False
|
|
1395
1443
|
|
|
1396
|
-
|
|
1397
1444
|
@staticmethod
|
|
1398
|
-
def Length(wire, mantissa=4):
|
|
1445
|
+
def Length(wire: topologic.Wire, mantissa: int = 4) -> float:
|
|
1399
1446
|
"""
|
|
1400
1447
|
Returns the length of the input wire.
|
|
1401
1448
|
|
|
@@ -1429,7 +1476,7 @@ class Wire(topologic.Wire):
|
|
|
1429
1476
|
return totalLength
|
|
1430
1477
|
|
|
1431
1478
|
@staticmethod
|
|
1432
|
-
def Planarize(wire):
|
|
1479
|
+
def Planarize(wire: topologic.Wire) -> topologic.Wire:
|
|
1433
1480
|
"""
|
|
1434
1481
|
Returns a planarized version of the input wire.
|
|
1435
1482
|
|
|
@@ -1462,7 +1509,7 @@ class Wire(topologic.Wire):
|
|
|
1462
1509
|
return Wire.ByVertices(proj_verts, close=True)
|
|
1463
1510
|
|
|
1464
1511
|
@staticmethod
|
|
1465
|
-
def Project(wire, face, direction=None, mantissa=4
|
|
1512
|
+
def Project(wire: topologic.Wire, face: topologic.Face, direction: list = None, mantissa: int = 4) -> topologic.Wire:
|
|
1466
1513
|
"""
|
|
1467
1514
|
Creates a projection of the input wire unto the input face.
|
|
1468
1515
|
|
|
@@ -1523,7 +1570,7 @@ class Wire(topologic.Wire):
|
|
|
1523
1570
|
return w
|
|
1524
1571
|
|
|
1525
1572
|
@staticmethod
|
|
1526
|
-
def Rectangle(origin=None, width=1.0, length=1.0, direction=[0,0,1], placement="center", tolerance=0.0001):
|
|
1573
|
+
def Rectangle(origin: topologic.Vertex = None, width: float = 1.0, length: float = 1.0, direction: list = [0,0,1], placement: str = "center", tolerance: float = 0.0001) -> topologic.Wire:
|
|
1527
1574
|
"""
|
|
1528
1575
|
Creates a rectangle.
|
|
1529
1576
|
|
|
@@ -1536,7 +1583,7 @@ class Wire(topologic.Wire):
|
|
|
1536
1583
|
length : float , optional
|
|
1537
1584
|
The length of the rectangle. The default is 1.0.
|
|
1538
1585
|
direction : list , optional
|
|
1539
|
-
The
|
|
1586
|
+
The vector representing the up direction of the rectangle. The default is [0,0,1].
|
|
1540
1587
|
placement : str , optional
|
|
1541
1588
|
The description of the placement of the origin of the rectangle. This can be "center", or "lowerleft". It is case insensitive. The default is "center".
|
|
1542
1589
|
tolerance : float , optional
|
|
@@ -1594,7 +1641,7 @@ class Wire(topologic.Wire):
|
|
|
1594
1641
|
return baseWire
|
|
1595
1642
|
|
|
1596
1643
|
@staticmethod
|
|
1597
|
-
def RemoveCollinearEdges(wire, angTolerance=0.1):
|
|
1644
|
+
def RemoveCollinearEdges(wire: topologic.Wire, angTolerance: float = 0.1) -> topologic.Wire:
|
|
1598
1645
|
"""
|
|
1599
1646
|
Removes any collinear edges in the input wire.
|
|
1600
1647
|
|
|
@@ -1670,9 +1717,8 @@ class Wire(topologic.Wire):
|
|
|
1670
1717
|
else:
|
|
1671
1718
|
return None
|
|
1672
1719
|
|
|
1673
|
-
|
|
1674
1720
|
@staticmethod
|
|
1675
|
-
def Split(wire):
|
|
1721
|
+
def Split(wire: topologic.Wire) -> list:
|
|
1676
1722
|
"""
|
|
1677
1723
|
Splits the input wire into segments at its intersections (i.e. at any vertex where more than two edges meet).
|
|
1678
1724
|
|
|
@@ -1749,9 +1795,34 @@ class Wire(topologic.Wire):
|
|
|
1749
1795
|
return [wire]
|
|
1750
1796
|
return wires
|
|
1751
1797
|
|
|
1798
|
+
@staticmethod
|
|
1799
|
+
def Square(origin: topologic.Vertex = None, size: float = 1.0, direction: list = [0,0,1], placement: str = "center", tolerance: float = 0.0001) -> topologic.Wire:
|
|
1800
|
+
"""
|
|
1801
|
+
Creates a square.
|
|
1802
|
+
|
|
1803
|
+
Parameters
|
|
1804
|
+
----------
|
|
1805
|
+
origin : topologic.Vertex , optional
|
|
1806
|
+
The location of the origin of the square. The default is None which results in the square being placed at (0,0,0).
|
|
1807
|
+
size : float , optional
|
|
1808
|
+
The size of the square. The default is 1.0.
|
|
1809
|
+
direction : list , optional
|
|
1810
|
+
The vector representing the up direction of the square. The default is [0,0,1].
|
|
1811
|
+
placement : str , optional
|
|
1812
|
+
The description of the placement of the origin of the square. This can be "center", or "lowerleft". It is case insensitive. The default is "center".
|
|
1813
|
+
tolerance : float , optional
|
|
1814
|
+
The desired tolerance. The default is 0.0001.
|
|
1815
|
+
|
|
1816
|
+
Returns
|
|
1817
|
+
-------
|
|
1818
|
+
topologic.Wire
|
|
1819
|
+
The created square.
|
|
1820
|
+
|
|
1821
|
+
"""
|
|
1822
|
+
return Wire.Rectangle(origin = origin, width = size, length = size, direction = direction, placement = placement, tolerance = tolerance)
|
|
1752
1823
|
|
|
1753
1824
|
@staticmethod
|
|
1754
|
-
def Star(origin=None, radiusA=1.0, radiusB=0.4, rays=5, direction=[0,0,1], placement="center", tolerance=0.0001):
|
|
1825
|
+
def Star(origin: topologic.Wire = None, radiusA: float = 1.0, radiusB: float = 0.4, rays: int = 5, direction: list = [0,0,1], placement: str = "center", tolerance: float = 0.0001) -> topologic.Wire:
|
|
1755
1826
|
"""
|
|
1756
1827
|
Creates a star.
|
|
1757
1828
|
|
|
@@ -1843,9 +1914,8 @@ class Wire(topologic.Wire):
|
|
|
1843
1914
|
baseWire = topologic.TopologyUtility.Rotate(baseWire, origin, 0, 0, 1, phi)
|
|
1844
1915
|
return baseWire
|
|
1845
1916
|
|
|
1846
|
-
|
|
1847
1917
|
@staticmethod
|
|
1848
|
-
def Trapezoid(origin=None, widthA=1.0, widthB=0.75, offsetA=0.0, offsetB=0.0, length=1.0, direction=[0,0,1], placement="center", tolerance=0.0001):
|
|
1918
|
+
def Trapezoid(origin: topologic.Vertex = None, widthA: float = 1.0, widthB: float = 0.75, offsetA: float = 0.0, offsetB: float = 0.0, length: float = 1.0, direction: list = [0,0,1], placement: str = "center", tolerance: float = 0.0001) -> topologic.Wire:
|
|
1849
1919
|
"""
|
|
1850
1920
|
Creates a trapezoid.
|
|
1851
1921
|
|
|
@@ -1922,9 +1992,9 @@ class Wire(topologic.Wire):
|
|
|
1922
1992
|
return baseWire
|
|
1923
1993
|
|
|
1924
1994
|
@staticmethod
|
|
1925
|
-
def Vertices(wire):
|
|
1995
|
+
def Vertices(wire: topologic.Wire) -> list:
|
|
1926
1996
|
"""
|
|
1927
|
-
Returns the vertices of the input wire.
|
|
1997
|
+
Returns the list of vertices of the input wire.
|
|
1928
1998
|
|
|
1929
1999
|
Parameters
|
|
1930
2000
|
----------
|
topologicpy/__init__.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: topologicpy
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
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
|
Project-URL: Homepage, https://github.com/wassimj/TopologicPy
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
topologicpy/Aperture.py,sha256=
|
|
1
|
+
topologicpy/Aperture.py,sha256=MOzMGXzVBBS9B0IGmfSFoSVSSsrIy57YIqpRepkrUxY,1240
|
|
2
2
|
topologicpy/Cell.py,sha256=iaenau9JRx6IY50bsKirG_ikmOQ7KMjqSOIpIhAX6Ow,67790
|
|
3
3
|
topologicpy/CellComplex.py,sha256=E_xI9TK2eYUKXk9EVAfXlXPaVO0klH7lumipBdNvLlk,27923
|
|
4
|
-
topologicpy/Cluster.py,sha256=
|
|
4
|
+
topologicpy/Cluster.py,sha256=f58a_gU_JOwBTeDvYH9YoPrcxCMcIChbQuxY5r0Gc-s,19667
|
|
5
5
|
topologicpy/Color.py,sha256=CtzZitCjDIZVeRhb-Zkzcvxzwt2TAaNl_0zDN3mecpw,2672
|
|
6
|
-
topologicpy/Context.py,sha256=
|
|
7
|
-
topologicpy/DGL.py,sha256=
|
|
6
|
+
topologicpy/Context.py,sha256=cPxfxUScXcJVafSTnCTCNpRzBGSbu90D5i6uu26S5us,1643
|
|
7
|
+
topologicpy/DGL.py,sha256=VfzV-GJDLdV--g6ninlvPQprI3SRlAzS21rjHz0UtPc,116268
|
|
8
8
|
topologicpy/Dictionary.py,sha256=SMM0wQPySr1AvUX97AQpn1tca5mkkicRN-sUMSR7c_M,17016
|
|
9
|
-
topologicpy/Edge.py,sha256=
|
|
9
|
+
topologicpy/Edge.py,sha256=kNYI9mtTfrW90tE93wCJnPudH7RS8el4bjepyOEYedo,30560
|
|
10
10
|
topologicpy/EnergyModel.py,sha256=feP0gsLKdQWITAPlD4KqG8TQ6WENEHygz0EO4JUUJKA,37695
|
|
11
|
-
topologicpy/Face.py,sha256=
|
|
12
|
-
topologicpy/Graph.py,sha256=
|
|
11
|
+
topologicpy/Face.py,sha256=4lXWqwiM3wX1FAGGNneFhq-wpYBLQ8sk2kwgvAUsCHw,69589
|
|
12
|
+
topologicpy/Graph.py,sha256=5e95Aiasf93DnDizp0e1z0pZH_izQlv46q-TIOdSQzI,140578
|
|
13
13
|
topologicpy/Graph_Export.py,sha256=SetKzyvHg4IU7dwZC1MiI187CUO3gHhRPsQzEBDldUY,35612
|
|
14
14
|
topologicpy/Grid.py,sha256=rArW8J3vkhWt8dx9NDzCSyu4oMowUpsly7rEhsLPFII,16449
|
|
15
15
|
topologicpy/Helper.py,sha256=51sDsc_bIXa90JKG58yUDl0ocdOmJOtsanS4txMeQiQ,5243
|
|
16
16
|
topologicpy/Honeybee.py,sha256=8KJ49JcpnXjtVb9WTH4Jih6X7shzDHEN8RPJShOR29Y,16467
|
|
17
17
|
topologicpy/Matrix.py,sha256=GHd_o714eEWbTOhRM5X-fXcgsV5yYJJSj6xFdnkwC14,7625
|
|
18
18
|
topologicpy/Neo4jGraph.py,sha256=_5Mqnwx98EWDA_gfGD93SlivdELSXUhcQ7WjqXLVi_I,10771
|
|
19
|
-
topologicpy/Plotly.py,sha256=
|
|
19
|
+
topologicpy/Plotly.py,sha256=cFCGS8q0anHgHfl67Co0Oh_08wvFa-5CB7kriRwAcnA,54659
|
|
20
20
|
topologicpy/Process.py,sha256=YyPYq9HdzIwyEMog7gF_jIBskD_vVWAzTrVS8mcEwOc,53710
|
|
21
21
|
topologicpy/SQL.py,sha256=6pdbdBAkpNi0VbIat996Swna-qQ-Osm31Kq6YCTEOH8,1892
|
|
22
22
|
topologicpy/Shell.py,sha256=2BycUMIs2yFH1NaHdSPBBCJ6AmgREFU5oaLuFJSnfVQ,48548
|
|
23
23
|
topologicpy/Speckle.py,sha256=65IHXjuNhHAusy4kPp70wlPF8QueSPJ-85v6dPc0uo4,11548
|
|
24
|
-
topologicpy/Topology.py,sha256=
|
|
24
|
+
topologicpy/Topology.py,sha256=7bIHm34VvcDjP4sIso1qu91ajkakCec1hw7phUvn8wE,212470
|
|
25
25
|
topologicpy/UnitTest.py,sha256=JBgLkWaJQd4Ee1XSyLVojEbRJKcxj-DbeVSxoeHmiOs,1380
|
|
26
26
|
topologicpy/Vector.py,sha256=ZhtiBYythQmWmRVDGxXI0m5-7S3qUK_G_xxuiKVYjog,14536
|
|
27
|
-
topologicpy/Vertex.py,sha256=
|
|
28
|
-
topologicpy/Wire.py,sha256=
|
|
29
|
-
topologicpy/__init__.py,sha256=
|
|
27
|
+
topologicpy/Vertex.py,sha256=lfWZNRkcDVv1Ezh-SQAlHRXpZGuF3CRPcrNoWDYKTMU,24184
|
|
28
|
+
topologicpy/Wire.py,sha256=BEkuLN5MBFfhHHOEKHFpDo_OgIFTrExUi3jab10XEAs,85469
|
|
29
|
+
topologicpy/__init__.py,sha256=BElOeVO0YNZNGeFRqruhGTAir4UxZ-OwdEWvWRriW9Y,641
|
|
30
30
|
topologicpy/bin/linux/topologic/__init__.py,sha256=qdj8gyp_GtYre27ZdFiVdLzLViOgX62woBZLTy9K91c,58
|
|
31
31
|
topologicpy/bin/linux/topologic/topologic.cpython-310-x86_64-linux-gnu.so,sha256=uvar01STZ8qu1c8fRmtYdVnK8evxBv305QScASXY9go,1852112
|
|
32
32
|
topologicpy/bin/linux/topologic/topologic.cpython-311-x86_64-linux-gnu.so,sha256=42yjVWetFu_qn6-eZcDxgd_A8SQN_wHqkdw91txKt9U,1852112
|
|
@@ -69,8 +69,8 @@ topologicpy/bin/windows/topologic/topologic.cp310-win_amd64.pyd,sha256=F0sPLuMpD
|
|
|
69
69
|
topologicpy/bin/windows/topologic/topologic.cp311-win_amd64.pyd,sha256=aBAJQj3OmJ58MOAF1ZIFybL_5fFK7FNR9hrIps6b6pc,1551872
|
|
70
70
|
topologicpy/bin/windows/topologic/topologic.cp38-win_amd64.pyd,sha256=aLgNf54nbJmGc7Tdmkuy-V0m6B9zLxabIbpRwAy7cBA,1551360
|
|
71
71
|
topologicpy/bin/windows/topologic/topologic.cp39-win_amd64.pyd,sha256=_8cp205hiRxkFHtzQQOweA4DhCPk8caH4kTVLWGQeVw,1411584
|
|
72
|
-
topologicpy-0.3.
|
|
73
|
-
topologicpy-0.3.
|
|
74
|
-
topologicpy-0.3.
|
|
75
|
-
topologicpy-0.3.
|
|
76
|
-
topologicpy-0.3.
|
|
72
|
+
topologicpy-0.3.2.dist-info/LICENSE,sha256=RUmXeeqj63bBySLJjEfhwb9OE7M8h9K6HuOBF3ASVyI,35697
|
|
73
|
+
topologicpy-0.3.2.dist-info/METADATA,sha256=wipxg4A9bYcqrAL1PL_EYREfKrq9cMURPlXdb1D77QY,7210
|
|
74
|
+
topologicpy-0.3.2.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
|
|
75
|
+
topologicpy-0.3.2.dist-info/top_level.txt,sha256=J30bDzW92Ob7hw3zA8V34Jlp-vvsfIkGzkr8sqvb4Uw,12
|
|
76
|
+
topologicpy-0.3.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|