topologicpy 0.7.47__py3-none-any.whl → 0.7.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/PyG.py +96 -17
- topologicpy/Shell.py +1 -0
- topologicpy/Sun.py +8 -8
- topologicpy/Vertex.py +29 -28
- topologicpy/version.py +1 -1
- {topologicpy-0.7.47.dist-info → topologicpy-0.7.48.dist-info}/METADATA +1 -1
- {topologicpy-0.7.47.dist-info → topologicpy-0.7.48.dist-info}/RECORD +10 -10
- {topologicpy-0.7.47.dist-info → topologicpy-0.7.48.dist-info}/LICENSE +0 -0
- {topologicpy-0.7.47.dist-info → topologicpy-0.7.48.dist-info}/WHEEL +0 -0
- {topologicpy-0.7.47.dist-info → topologicpy-0.7.48.dist-info}/top_level.txt +0 -0
topologicpy/PyG.py
CHANGED
@@ -16,25 +16,104 @@
|
|
16
16
|
|
17
17
|
import os
|
18
18
|
import copy
|
19
|
-
import
|
20
|
-
import pandas as pd
|
21
|
-
import torch
|
22
|
-
import torch.nn as nn
|
23
|
-
import torch.nn.functional as F
|
24
|
-
from torch_geometric.data import Data, Dataset
|
25
|
-
from torch_geometric.loader import DataLoader
|
26
|
-
from torch_geometric.nn import SAGEConv, global_mean_pool, global_max_pool, global_add_pool
|
27
|
-
from torch.utils.data.sampler import SubsetRandomSampler
|
28
|
-
from sklearn.model_selection import KFold
|
29
|
-
from sklearn.metrics import accuracy_score
|
30
|
-
from tqdm.auto import tqdm
|
19
|
+
import warnings
|
31
20
|
import gc
|
32
21
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
22
|
+
try:
|
23
|
+
import numpy as np
|
24
|
+
except:
|
25
|
+
print("PyG - Installing required numpy library.")
|
26
|
+
try:
|
27
|
+
os.system("pip install numpy")
|
28
|
+
except:
|
29
|
+
os.system("pip install numpy --user")
|
30
|
+
try:
|
31
|
+
import numpy as np
|
32
|
+
print("PyG - numpy library installed successfully.")
|
33
|
+
except:
|
34
|
+
warnings.warn("PyG - Error: Could not import numpy.")
|
35
|
+
|
36
|
+
try:
|
37
|
+
import pandas as pd
|
38
|
+
except:
|
39
|
+
print("PyG - Installing required pandas library.")
|
40
|
+
try:
|
41
|
+
os.system("pip install pandas")
|
42
|
+
except:
|
43
|
+
os.system("pip install pandas --user")
|
44
|
+
try:
|
45
|
+
import numpy as np
|
46
|
+
print("PyG - pandas library installed successfully.")
|
47
|
+
except:
|
48
|
+
warnings.warn("PyG - Error: Could not import pandas.")
|
49
|
+
|
50
|
+
try:
|
51
|
+
from tqdm.auto import tqdm
|
52
|
+
except:
|
53
|
+
print("PyG - Installing required tqdm library.")
|
54
|
+
try:
|
55
|
+
os.system("pip install tqdm")
|
56
|
+
except:
|
57
|
+
os.system("pip install tqdm --user")
|
58
|
+
try:
|
59
|
+
from tqdm.auto import tqdm
|
60
|
+
print("PyG - tqdm library installed correctly.")
|
61
|
+
except:
|
62
|
+
raise Exception("PyG - Error: Could not import tqdm.")
|
63
|
+
|
64
|
+
try:
|
65
|
+
import torch
|
66
|
+
import torch.nn as nn
|
67
|
+
import torch.nn.functional as F
|
68
|
+
from torch.utils.data.sampler import SubsetRandomSampler
|
69
|
+
except:
|
70
|
+
print("PyG - Installing required torch library.")
|
71
|
+
try:
|
72
|
+
os.system("pip install torch")
|
73
|
+
except:
|
74
|
+
os.system("pip install torch --user")
|
75
|
+
try:
|
76
|
+
import torch
|
77
|
+
import torch.nn as nn
|
78
|
+
import torch.nn.functional as F
|
79
|
+
from torch.utils.data.sampler import SubsetRandomSampler
|
80
|
+
print("PyG - torch library installed correctly.")
|
81
|
+
except:
|
82
|
+
warnings.warn("PyG - Error: Could not import torch.")
|
83
|
+
|
84
|
+
try:
|
85
|
+
from torch_geometric.data import Data, Dataset
|
86
|
+
from torch_geometric.loader import DataLoader
|
87
|
+
from torch_geometric.nn import SAGEConv, global_mean_pool, global_max_pool, global_add_pool
|
88
|
+
except:
|
89
|
+
print("PyG - Installing required torch_geometric library.")
|
90
|
+
try:
|
91
|
+
os.system("pip install torch_geometric")
|
92
|
+
except:
|
93
|
+
os.system("pip install torch_geometric --user")
|
94
|
+
try:
|
95
|
+
from torch_geometric.data import Data, Dataset
|
96
|
+
from torch_geometric.loader import DataLoader
|
97
|
+
from torch_geometric.nn import SAGEConv, global_mean_pool, global_max_pool, global_add_pool
|
98
|
+
print("PyG - torch_geometric library installed correctly.")
|
99
|
+
except:
|
100
|
+
warnings.warn("PyG - Error: Could not import torch.")
|
101
|
+
|
102
|
+
try:
|
103
|
+
from sklearn.model_selection import KFold
|
104
|
+
from sklearn.metrics import accuracy_score
|
105
|
+
except:
|
106
|
+
print("PyG - Installing required scikit-learn library.")
|
107
|
+
try:
|
108
|
+
os.system("pip install -U scikit-learn")
|
109
|
+
except:
|
110
|
+
os.system("pip install -U scikit-learn --user")
|
111
|
+
try:
|
112
|
+
from sklearn.model_selection import KFold
|
113
|
+
from sklearn.metrics import accuracy_score
|
114
|
+
print("PyG - scikit-learn library installed correctly.")
|
115
|
+
except:
|
116
|
+
warnings.warn("PyG - Error: Could not import scikit. Please install it manually.")
|
38
117
|
|
39
118
|
class CustomGraphDataset(Dataset):
|
40
119
|
def __init__(self, root=None, data_list=None, indices=None, node_level=False, graph_level=True,
|
topologicpy/Shell.py
CHANGED
topologicpy/Sun.py
CHANGED
@@ -261,6 +261,7 @@ class Sun():
|
|
261
261
|
float
|
262
262
|
The altitude angle.
|
263
263
|
"""
|
264
|
+
|
264
265
|
import os
|
265
266
|
import warnings
|
266
267
|
import math
|
@@ -399,6 +400,7 @@ class Sun():
|
|
399
400
|
list
|
400
401
|
The sun vector pointing from the location of the sun towards the origin.
|
401
402
|
"""
|
403
|
+
|
402
404
|
from topologicpy.Vector import Vector
|
403
405
|
azimuth = Sun.Azimuth(latitude=latitude, longitude=longitude, date=date)
|
404
406
|
altitude = Sun.Altitude(latitude=latitude, longitude=longitude, date=date)
|
@@ -758,14 +760,12 @@ class Sun():
|
|
758
760
|
-------
|
759
761
|
dict
|
760
762
|
A dictionary of the sun diagram shapes. The keys in this dictionary are:
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
- 'ground' : This is a circle (face) on the ground. It is made of 36 sides. This is included only if
|
768
|
-
the compass option is set to False.
|
763
|
+
'date_paths': These are the sun paths (wire) for the winter solstice, equinox, and summer solstice
|
764
|
+
'hourly_paths': These are the figure-8 (wire) for the sun location on the same hour on each selected day of the year.
|
765
|
+
'shell': This is the total surface (shell) of the sun paths. This is included only if the shell option is set to True.
|
766
|
+
'compass': This is the compass (shell) on the ground. It is made of 36 sides and 10 rings. This is included only if the compass option is set to True.
|
767
|
+
'center' : This is a cross-shape (wire) at the center of the diagram. This is included only if the compass option is set to True.
|
768
|
+
'ground' : This is a circle (face) on the ground. It is made of 36 sides. This is included only if the compass option is set to False.
|
769
769
|
"""
|
770
770
|
|
771
771
|
from datetime import datetime
|
topologicpy/Vertex.py
CHANGED
@@ -316,14 +316,14 @@ class Vertex():
|
|
316
316
|
Returns the centroid of the input list of vertices.
|
317
317
|
|
318
318
|
Parameters
|
319
|
-
|
319
|
+
----------
|
320
320
|
vertices : list
|
321
321
|
The input list of vertices
|
322
322
|
mantissa : int , optional
|
323
323
|
The desired length of the mantissa. The default is 6.
|
324
324
|
|
325
|
-
|
326
|
-
|
325
|
+
Returns
|
326
|
+
-------
|
327
327
|
topologic_core.Vertex
|
328
328
|
The computed centroid of the input list of vertices
|
329
329
|
|
@@ -350,16 +350,17 @@ class Vertex():
|
|
350
350
|
Sorts the input list of vertices in a clockwise fashion. This method assumes that the vertices are on the XY plane. The Z coordinate is ignored.
|
351
351
|
|
352
352
|
Parameters
|
353
|
-
|
353
|
+
----------
|
354
354
|
vertices : list
|
355
355
|
The input list of vertices
|
356
356
|
|
357
|
-
|
358
|
-
|
357
|
+
Returns
|
358
|
+
-------
|
359
359
|
list
|
360
360
|
The input list of vertices sorted in a counter clockwise fashion
|
361
361
|
|
362
362
|
"""
|
363
|
+
|
363
364
|
return list(reversed(Vertex.CounterClockwise2D(vertices)))
|
364
365
|
|
365
366
|
@staticmethod
|
@@ -414,14 +415,14 @@ class Vertex():
|
|
414
415
|
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.
|
415
416
|
|
416
417
|
Parameters
|
417
|
-
|
418
|
+
----------
|
418
419
|
vertices : list
|
419
420
|
The input list of vertices
|
420
421
|
mantissa : int , optional
|
421
422
|
The desired length of the mantissa. The default is 6.
|
422
423
|
|
423
|
-
|
424
|
-
|
424
|
+
Returns
|
425
|
+
-------
|
425
426
|
list
|
426
427
|
The input list of vertices sorted in a counter clockwise fashion
|
427
428
|
|
@@ -1133,16 +1134,16 @@ class Vertex():
|
|
1133
1134
|
"""
|
1134
1135
|
Returns True if the input vertex is peripheral to the input topology. Returns False otherwise.
|
1135
1136
|
A vertex is said to be peripheral to the input topology if:
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1137
|
+
01. Vertex: If it is internal to it (i.e. coincident with it).
|
1138
|
+
02. Edge: If it is internal to its start or end vertices.
|
1139
|
+
03. Manifold open wire: If it is internal to its start or end vertices.
|
1140
|
+
04. Manifold closed wire: If it is internal to any of its vertices.
|
1141
|
+
05. Non-manifold wire: If it is internal to any of its vertices that has a vertex degree of 1.
|
1142
|
+
06. Face: If it is internal to any of its edges or vertices.
|
1143
|
+
07. Shell: If it is internal to external boundary
|
1144
|
+
08. Cell: If it is internal to any of its faces, edges, or vertices.
|
1145
|
+
09. CellComplex: If it is peripheral to its external boundary.
|
1146
|
+
10. Cluster: If it is peripheral to any of its free topologies. (See Cluster.FreeTopologies)
|
1146
1147
|
|
1147
1148
|
Parameters
|
1148
1149
|
----------
|
@@ -1393,10 +1394,10 @@ class Vertex():
|
|
1393
1394
|
Returns a vertex with coordinates (0, 0, 0)
|
1394
1395
|
|
1395
1396
|
Parameters
|
1396
|
-
|
1397
|
+
----------
|
1397
1398
|
|
1398
|
-
|
1399
|
-
|
1399
|
+
Returns
|
1400
|
+
-------
|
1400
1401
|
topologic_core.Vertex
|
1401
1402
|
"""
|
1402
1403
|
return Vertex.ByCoordinates(0, 0, 0)
|
@@ -1525,14 +1526,14 @@ class Vertex():
|
|
1525
1526
|
Returns the equation of the average plane passing through a list of vertices.
|
1526
1527
|
|
1527
1528
|
Parameters
|
1528
|
-
|
1529
|
+
----------
|
1529
1530
|
vertices : list
|
1530
1531
|
The input list of vertices
|
1531
1532
|
mantissa : int , optional
|
1532
1533
|
The desired length of the mantissa. The default is 6.
|
1533
1534
|
|
1534
|
-
|
1535
|
-
|
1535
|
+
Returns
|
1536
|
+
-------
|
1536
1537
|
dict
|
1537
1538
|
The dictionary containing the values of a, b, c, d for the plane equation in the form of ax+by+cz+d=0.
|
1538
1539
|
The keys in the dictionary are ["a", "b", "c". "d"]
|
@@ -1576,7 +1577,7 @@ class Vertex():
|
|
1576
1577
|
Creates a point (vertex) using the input parameters
|
1577
1578
|
|
1578
1579
|
Parameters
|
1579
|
-
|
1580
|
+
----------
|
1580
1581
|
x : float , optional.
|
1581
1582
|
The desired x coordinate. The default is 0.
|
1582
1583
|
y : float , optional.
|
@@ -1584,8 +1585,8 @@ class Vertex():
|
|
1584
1585
|
z : float , optional.
|
1585
1586
|
The desired z coordinate. The default is 0.
|
1586
1587
|
|
1587
|
-
|
1588
|
-
|
1588
|
+
Returns
|
1589
|
+
-------
|
1589
1590
|
topologic_core.Vertex
|
1590
1591
|
"""
|
1591
1592
|
|
topologicpy/version.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = '0.7.
|
1
|
+
__version__ = '0.7.48'
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: topologicpy
|
3
|
-
Version: 0.7.
|
3
|
+
Version: 0.7.48
|
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: MIT License
|
@@ -18,18 +18,18 @@ topologicpy/Matrix.py,sha256=umgR7An919-wGInXJ1wpqnoQ2jCPdyMe2rcWTZ16upk,8079
|
|
18
18
|
topologicpy/Neo4j.py,sha256=YvtF7RYUMATEZ8iHwFwK_MOxEDyARby2DTI2CCK6-cI,19694
|
19
19
|
topologicpy/Plotly.py,sha256=o0JWE51lViK-UJUpIpf2Yusk_vTX5hfNMyFXFinKSRg,106048
|
20
20
|
topologicpy/Polyskel.py,sha256=EFsuh2EwQJGPLiFUjvtXmAwdX-A4r_DxP5hF7Qd3PaU,19829
|
21
|
-
topologicpy/PyG.py,sha256=
|
22
|
-
topologicpy/Shell.py,sha256=
|
21
|
+
topologicpy/PyG.py,sha256=3U59QObO56EBwrvaplGeLZhbTao0gJCYhWm3oTpjFAE,109505
|
22
|
+
topologicpy/Shell.py,sha256=joahFtpRQTWJpQOmi3qU4Xe0Sx2XXeayHlXTNx8CzMk,87610
|
23
23
|
topologicpy/Speckle.py,sha256=rUS6PCaxIjEF5_fUruxvMH47FMKg-ohcoU0qAUb-yNM,14267
|
24
|
-
topologicpy/Sun.py,sha256=
|
24
|
+
topologicpy/Sun.py,sha256=42tDWMYpwRG7Z2Qjtp94eRgBuqySq7k8TgNUZDK7QxQ,36837
|
25
25
|
topologicpy/Topology.py,sha256=XyXMuw1jTFdHJbuYNub_ngr9mFHmKxejUR7fe6denlk,366314
|
26
26
|
topologicpy/Vector.py,sha256=WQQUbwrg7VKImtxuBUi2i-FRiPT77WlrzLP05gdXKM8,33079
|
27
|
-
topologicpy/Vertex.py,sha256=
|
27
|
+
topologicpy/Vertex.py,sha256=bLY60YWoMsgCgHk7F7k9F93Sq2FJ6AzUcTfJ83NZfHA,71107
|
28
28
|
topologicpy/Wire.py,sha256=9EJE0Iq3nGz5X7Suy6xxjmuOpfV49By6WH98UAL_7m4,153532
|
29
29
|
topologicpy/__init__.py,sha256=D7ky87CAQMiS2KE6YLvcTLkTgA2PY7rASe6Z23pjp9k,872
|
30
|
-
topologicpy/version.py,sha256=
|
31
|
-
topologicpy-0.7.
|
32
|
-
topologicpy-0.7.
|
33
|
-
topologicpy-0.7.
|
34
|
-
topologicpy-0.7.
|
35
|
-
topologicpy-0.7.
|
30
|
+
topologicpy/version.py,sha256=KnNxq_i4jicb02oPjeBZ0NMhwUqEYyzXll92M-WRkOY,23
|
31
|
+
topologicpy-0.7.48.dist-info/LICENSE,sha256=BRNw73R2WdDBICtwhI3wm3cxsaVqLTAGuRwrTltcfxs,1068
|
32
|
+
topologicpy-0.7.48.dist-info/METADATA,sha256=ilMxONif8tLQu-geXJO8L0155g2f77eMTW7Y8LrhvZE,10918
|
33
|
+
topologicpy-0.7.48.dist-info/WHEEL,sha256=Mdi9PDNwEZptOjTlUcAth7XJDFtKrHYaQMPulZeBCiQ,91
|
34
|
+
topologicpy-0.7.48.dist-info/top_level.txt,sha256=J30bDzW92Ob7hw3zA8V34Jlp-vvsfIkGzkr8sqvb4Uw,12
|
35
|
+
topologicpy-0.7.48.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|