topologicpy 0.5.7__py3-none-any.whl → 0.5.9__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/Color.py +33 -3
- topologicpy/DGL.py +122 -18
- topologicpy/Dictionary.py +3 -0
- topologicpy/EnergyModel.py +18 -37
- topologicpy/Face.py +21 -14
- topologicpy/Graph.py +111 -43
- topologicpy/Topology.py +90 -32
- topologicpy/__init__.py +1 -1
- {topologicpy-0.5.7.dist-info → topologicpy-0.5.9.dist-info}/METADATA +2 -12
- {topologicpy-0.5.7.dist-info → topologicpy-0.5.9.dist-info}/RECORD +13 -13
- {topologicpy-0.5.7.dist-info → topologicpy-0.5.9.dist-info}/LICENSE +0 -0
- {topologicpy-0.5.7.dist-info → topologicpy-0.5.9.dist-info}/WHEEL +0 -0
- {topologicpy-0.5.7.dist-info → topologicpy-0.5.9.dist-info}/top_level.txt +0 -0
topologicpy/Color.py
CHANGED
@@ -35,7 +35,23 @@ class Color:
|
|
35
35
|
list
|
36
36
|
The color expressed as an [r, g, b] or an [r, g, b, a] list.
|
37
37
|
"""
|
38
|
-
import
|
38
|
+
import warnings
|
39
|
+
import os
|
40
|
+
try:
|
41
|
+
import webcolors
|
42
|
+
except:
|
43
|
+
print("Color.ByCSSNamedColor - Information: Installing required webcolors library.")
|
44
|
+
try:
|
45
|
+
os.system("pip install webcolors")
|
46
|
+
except:
|
47
|
+
os.system("pip install webcolors --user")
|
48
|
+
try:
|
49
|
+
import webcolors
|
50
|
+
print("Color.ByCSSNamedColor - Information: webcolors library installed correctly.")
|
51
|
+
except:
|
52
|
+
warnings.warn("Color.ByCSSNamedColor - Error: Could not import webcolors library. Please manually install webcolors. Returning None.")
|
53
|
+
return None
|
54
|
+
|
39
55
|
if not alpha == None:
|
40
56
|
if not 0.0 <= alpha <= 1.0:
|
41
57
|
print("Color.ByCSSNamedColor - Error: alpha is not within the valid range of 0 to 1. Returning None.")
|
@@ -262,9 +278,23 @@ class Color:
|
|
262
278
|
str
|
263
279
|
The CSS named color that most closely matches the input color.
|
264
280
|
"""
|
265
|
-
|
266
|
-
import webcolors
|
267
281
|
import numbers
|
282
|
+
import warnings
|
283
|
+
import os
|
284
|
+
try:
|
285
|
+
import webcolors
|
286
|
+
except:
|
287
|
+
print("Color.CSSNamedColor - Information: Installing required webcolors library.")
|
288
|
+
try:
|
289
|
+
os.system("pip install webcolors")
|
290
|
+
except:
|
291
|
+
os.system("pip install webcolors --user")
|
292
|
+
try:
|
293
|
+
import webcolors
|
294
|
+
print("Color.CSSNamedColor - Information: webcolors library installed correctly.")
|
295
|
+
except:
|
296
|
+
warnings.warn("Color.CSSNamedColor - Error: Could not import webcolors library. Please manually install webcolors. Returning None.")
|
297
|
+
return None
|
268
298
|
|
269
299
|
if not isinstance(color, list):
|
270
300
|
print("Color.CSSNamedColor - Error: The input color parameter is not a valid list. Returning None.")
|
topologicpy/DGL.py
CHANGED
@@ -94,24 +94,6 @@ except:
|
|
94
94
|
except:
|
95
95
|
warnings.warn("DGL - Error: Could not import dgl. The installation of the correct version of the dgl library is not trivial and is highly dependent on your hardward and software configuration. Please consult the dgl installation instructions.")
|
96
96
|
|
97
|
-
try:
|
98
|
-
from sklearn import metrics
|
99
|
-
from sklearn.model_selection import KFold
|
100
|
-
from sklearn.metrics import accuracy_score
|
101
|
-
except:
|
102
|
-
print("DGL - Installing required scikit-learn (sklearn) library.")
|
103
|
-
try:
|
104
|
-
os.system("pip install scikit-learn")
|
105
|
-
except:
|
106
|
-
os.system("pip install scikit-learn --user")
|
107
|
-
try:
|
108
|
-
from sklearn import metrics
|
109
|
-
from sklearn.model_selection import KFold
|
110
|
-
from sklearn.metrics import accuracy_score
|
111
|
-
print("DGL - scikit-learn (sklearn) library installed correctly.")
|
112
|
-
except:
|
113
|
-
raise Exception("DGL - Error: Could not import scikit-learn (sklearn).")
|
114
|
-
|
115
97
|
try:
|
116
98
|
from tqdm.auto import tqdm
|
117
99
|
except:
|
@@ -715,6 +697,20 @@ class _GraphRegressorKFold:
|
|
715
697
|
|
716
698
|
|
717
699
|
def train(self):
|
700
|
+
try:
|
701
|
+
from sklearn.model_selection import KFold
|
702
|
+
except:
|
703
|
+
print("DGL - Installing required scikit-learn (sklearn) library.")
|
704
|
+
try:
|
705
|
+
os.system("pip install scikit-learn")
|
706
|
+
except:
|
707
|
+
os.system("pip install scikit-learn --user")
|
708
|
+
try:
|
709
|
+
from sklearn.model_selection import KFold
|
710
|
+
print("DGL - scikit-learn (sklearn) library installed correctly.")
|
711
|
+
except:
|
712
|
+
warnings.warn("DGL - Error: Could not import scikit-learn (sklearn). Please try to install scikit-learn manually. Returning None.")
|
713
|
+
return None
|
718
714
|
device = torch.device("cpu")
|
719
715
|
|
720
716
|
# The number of folds (This should come from the hparams)
|
@@ -904,6 +900,22 @@ class _GraphClassifierHoldout:
|
|
904
900
|
batch_size=hparams.batch_size,
|
905
901
|
drop_last=False)
|
906
902
|
def train(self):
|
903
|
+
|
904
|
+
try:
|
905
|
+
from sklearn.metrics import accuracy_score
|
906
|
+
except:
|
907
|
+
print("DGL - Installing required scikit-learn (sklearn) library.")
|
908
|
+
try:
|
909
|
+
os.system("pip install scikit-learn")
|
910
|
+
except:
|
911
|
+
os.system("pip install scikit-learn --user")
|
912
|
+
try:
|
913
|
+
from sklearn.metrics import accuracy_score
|
914
|
+
print("DGL - scikit-learn (sklearn) library installed correctly.")
|
915
|
+
except:
|
916
|
+
warnings.warn("DGL - Error: Could not import scikit-learn (sklearn). Please try to install scikit-learn manually. Returning None.")
|
917
|
+
return None
|
918
|
+
|
907
919
|
#device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
908
920
|
device = torch.device("cpu")
|
909
921
|
# Init the loss and accuracy reporting lists
|
@@ -951,6 +963,20 @@ class _GraphClassifierHoldout:
|
|
951
963
|
self.validation_loss_list.append(self.validation_loss)
|
952
964
|
|
953
965
|
def validate(self):
|
966
|
+
try:
|
967
|
+
from sklearn.metrics import accuracy_score
|
968
|
+
except:
|
969
|
+
print("DGL - Installing required scikit-learn (sklearn) library.")
|
970
|
+
try:
|
971
|
+
os.system("pip install scikit-learn")
|
972
|
+
except:
|
973
|
+
os.system("pip install scikit-learn --user")
|
974
|
+
try:
|
975
|
+
from sklearn.metrics import accuracy_score
|
976
|
+
print("DGL - scikit-learn (sklearn) library installed correctly.")
|
977
|
+
except:
|
978
|
+
warnings.warn("DGL - Error: Could not import scikit-learn (sklearn). Please try to install scikit-learn manually. Returning None.")
|
979
|
+
return None
|
954
980
|
#device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
955
981
|
device = torch.device("cpu")
|
956
982
|
temp_loss_list = []
|
@@ -969,6 +995,20 @@ class _GraphClassifierHoldout:
|
|
969
995
|
self.validation_loss = np.mean(temp_loss_list).item()
|
970
996
|
|
971
997
|
def test(self):
|
998
|
+
try:
|
999
|
+
from sklearn.metrics import accuracy_score
|
1000
|
+
except:
|
1001
|
+
print("DGL - Installing required scikit-learn (sklearn) library.")
|
1002
|
+
try:
|
1003
|
+
os.system("pip install scikit-learn")
|
1004
|
+
except:
|
1005
|
+
os.system("pip install scikit-learn --user")
|
1006
|
+
try:
|
1007
|
+
from sklearn.metrics import accuracy_score
|
1008
|
+
print("DGL - scikit-learn (sklearn) library installed correctly.")
|
1009
|
+
except:
|
1010
|
+
warnings.warn("DGL - Error: Could not import scikit-learn (sklearn). Please try to install scikit-learn manually. Returning None.")
|
1011
|
+
return None
|
972
1012
|
if self.test_dataloader:
|
973
1013
|
temp_loss_list = []
|
974
1014
|
temp_acc_list = []
|
@@ -1073,6 +1113,23 @@ class _GraphClassifierKFold:
|
|
1073
1113
|
lr=self.hparams.lr, maximize=self.hparams.maximize, weight_decay=self.hparams.weight_decay)
|
1074
1114
|
|
1075
1115
|
def train(self):
|
1116
|
+
|
1117
|
+
try:
|
1118
|
+
from sklearn.model_selection import KFold
|
1119
|
+
from sklearn.metrics import accuracy_score
|
1120
|
+
except:
|
1121
|
+
print("DGL - Installing required scikit-learn (sklearn) library.")
|
1122
|
+
try:
|
1123
|
+
os.system("pip install scikit-learn")
|
1124
|
+
except:
|
1125
|
+
os.system("pip install scikit-learn --user")
|
1126
|
+
try:
|
1127
|
+
from sklearn.model_selection import KFold
|
1128
|
+
from sklearn.metrics import accuracy_score
|
1129
|
+
print("DGL - scikit-learn (sklearn) library installed correctly.")
|
1130
|
+
except:
|
1131
|
+
warnings.warn("DGL - Error: Could not import scikit-learn (sklearn). Please try to install scikit-learn manually. Returning None.")
|
1132
|
+
return None
|
1076
1133
|
# The number of folds (This should come from the hparams)
|
1077
1134
|
k_folds = self.hparams.k_folds
|
1078
1135
|
|
@@ -1176,6 +1233,20 @@ class _GraphClassifierKFold:
|
|
1176
1233
|
self.validation_loss_list = self.validation_loss_list[ind]
|
1177
1234
|
|
1178
1235
|
def validate(self):
|
1236
|
+
try:
|
1237
|
+
from sklearn.metrics import accuracy_score
|
1238
|
+
except:
|
1239
|
+
print("DGL - Installing required scikit-learn (sklearn) library.")
|
1240
|
+
try:
|
1241
|
+
os.system("pip install scikit-learn")
|
1242
|
+
except:
|
1243
|
+
os.system("pip install scikit-learn --user")
|
1244
|
+
try:
|
1245
|
+
from sklearn.metrics import accuracy_score
|
1246
|
+
print("DGL - scikit-learn (sklearn) library installed correctly.")
|
1247
|
+
except:
|
1248
|
+
warnings.warn("DGL - Error: Could not import scikit-learn (sklearn). Please try to install scikit-learn manually. Returning None.")
|
1249
|
+
return None
|
1179
1250
|
temp_loss_list = []
|
1180
1251
|
temp_acc_list = []
|
1181
1252
|
self.model.eval()
|
@@ -1192,6 +1263,22 @@ class _GraphClassifierKFold:
|
|
1192
1263
|
self.validation_loss = np.mean(temp_loss_list).item()
|
1193
1264
|
|
1194
1265
|
def test(self):
|
1266
|
+
|
1267
|
+
try:
|
1268
|
+
from sklearn.metrics import accuracy_score
|
1269
|
+
except:
|
1270
|
+
print("DGL - Installing required scikit-learn (sklearn) library.")
|
1271
|
+
try:
|
1272
|
+
os.system("pip install scikit-learn")
|
1273
|
+
except:
|
1274
|
+
os.system("pip install scikit-learn --user")
|
1275
|
+
try:
|
1276
|
+
from sklearn.metrics import accuracy_score
|
1277
|
+
print("DGL - scikit-learn (sklearn) library installed correctly.")
|
1278
|
+
except:
|
1279
|
+
warnings.warn("DGL - Error: Could not import scikit-learn (sklearn). Please try to install scikit-learn manually. Returning None.")
|
1280
|
+
return None
|
1281
|
+
|
1195
1282
|
if self.testingDataset:
|
1196
1283
|
self.test_dataloader = GraphDataLoader(self.testingDataset,
|
1197
1284
|
batch_size=len(self.testingDataset),
|
@@ -1724,6 +1811,23 @@ class DGL:
|
|
1724
1811
|
|
1725
1812
|
"""
|
1726
1813
|
|
1814
|
+
try:
|
1815
|
+
from sklearn import metrics
|
1816
|
+
from sklearn.metrics import accuracy_score
|
1817
|
+
except:
|
1818
|
+
print("DGL - Installing required scikit-learn (sklearn) library.")
|
1819
|
+
try:
|
1820
|
+
os.system("pip install scikit-learn")
|
1821
|
+
except:
|
1822
|
+
os.system("pip install scikit-learn --user")
|
1823
|
+
try:
|
1824
|
+
from sklearn import metrics
|
1825
|
+
from sklearn.metrics import accuracy_score
|
1826
|
+
print("DGL - scikit-learn (sklearn) library installed correctly.")
|
1827
|
+
except:
|
1828
|
+
warnings.warn("DGL - Error: Could not import scikit-learn (sklearn). Please try to install scikit-learn manually. Returning None.")
|
1829
|
+
return None
|
1830
|
+
|
1727
1831
|
if not isinstance(actual, list):
|
1728
1832
|
print("DGL.ConfusionMatrix - ERROR: The actual input is not a list. Returning None")
|
1729
1833
|
return None
|
topologicpy/Dictionary.py
CHANGED
@@ -622,6 +622,9 @@ class Dictionary(topologic.Dictionary):
|
|
622
622
|
if not isinstance(dictionary, topologic.Dictionary) and not isinstance(dictionary, dict):
|
623
623
|
print("Dictionary.ValueAtKey - Error: The input dictionary parameter is not a valid topologic or python dictionary. Returning None.")
|
624
624
|
return None
|
625
|
+
if not isinstance(key, str):
|
626
|
+
print("Dictionary.ValueAtKey - Error: The input key parameter is not a valid str. Returning None.")
|
627
|
+
return None
|
625
628
|
if isinstance(dictionary, dict):
|
626
629
|
attr = dictionary[key]
|
627
630
|
elif isinstance(dictionary, topologic.Dictionary):
|
topologicpy/EnergyModel.py
CHANGED
@@ -37,22 +37,6 @@ except:
|
|
37
37
|
except:
|
38
38
|
warnings.warn("EnergyModel - Error: Could not import tqdm.")
|
39
39
|
|
40
|
-
try:
|
41
|
-
import openstudio
|
42
|
-
openstudio.Logger.instance().standardOutLogger().setLogLevel(openstudio.Fatal)
|
43
|
-
except:
|
44
|
-
print("EnergyModel - Installing required openstudio library.")
|
45
|
-
try:
|
46
|
-
os.system("pip install openstudio")
|
47
|
-
except:
|
48
|
-
os.system("pip install openstudio --user")
|
49
|
-
try:
|
50
|
-
import openstudio
|
51
|
-
openstudio.Logger.instance().standardOutLogger().setLogLevel(openstudio.Fatal)
|
52
|
-
print("EnergyModel - openstudio library installed correctly.")
|
53
|
-
except:
|
54
|
-
warnings.warn("EnergyModel - Error: Could not import openstudio.")
|
55
|
-
|
56
40
|
class EnergyModel:
|
57
41
|
'''
|
58
42
|
@staticmethod
|
@@ -99,8 +83,25 @@ class EnergyModel:
|
|
99
83
|
The OSM model.
|
100
84
|
|
101
85
|
"""
|
86
|
+
try:
|
87
|
+
import openstudio
|
88
|
+
openstudio.Logger.instance().standardOutLogger().setLogLevel(openstudio.Fatal)
|
89
|
+
except:
|
90
|
+
print("EnergyModel.ByOSMPath - Information: Installing required openstudio library.")
|
91
|
+
try:
|
92
|
+
os.system("pip install openstudio")
|
93
|
+
except:
|
94
|
+
os.system("pip install openstudio --user")
|
95
|
+
try:
|
96
|
+
import openstudio
|
97
|
+
openstudio.Logger.instance().standardOutLogger().setLogLevel(openstudio.Fatal)
|
98
|
+
print("EnergyModel.ByOSMPath - Information: openstudio library installed correctly.")
|
99
|
+
except:
|
100
|
+
warnings.warn("EnergyModel - Error: Could not import openstudio.Please try to install openstudio manually. Returning None.")
|
101
|
+
return None
|
102
|
+
|
102
103
|
if not path:
|
103
|
-
print("EnergyModel.
|
104
|
+
print("EnergyModel.ByOSMPath - Error: The input path is not valid. Returning None.")
|
104
105
|
return None
|
105
106
|
translator = openstudio.osversion.VersionTranslator()
|
106
107
|
osmPath = openstudio.openstudioutilitiescore.toPath(path)
|
@@ -111,26 +112,6 @@ class EnergyModel:
|
|
111
112
|
else:
|
112
113
|
osModel = osModel.get()
|
113
114
|
return osModel
|
114
|
-
|
115
|
-
@staticmethod
|
116
|
-
def ByImportedOSM(path: str):
|
117
|
-
"""
|
118
|
-
DEPRECATED. DO NOT USE. Instead use Topology.ByOSMPath or Topology.ByOSMFile
|
119
|
-
Creates an EnergyModel from the input OSM file path.
|
120
|
-
|
121
|
-
Parameters
|
122
|
-
----------
|
123
|
-
path : string
|
124
|
-
The path to the input .OSM file.
|
125
|
-
|
126
|
-
Returns
|
127
|
-
-------
|
128
|
-
openstudio.openstudiomodelcore.Model
|
129
|
-
The OSM model.
|
130
|
-
|
131
|
-
"""
|
132
|
-
print("Topology.ByImportedOSM - WARNING: This method is DEPRECATED. DO NOT USE. Instead use Topology.ByOSMPath")
|
133
|
-
return EnergyModel.ByOSMPath(path=path)
|
134
115
|
|
135
116
|
@staticmethod
|
136
117
|
def ByTopology(building : topologic.Topology,
|
topologicpy/Face.py
CHANGED
@@ -1786,7 +1786,7 @@ class Face(Topology):
|
|
1786
1786
|
return Face.ByWire(wire, tolerance=tolerance)
|
1787
1787
|
|
1788
1788
|
@staticmethod
|
1789
|
-
def Triangulate(face:topologic.Face, mode:
|
1789
|
+
def Triangulate(face:topologic.Face, mode: int = 0, meshSize: float = None, tolerance: float = 0.0001) -> list:
|
1790
1790
|
"""
|
1791
1791
|
Triangulates the input face and returns a list of faces.
|
1792
1792
|
|
@@ -1796,10 +1796,18 @@ class Face(Topology):
|
|
1796
1796
|
The input face.
|
1797
1797
|
tolerance : float , optional
|
1798
1798
|
The desired tolerance. The default is 0.0001.
|
1799
|
-
mode :
|
1800
|
-
The desired mode of meshing.
|
1801
|
-
|
1802
|
-
|
1799
|
+
mode : int , optional
|
1800
|
+
The desired mode of meshing algorithm. Several options are available:
|
1801
|
+
0: Classic
|
1802
|
+
1: MeshAdapt
|
1803
|
+
3: Initial Mesh Only
|
1804
|
+
5: Delaunay
|
1805
|
+
6: Frontal-Delaunay
|
1806
|
+
7: BAMG
|
1807
|
+
8: Fontal-Delaunay for Quads
|
1808
|
+
9: Packing of Parallelograms
|
1809
|
+
All options other than 0 (Classic) use the gmsh library. See https://gmsh.info/doc/texinfo/gmsh.html#Mesh-options
|
1810
|
+
WARNING: The options that use gmsh can be very time consuming and can create very heavy geometry.
|
1803
1811
|
meshSize : float , optional
|
1804
1812
|
The desired size of the mesh when using the "mesh" option. If set to None, it will be
|
1805
1813
|
calculated automatically and set to 10% of the overall size of the face.
|
@@ -1810,14 +1818,11 @@ class Face(Topology):
|
|
1810
1818
|
The list of triangles of the input face.
|
1811
1819
|
|
1812
1820
|
"""
|
1813
|
-
from topologicpy.Vertex import Vertex
|
1814
1821
|
from topologicpy.Wire import Wire
|
1815
|
-
from topologicpy.Shell import Shell
|
1816
1822
|
from topologicpy.Topology import Topology
|
1817
|
-
from topologicpy.Dictionary import Dictionary
|
1818
1823
|
|
1819
1824
|
# This function was contributed by Yidan Xue.
|
1820
|
-
def generate_gmsh(face, meshSize = None, tolerance = 0.0001):
|
1825
|
+
def generate_gmsh(face, mode="mesh", meshSize = None, tolerance = 0.0001):
|
1821
1826
|
"""
|
1822
1827
|
Creates a gmsh of triangular meshes from the input face.
|
1823
1828
|
|
@@ -1921,7 +1926,9 @@ class Face(Topology):
|
|
1921
1926
|
|
1922
1927
|
gmsh.model.geo.addPlaneSurface([i+1 for i in range(current_wire_number)])
|
1923
1928
|
gmsh.model.geo.synchronize()
|
1924
|
-
|
1929
|
+
if mode not in [1,3,5,6,7,8,9]:
|
1930
|
+
mode = 6
|
1931
|
+
gmsh.option.setNumber("Mesh.Algorithm", mode)
|
1925
1932
|
gmsh.model.mesh.generate(2) # For a 2D mesh
|
1926
1933
|
nodeTags, nodeCoords, nodeParams = gmsh.model.mesh.getNodes(-1, -1)
|
1927
1934
|
elemTypes, elemTags, elemNodeTags = gmsh.model.mesh.getElements(-1, -1)
|
@@ -1955,9 +1962,7 @@ class Face(Topology):
|
|
1955
1962
|
normal = Face.Normal(face)
|
1956
1963
|
flatFace = Topology.Flatten(face, origin=origin, direction=normal)
|
1957
1964
|
|
1958
|
-
if
|
1959
|
-
shell_faces = generate_gmsh(flatFace, meshSize = meshSize, tolerance = tolerance)
|
1960
|
-
else:
|
1965
|
+
if mode == 0:
|
1961
1966
|
shell_faces = []
|
1962
1967
|
for i in range(0,5,1):
|
1963
1968
|
try:
|
@@ -1965,7 +1970,9 @@ class Face(Topology):
|
|
1965
1970
|
break
|
1966
1971
|
except:
|
1967
1972
|
continue
|
1968
|
-
|
1973
|
+
else:
|
1974
|
+
shell_faces = generate_gmsh(flatFace, mode = mode, meshSize = meshSize, tolerance = tolerance)
|
1975
|
+
|
1969
1976
|
if len(shell_faces) < 1:
|
1970
1977
|
return []
|
1971
1978
|
finalFaces = []
|
topologicpy/Graph.py
CHANGED
@@ -66,33 +66,7 @@ except:
|
|
66
66
|
except:
|
67
67
|
warnings.warn("Graph - Error: Could not import tqdm.")
|
68
68
|
|
69
|
-
try:
|
70
|
-
from pyvis.network import Network
|
71
|
-
except:
|
72
|
-
print("Graph - Installing required pyvis library.")
|
73
|
-
try:
|
74
|
-
os.system("pip install pyvis")
|
75
|
-
except:
|
76
|
-
os.system("pip install pyvis --user")
|
77
|
-
try:
|
78
|
-
from pyvis.network import Network
|
79
|
-
print("Graph - pyvis library installed correctly.")
|
80
|
-
except:
|
81
|
-
rwarnings.warn("Graph - Error: Could not import pyvis")
|
82
69
|
|
83
|
-
try:
|
84
|
-
import networkx as nx
|
85
|
-
except:
|
86
|
-
print("Graph - Installing required networkx library.")
|
87
|
-
try:
|
88
|
-
os.system("pip install networkx")
|
89
|
-
except:
|
90
|
-
os.system("pip install networkx --user")
|
91
|
-
try:
|
92
|
-
import networkx as nx
|
93
|
-
print("Graph - networkx library installed correctly.")
|
94
|
-
except:
|
95
|
-
warnings.warn("Graph - Error: Could not import networkx.")
|
96
70
|
|
97
71
|
class _Tree:
|
98
72
|
def __init__(self, node="", *children):
|
@@ -643,7 +617,7 @@ class Graph:
|
|
643
617
|
from rdflib import URIRef, Literal, Namespace
|
644
618
|
from rdflib.namespace import RDF, RDFS
|
645
619
|
except:
|
646
|
-
print("Graph.BOTGraph - Installing required rdflib library.")
|
620
|
+
print("Graph.BOTGraph - Information: Installing required rdflib library.")
|
647
621
|
try:
|
648
622
|
os.system("pip install rdflib")
|
649
623
|
except:
|
@@ -652,7 +626,7 @@ class Graph:
|
|
652
626
|
from rdflib import Graph as RDFGraph
|
653
627
|
from rdflib import URIRef, Literal, Namespace
|
654
628
|
from rdflib.namespace import RDF, RDFS
|
655
|
-
print("Graph.BOTGraph - rdflib library installed correctly.")
|
629
|
+
print("Graph.BOTGraph - Information: rdflib library installed correctly.")
|
656
630
|
except:
|
657
631
|
warnings.warn("Graph.BOTGraph - Error: Could not import rdflib. Please try to install rdflib manually. Returning None.")
|
658
632
|
return None
|
@@ -1136,9 +1110,23 @@ class Graph:
|
|
1136
1110
|
from topologicpy.Graph import Graph
|
1137
1111
|
from topologicpy.Dictionary import Dictionary
|
1138
1112
|
from topologicpy.Topology import Topology
|
1139
|
-
|
1140
|
-
import rdflib
|
1141
1113
|
import random
|
1114
|
+
|
1115
|
+
try:
|
1116
|
+
import rdflib
|
1117
|
+
except:
|
1118
|
+
print("Graph.BOTGraph - Information: Installing required rdflib library.")
|
1119
|
+
try:
|
1120
|
+
os.system("pip install rdflib")
|
1121
|
+
except:
|
1122
|
+
os.system("pip install rdflib --user")
|
1123
|
+
try:
|
1124
|
+
import rdflib
|
1125
|
+
print("Graph.BOTGraph - Information: rdflib library installed correctly.")
|
1126
|
+
except:
|
1127
|
+
warnings.warn("Graph.BOTGraph - Error: Could not import rdflib. Please try to install rdflib manually. Returning None.")
|
1128
|
+
return None
|
1129
|
+
|
1142
1130
|
predicates = ['adjacentto', 'interfaceof', 'containselement', 'connectsto']
|
1143
1131
|
bot_types = ['Space', 'Wall', 'Slab', 'Door', 'Window', 'Element']
|
1144
1132
|
|
@@ -1221,7 +1209,21 @@ class Graph:
|
|
1221
1209
|
tolerance = 0.0001
|
1222
1210
|
):
|
1223
1211
|
|
1224
|
-
|
1212
|
+
try:
|
1213
|
+
from rdflib import Graph as RDFGraph
|
1214
|
+
except:
|
1215
|
+
print("Graph.ByBOTPath - Information: Installing required rdflib library.")
|
1216
|
+
try:
|
1217
|
+
os.system("pip install rdflib")
|
1218
|
+
except:
|
1219
|
+
os.system("pip install rdflib --user")
|
1220
|
+
try:
|
1221
|
+
from rdflib import Graph as RDFGraph
|
1222
|
+
print("Graph.ByBOTPath - Information: rdflib library installed correctly.")
|
1223
|
+
except:
|
1224
|
+
warnings.warn("Graph.ByBOTPath - Error: Could not import rdflib. Please try to install rdflib manually. Returning None.")
|
1225
|
+
return None
|
1226
|
+
|
1225
1227
|
bot_graph = RDFGraph()
|
1226
1228
|
bot_graph.parse(path)
|
1227
1229
|
return Graph.ByBOTGraph(bot_graph,
|
@@ -1687,12 +1689,29 @@ class Graph:
|
|
1687
1689
|
from topologicpy.Edge import Edge
|
1688
1690
|
from topologicpy.Graph import Graph
|
1689
1691
|
from topologicpy.Dictionary import Dictionary
|
1690
|
-
|
1691
|
-
|
1692
|
-
|
1693
|
-
|
1694
|
-
|
1695
|
-
|
1692
|
+
try:
|
1693
|
+
import ifcopenshell
|
1694
|
+
import ifcopenshell.util.placement
|
1695
|
+
import ifcopenshell.util.element
|
1696
|
+
import ifcopenshell.util.shape
|
1697
|
+
import ifcopenshell.geom
|
1698
|
+
except:
|
1699
|
+
print("Graph.ByIFCFile - Warning: Installing required ifcopenshell library.")
|
1700
|
+
try:
|
1701
|
+
os.system("pip install ifcopenshell")
|
1702
|
+
except:
|
1703
|
+
os.system("pip install ifcopenshell --user")
|
1704
|
+
try:
|
1705
|
+
import ifcopenshell
|
1706
|
+
import ifcopenshell.util.placement
|
1707
|
+
import ifcopenshell.util.element
|
1708
|
+
import ifcopenshell.util.shape
|
1709
|
+
import ifcopenshell.geom
|
1710
|
+
print("Graph.ByIFCFile - Warning: ifcopenshell library installed correctly.")
|
1711
|
+
except:
|
1712
|
+
warnings.warn("Graph.ByIFCFile - Error: Could not import ifcopenshell. Please try to install ifcopenshell manually. Returning None.")
|
1713
|
+
return None
|
1714
|
+
|
1696
1715
|
import random
|
1697
1716
|
|
1698
1717
|
def vertexAtKeyValue(vertices, key, value):
|
@@ -1892,7 +1911,28 @@ class Graph:
|
|
1892
1911
|
The created graph.
|
1893
1912
|
|
1894
1913
|
"""
|
1895
|
-
|
1914
|
+
try:
|
1915
|
+
import ifcopenshell
|
1916
|
+
import ifcopenshell.util.placement
|
1917
|
+
import ifcopenshell.util.element
|
1918
|
+
import ifcopenshell.util.shape
|
1919
|
+
import ifcopenshell.geom
|
1920
|
+
except:
|
1921
|
+
print("Graph.ByIFCPath - Warning: Installing required ifcopenshell library.")
|
1922
|
+
try:
|
1923
|
+
os.system("pip install ifcopenshell")
|
1924
|
+
except:
|
1925
|
+
os.system("pip install ifcopenshell --user")
|
1926
|
+
try:
|
1927
|
+
import ifcopenshell
|
1928
|
+
import ifcopenshell.util.placement
|
1929
|
+
import ifcopenshell.util.element
|
1930
|
+
import ifcopenshell.util.shape
|
1931
|
+
import ifcopenshell.geom
|
1932
|
+
print("Graph.ByIFCPath - Warning: ifcopenshell library installed correctly.")
|
1933
|
+
except:
|
1934
|
+
warnings.warn("Graph.ByIFCPath - Error: Could not import ifcopenshell. Please try to install ifcopenshell manually. Returning None.")
|
1935
|
+
return None
|
1896
1936
|
if not path:
|
1897
1937
|
print("Graph.ByIFCPath - Error: the input path is not a valid path. Returning None.")
|
1898
1938
|
return None
|
@@ -5779,7 +5819,7 @@ class Graph:
|
|
5779
5819
|
print("Graph.IsBipartite - Error: The input graph is not a valid graph. Returning None.")
|
5780
5820
|
return None
|
5781
5821
|
order = Graph.Order(graph)
|
5782
|
-
adjList = Graph.AdjacencyList(graph, tolerance)
|
5822
|
+
adjList = Graph.AdjacencyList(graph, tolerance=tolerance)
|
5783
5823
|
return isBipartite(order, adjList)
|
5784
5824
|
|
5785
5825
|
@staticmethod
|
@@ -6620,12 +6660,24 @@ class Graph:
|
|
6620
6660
|
|
6621
6661
|
"""
|
6622
6662
|
from topologicpy.Vertex import Vertex
|
6623
|
-
from topologicpy.Edge import Edge
|
6624
6663
|
from topologicpy.Topology import Topology
|
6625
6664
|
from topologicpy.Dictionary import Dictionary
|
6626
|
-
|
6627
|
-
|
6628
|
-
|
6665
|
+
|
6666
|
+
try:
|
6667
|
+
import networkx as nx
|
6668
|
+
except:
|
6669
|
+
print("Graph.NetworkXGraph - Information: Installing required networkx library.")
|
6670
|
+
try:
|
6671
|
+
os.system("pip install networkx")
|
6672
|
+
except:
|
6673
|
+
os.system("pip install networkx --user")
|
6674
|
+
try:
|
6675
|
+
import networkx as nx
|
6676
|
+
print("Graph.NetworkXGraph - Infromation: networkx library installed correctly.")
|
6677
|
+
except:
|
6678
|
+
warnings.warn("Graph - Error: Could not import networkx. Please try to install networkx manually. Returning None.")
|
6679
|
+
return None
|
6680
|
+
|
6629
6681
|
if not isinstance(graph, topologic.Graph):
|
6630
6682
|
print("Graph.NetworkXGraph - Error: The input graph is not a valid graph. Returning None.")
|
6631
6683
|
return None
|
@@ -6931,6 +6983,22 @@ class Graph:
|
|
6931
6983
|
from topologicpy.Dictionary import Dictionary
|
6932
6984
|
from topologicpy.Color import Color
|
6933
6985
|
from os.path import exists
|
6986
|
+
|
6987
|
+
try:
|
6988
|
+
from pyvis.network import Network
|
6989
|
+
except:
|
6990
|
+
print("Graph.PyvisGraph - Information: Installing required pyvis library.")
|
6991
|
+
try:
|
6992
|
+
os.system("pip install pyvis")
|
6993
|
+
except:
|
6994
|
+
os.system("pip install pyvis --user")
|
6995
|
+
try:
|
6996
|
+
from pyvis.network import Network
|
6997
|
+
print("Graph.PyvisGraph - Information: pyvis library installed correctly.")
|
6998
|
+
except:
|
6999
|
+
warnings.warn("Graph - Error: Could not import pyvis. Please try to install pyvis manually. Retruning None.")
|
7000
|
+
return None
|
7001
|
+
|
6934
7002
|
net = Network(height=str(height)+"px", width="100%", bgcolor=backgroundColor, font_color=fontColor, select_menu=selectMenu, filter_menu=filterMenu, cdn_resources="remote", notebook=notebook)
|
6935
7003
|
if notebook == True:
|
6936
7004
|
net.prep_notebook()
|
topologicpy/Topology.py
CHANGED
@@ -44,22 +44,6 @@ except:
|
|
44
44
|
except:
|
45
45
|
warnings.warn("Topology - Error: Could not import numpy.")
|
46
46
|
|
47
|
-
try:
|
48
|
-
import ifcopenshell
|
49
|
-
import ifcopenshell.geom
|
50
|
-
except:
|
51
|
-
print("Topology - Installing required ifcopenshell library.")
|
52
|
-
try:
|
53
|
-
os.system("pip install ifcopenshell")
|
54
|
-
except:
|
55
|
-
os.system("pip install ifcopenshell --user")
|
56
|
-
try:
|
57
|
-
import ifcopenshell
|
58
|
-
import ifcopenshell.geom
|
59
|
-
print("Topology - ifcopenshell library installed successfully.")
|
60
|
-
except:
|
61
|
-
warnings.warn("Topology - Error: Could not import ifcopenshell.")
|
62
|
-
|
63
47
|
try:
|
64
48
|
from scipy.spatial import ConvexHull
|
65
49
|
except:
|
@@ -74,6 +58,20 @@ except:
|
|
74
58
|
except:
|
75
59
|
warnings.warn("Topology - Error: Could not import scipy.")
|
76
60
|
|
61
|
+
try:
|
62
|
+
from tqdm.auto import tqdm
|
63
|
+
except:
|
64
|
+
print("Topology - Installing required tqdm library.")
|
65
|
+
try:
|
66
|
+
os.system("pip install tqdm")
|
67
|
+
except:
|
68
|
+
os.system("pip install tqdm --user")
|
69
|
+
try:
|
70
|
+
from tqdm.auto import tqdm
|
71
|
+
print("Topology - tqdm library installed correctly.")
|
72
|
+
except:
|
73
|
+
warnings.warn("Topology - Error: Could not import tqdm.")
|
74
|
+
|
77
75
|
QueueItem = namedtuple('QueueItem', ['ID', 'sinkKeys', 'sinkValues'])
|
78
76
|
SinkItem = namedtuple('SinkItem', ['ID', 'sink_str'])
|
79
77
|
|
@@ -1810,6 +1808,22 @@ class Topology():
|
|
1810
1808
|
from topologicpy.Dictionary import Dictionary
|
1811
1809
|
import uuid
|
1812
1810
|
|
1811
|
+
try:
|
1812
|
+
import ifcopenshell
|
1813
|
+
import ifcopenshell.geom
|
1814
|
+
except:
|
1815
|
+
print("Topology.ByIFCFile - Warning: Installing required ifcopenshell library.")
|
1816
|
+
try:
|
1817
|
+
os.system("pip install ifcopenshell")
|
1818
|
+
except:
|
1819
|
+
os.system("pip install ifcopenshell --user")
|
1820
|
+
try:
|
1821
|
+
import ifcopenshell
|
1822
|
+
import ifcopenshell.geom
|
1823
|
+
print("Topology.ByIFCFile - Warning: ifcopenshell library installed correctly.")
|
1824
|
+
except:
|
1825
|
+
warnings.warn("Topology.ByIFCFile - Error: Could not import ifcopenshell. Please try to install ifcopenshell manually. Returning None.")
|
1826
|
+
return None
|
1813
1827
|
if not file:
|
1814
1828
|
print("Topology.ByIFCFile - Error: the input file parameter is not a valid file. Returning None.")
|
1815
1829
|
return None
|
@@ -3541,7 +3555,7 @@ class Topology():
|
|
3541
3555
|
return False
|
3542
3556
|
|
3543
3557
|
@staticmethod
|
3544
|
-
def Fix(topology, topologyType: str ="CellComplex", tolerance: float = 0.0001):
|
3558
|
+
def Fix(topology, topologyType: str = "CellComplex", tolerance: float = 0.0001):
|
3545
3559
|
"""
|
3546
3560
|
Attempts to fix the input topology to matched the desired output type.
|
3547
3561
|
|
@@ -3951,7 +3965,7 @@ class Topology():
|
|
3951
3965
|
return json_string
|
3952
3966
|
|
3953
3967
|
@staticmethod
|
3954
|
-
def OBJString(topology, transposeAxes=True, mantissa=6, tolerance=0.0001):
|
3968
|
+
def OBJString(topology, transposeAxes: bool = True, mode: int = 0, meshSize: float = None, mantissa: int = 6, tolerance: float = 0.0001):
|
3955
3969
|
"""
|
3956
3970
|
Returns the Wavefront string of the input topology. This is very experimental and outputs a simple solid topology.
|
3957
3971
|
|
@@ -3961,6 +3975,21 @@ class Topology():
|
|
3961
3975
|
The input topology.
|
3962
3976
|
transposeAxes : bool , optional
|
3963
3977
|
If set to True the Z and Y coordinates are transposed so that Y points "up"
|
3978
|
+
mode : int , optional
|
3979
|
+
The desired mode of meshing algorithm. Several options are available:
|
3980
|
+
0: Classic
|
3981
|
+
1: MeshAdapt
|
3982
|
+
3: Initial Mesh Only
|
3983
|
+
5: Delaunay
|
3984
|
+
6: Frontal-Delaunay
|
3985
|
+
7: BAMG
|
3986
|
+
8: Fontal-Delaunay for Quads
|
3987
|
+
9: Packing of Parallelograms
|
3988
|
+
All options other than 0 (Classic) use the gmsh library. See https://gmsh.info/doc/texinfo/gmsh.html#Mesh-options
|
3989
|
+
WARNING: The options that use gmsh can be very time consuming and can create very heavy geometry.
|
3990
|
+
meshSize : float , optional
|
3991
|
+
The desired size of the mesh when using the "mesh" option. If set to None, it will be
|
3992
|
+
calculated automatically and set to 10% of the overall size of the face.
|
3964
3993
|
mantissa : int , optional
|
3965
3994
|
The desired length of the mantissa. The default is 6.
|
3966
3995
|
tolerance : float , optional
|
@@ -3983,7 +4012,7 @@ class Topology():
|
|
3983
4012
|
lines = []
|
3984
4013
|
version = Helper.Version()
|
3985
4014
|
lines.append("# topologicpy "+version)
|
3986
|
-
topology = Topology.Triangulate(topology, tolerance=tolerance)
|
4015
|
+
topology = Topology.Triangulate(topology, mode=mode, meshSize=meshSize, tolerance=tolerance)
|
3987
4016
|
d = Topology.Geometry(topology, mantissa=mantissa)
|
3988
4017
|
vertices = d['vertices']
|
3989
4018
|
faces = d['faces']
|
@@ -4005,7 +4034,7 @@ class Topology():
|
|
4005
4034
|
return finalLines
|
4006
4035
|
|
4007
4036
|
@staticmethod
|
4008
|
-
def ExportToOBJ(topology, path, transposeAxes=True, overwrite=False):
|
4037
|
+
def ExportToOBJ(topology, path, transposeAxes: bool = True, mode: int = 0, meshSize: float = None, overwrite: bool = False, mantissa: int = 6, tolerance: float = 0.0001):
|
4009
4038
|
"""
|
4010
4039
|
Exports the input topology to a Wavefront OBJ file. This is very experimental and outputs a simple solid topology.
|
4011
4040
|
|
@@ -4016,7 +4045,26 @@ class Topology():
|
|
4016
4045
|
path : str
|
4017
4046
|
The input file path.
|
4018
4047
|
transposeAxes : bool , optional
|
4019
|
-
If set to True the Z and Y coordinates are transposed so that Y points "up"
|
4048
|
+
If set to True the Z and Y coordinates are transposed so that Y points "up"
|
4049
|
+
mode : int , optional
|
4050
|
+
The desired mode of meshing algorithm. Several options are available:
|
4051
|
+
0: Classic
|
4052
|
+
1: MeshAdapt
|
4053
|
+
3: Initial Mesh Only
|
4054
|
+
5: Delaunay
|
4055
|
+
6: Frontal-Delaunay
|
4056
|
+
7: BAMG
|
4057
|
+
8: Fontal-Delaunay for Quads
|
4058
|
+
9: Packing of Parallelograms
|
4059
|
+
All options other than 0 (Classic) use the gmsh library. See https://gmsh.info/doc/texinfo/gmsh.html#Mesh-options
|
4060
|
+
WARNING: The options that use gmsh can be very time consuming and can create very heavy geometry.
|
4061
|
+
meshSize : float , optional
|
4062
|
+
The desired size of the mesh when using the "mesh" option. If set to None, it will be
|
4063
|
+
calculated automatically and set to 10% of the overall size of the face.
|
4064
|
+
mantissa : int , optional
|
4065
|
+
The desired length of the mantissa. The default is 6.
|
4066
|
+
tolerance : float , optional
|
4067
|
+
The desired tolerance. The default is 0.0001.
|
4020
4068
|
overwrite : bool , optional
|
4021
4069
|
If set to True the ouptut file will overwrite any pre-existing file. Otherwise, it won't. The default is False.
|
4022
4070
|
|
@@ -4040,7 +4088,7 @@ class Topology():
|
|
4040
4088
|
if ext.lower() != ".obj":
|
4041
4089
|
path = path+".obj"
|
4042
4090
|
status = False
|
4043
|
-
objString = Topology.OBJString(topology, transposeAxes=transposeAxes)
|
4091
|
+
objString = Topology.OBJString(topology, transposeAxes=transposeAxes, mode=mode, meshSize=meshSize, mantissa=mantissa, tolerance=tolerance)
|
4044
4092
|
with open(path, "w") as f:
|
4045
4093
|
f.writelines(objString)
|
4046
4094
|
f.close()
|
@@ -5175,7 +5223,7 @@ class Topology():
|
|
5175
5223
|
return new_topology
|
5176
5224
|
|
5177
5225
|
@staticmethod
|
5178
|
-
def Rotate(topology, origin=None, axis: list = [0, 0, 1], angle: float = 0, angTolerance: float =0.001, tolerance: float =0.0001):
|
5226
|
+
def Rotate(topology, origin=None, axis: list = [0, 0, 1], angle: float = 0, angTolerance: float = 0.001, tolerance: float = 0.0001):
|
5179
5227
|
"""
|
5180
5228
|
Rotates the input topology
|
5181
5229
|
|
@@ -6771,7 +6819,7 @@ class Topology():
|
|
6771
6819
|
|
6772
6820
|
|
6773
6821
|
@staticmethod
|
6774
|
-
def Triangulate(topology, transferDictionaries: bool = False, mode:
|
6822
|
+
def Triangulate(topology, transferDictionaries: bool = False, mode: int = 0, meshSize: float = None, tolerance: float = 0.0001):
|
6775
6823
|
"""
|
6776
6824
|
Triangulates the input topology.
|
6777
6825
|
|
@@ -6781,9 +6829,18 @@ class Topology():
|
|
6781
6829
|
The input topologgy.
|
6782
6830
|
transferDictionaries : bool , optional
|
6783
6831
|
If set to True, the dictionaries of the faces in the input topology will be transferred to the created triangular faces. The default is False.
|
6784
|
-
mode :
|
6785
|
-
The desired mode of meshing.
|
6786
|
-
|
6832
|
+
mode : int , optional
|
6833
|
+
The desired mode of meshing algorithm. Several options are available:
|
6834
|
+
0: Classic
|
6835
|
+
1: MeshAdapt
|
6836
|
+
3: Initial Mesh Only
|
6837
|
+
5: Delaunay
|
6838
|
+
6: Frontal-Delaunay
|
6839
|
+
7: BAMG
|
6840
|
+
8: Fontal-Delaunay for Quads
|
6841
|
+
9: Packing of Parallelograms
|
6842
|
+
All options other than 0 (Classic) use the gmsh library. See https://gmsh.info/doc/texinfo/gmsh.html#Mesh-options
|
6843
|
+
WARNING: The options that use gmsh can be very time consuming and can create very heavy geometry.
|
6787
6844
|
meshSize : float , optional
|
6788
6845
|
The desired size of the mesh when using the "mesh" option. If set to None, it will be
|
6789
6846
|
calculated automatically and set to 10% of the overall size of the face.
|
@@ -6801,7 +6858,6 @@ class Topology():
|
|
6801
6858
|
from topologicpy.Cell import Cell
|
6802
6859
|
from topologicpy.CellComplex import CellComplex
|
6803
6860
|
from topologicpy.Cluster import Cluster
|
6804
|
-
from topologicpy.Dictionary import Dictionary
|
6805
6861
|
|
6806
6862
|
if not isinstance(topology, topologic.Topology):
|
6807
6863
|
print("Topology.Triangulate - Error: The input parameter is not a valid topology. Returning None.")
|
@@ -6813,13 +6869,16 @@ class Topology():
|
|
6813
6869
|
temp_topologies = []
|
6814
6870
|
cellComplexes = Topology.SubTopologies(topology, subTopologyType="cellcomplex") or []
|
6815
6871
|
for cc in cellComplexes:
|
6816
|
-
temp_topologies.append(Topology.Triangulate(cc, transferDictionaries=transferDictionaries, tolerance=tolerance))
|
6872
|
+
temp_topologies.append(Topology.Triangulate(cc, transferDictionaries=transferDictionaries, mode=mode, meshSize=meshSize, tolerance=tolerance))
|
6817
6873
|
cells = Cluster.FreeCells(topology, tolerance=tolerance) or []
|
6818
6874
|
for c in cells:
|
6819
|
-
temp_topologies.append(Topology.Triangulate(c, transferDictionaries=transferDictionaries, tolerance=tolerance))
|
6875
|
+
temp_topologies.append(Topology.Triangulate(c, transferDictionaries=transferDictionaries, mode=mode, meshSize=meshSize, tolerance=tolerance))
|
6820
6876
|
shells = Cluster.FreeShells(topology, tolerance=tolerance) or []
|
6821
6877
|
for s in shells:
|
6822
|
-
temp_topologies.append(Topology.Triangulate(s, transferDictionaries=transferDictionaries, tolerance=tolerance))
|
6878
|
+
temp_topologies.append(Topology.Triangulate(s, transferDictionaries=transferDictionaries, mode=mode, meshSize=meshSize, tolerance=tolerance))
|
6879
|
+
faces = Cluster.FreeFaces(topology, tolerance=tolerance) or []
|
6880
|
+
for f in faces:
|
6881
|
+
temp_topologies.append(Topology.Triangulate(f, transferDictionaries=transferDictionaries, mode=mode, meshSize=meshSize, tolerance=tolerance))
|
6823
6882
|
if len(temp_topologies) > 0:
|
6824
6883
|
return Cluster.ByTopologies(temp_topologies)
|
6825
6884
|
else:
|
@@ -6837,7 +6896,6 @@ class Topology():
|
|
6837
6896
|
if transferDictionaries:
|
6838
6897
|
selectors.append(Topology.SetDictionary(Face.Centroid(triFace), Topology.Dictionary(aFace)))
|
6839
6898
|
faceTriangles.append(triFace)
|
6840
|
-
|
6841
6899
|
if t == 8 or t == 16: # Face or Shell
|
6842
6900
|
return_topology = Shell.ByFaces(faceTriangles, tolerance=tolerance)
|
6843
6901
|
if transferDictionaries and not return_topology == None:
|
topologicpy/__init__.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: topologicpy
|
3
|
-
Version: 0.5.
|
3
|
+
Version: 0.5.9
|
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
|
@@ -13,21 +13,11 @@ Requires-Python: <3.12,>=3.8
|
|
13
13
|
Description-Content-Type: text/markdown
|
14
14
|
License-File: LICENSE
|
15
15
|
Requires-Dist: numpy
|
16
|
-
Requires-Dist: pandas
|
17
16
|
Requires-Dist: scipy
|
18
|
-
Requires-Dist:
|
19
|
-
Requires-Dist: ifcopenshell
|
20
|
-
Requires-Dist: ladybug
|
21
|
-
Requires-Dist: honeybee
|
22
|
-
Requires-Dist: honeybee-energy
|
23
|
-
Requires-Dist: networkx
|
24
|
-
Requires-Dist: openstudio
|
17
|
+
Requires-Dist: pandas
|
25
18
|
Requires-Dist: tqdm
|
26
19
|
Requires-Dist: plotly
|
27
|
-
Requires-Dist: pyvis
|
28
20
|
Requires-Dist: lark
|
29
|
-
Requires-Dist: webcolors
|
30
|
-
Requires-Dist: rdflib
|
31
21
|
|
32
22
|
# topologicpy
|
33
23
|
|
@@ -2,14 +2,14 @@ topologicpy/Aperture.py,sha256=vENYlFaM6Pu-xCJB1YsW1I1_u5yDj-A70aU3bo3lpFA,2819
|
|
2
2
|
topologicpy/Cell.py,sha256=qA-53s0ZDKzjaasRSuXuK-a55pZMORGHCw3uJ83k1Is,98603
|
3
3
|
topologicpy/CellComplex.py,sha256=en_cLuUIB1YkHdtUo3fkB3XTIfsA0YRqZTSPqG6qGLQ,47389
|
4
4
|
topologicpy/Cluster.py,sha256=Lg6d6wQ-hbPu-YAsprJmjXki8PTFcTnRgHmk9gjx60k,54978
|
5
|
-
topologicpy/Color.py,sha256=
|
5
|
+
topologicpy/Color.py,sha256=AnbSF-_8c7Zp0NKmHF3ydFxYJFA6IaPxuPKhQkamPfg,18454
|
6
6
|
topologicpy/Context.py,sha256=bgwslZSu8Ijuz3fusdhP6XcDnCdwGhtbI0-uhVjB36U,2977
|
7
|
-
topologicpy/DGL.py,sha256
|
8
|
-
topologicpy/Dictionary.py,sha256=
|
7
|
+
topologicpy/DGL.py,sha256=mpHcfAL8hWGKQFODRv_Qr1KezAP4fmXMvItmgSyimrA,143369
|
8
|
+
topologicpy/Dictionary.py,sha256=pvZL9N-pqyYGH6iODETvSd0nNOfHzxB6DkkgUTylZFs,26918
|
9
9
|
topologicpy/Edge.py,sha256=ZWR2icdFd7dMe8v-RPLAvg1C29hFFsMDBDlp85hluQk,50261
|
10
|
-
topologicpy/EnergyModel.py,sha256=
|
11
|
-
topologicpy/Face.py,sha256=
|
12
|
-
topologicpy/Graph.py,sha256=
|
10
|
+
topologicpy/EnergyModel.py,sha256=SrUF1bShYJdryPcpi6rnECnqurXh09N7e4qCNkB9REc,51396
|
11
|
+
topologicpy/Face.py,sha256=xcVn0QfhSrxriDlp7h9NurqNh40KSTSUFlMGKf5V5y8,90780
|
12
|
+
topologicpy/Graph.py,sha256=OiPLS4kuOHGv2maCDwM6amhEmq_EI-qhYf8l673Bs6g,372759
|
13
13
|
topologicpy/Grid.py,sha256=5Wi7nF6axNqhr4WrWk1c1fb7nftG02-BzxTYneeGr88,17389
|
14
14
|
topologicpy/Helper.py,sha256=dsMU4BAt6zKsYG-YiT_OE4kX2rq3dtl3AqMMd35-6DA,18250
|
15
15
|
topologicpy/Honeybee.py,sha256=p5OZi8tGPxUNH91_8peChEkYJdg5vpRyeqHVz8S9OS0,20356
|
@@ -19,11 +19,11 @@ topologicpy/Plotly.py,sha256=WfYMljK6drw98Q6DRCYCeCtu5X0bhVyIr_NxYea8oUE,94962
|
|
19
19
|
topologicpy/Polyskel.py,sha256=86B92P50crA5OU1wJHYm-21aATkgc2rfkINJ0FwtIek,16465
|
20
20
|
topologicpy/Shell.py,sha256=iB6xltLq9naiArVKfzHdAhv07kwQHOPYniHh944JHcM,76277
|
21
21
|
topologicpy/Speckle.py,sha256=3148ucY8YUrlEsUA3nryKmQqz2zcS3OCtAcxcYpzKkk,14775
|
22
|
-
topologicpy/Topology.py,sha256=
|
22
|
+
topologicpy/Topology.py,sha256=GYBlNEXP9pgZtzP6bVGr_u-ak5_93f29kqGXXUy4HVU,309634
|
23
23
|
topologicpy/Vector.py,sha256=3GayjTGJDhg6yuchN86yHWUV9hTyu-kp_HaWuBXu6fc,30476
|
24
24
|
topologicpy/Vertex.py,sha256=Te0RmdRQba1I21FcrAqlbJblUzJ07Xk44FKJiNtlgkw,66492
|
25
25
|
topologicpy/Wire.py,sha256=bD8uhOzsH6_NWgDtGtW84PNKWscsVOpmbYul9k8ShfU,131871
|
26
|
-
topologicpy/__init__.py,sha256=
|
26
|
+
topologicpy/__init__.py,sha256=46qRjTP5apsz37sasV3Q2WBe2Wi0BssqQCdFK0EhTFA,1444
|
27
27
|
topologicpy/bin/linux/topologic/__init__.py,sha256=XlFReDf3FWlYdM9uXtanYPIafgPb6GVTQczS_xJAXD0,60
|
28
28
|
topologicpy/bin/linux/topologic/libTKBO-6bdf205d.so.7.7.0,sha256=ANok9DQKcnWcLd9T_LAt-i-X4nsYYy16q9kQlcTre1E,2996488
|
29
29
|
topologicpy/bin/linux/topologic/libTKBRep-2960a069.so.7.7.0,sha256=OJ3XesL79du8LeBHrsleGPXub6OpJdOilxha0mwjqQo,1378768
|
@@ -84,8 +84,8 @@ topologicpy/bin/windows/topologic/topologic.cp310-win_amd64.pyd,sha256=F0sPLuMpD
|
|
84
84
|
topologicpy/bin/windows/topologic/topologic.cp311-win_amd64.pyd,sha256=aBAJQj3OmJ58MOAF1ZIFybL_5fFK7FNR9hrIps6b6pc,1551872
|
85
85
|
topologicpy/bin/windows/topologic/topologic.cp38-win_amd64.pyd,sha256=aLgNf54nbJmGc7Tdmkuy-V0m6B9zLxabIbpRwAy7cBA,1551360
|
86
86
|
topologicpy/bin/windows/topologic/topologic.cp39-win_amd64.pyd,sha256=_8cp205hiRxkFHtzQQOweA4DhCPk8caH4kTVLWGQeVw,1411584
|
87
|
-
topologicpy-0.5.
|
88
|
-
topologicpy-0.5.
|
89
|
-
topologicpy-0.5.
|
90
|
-
topologicpy-0.5.
|
91
|
-
topologicpy-0.5.
|
87
|
+
topologicpy-0.5.9.dist-info/LICENSE,sha256=RUmXeeqj63bBySLJjEfhwb9OE7M8h9K6HuOBF3ASVyI,35697
|
88
|
+
topologicpy-0.5.9.dist-info/METADATA,sha256=oXQy1lAyNEUFLJ3Owg8sWLoQi8X_mOBqlgmbp7NU-Lo,7044
|
89
|
+
topologicpy-0.5.9.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
90
|
+
topologicpy-0.5.9.dist-info/top_level.txt,sha256=J30bDzW92Ob7hw3zA8V34Jlp-vvsfIkGzkr8sqvb4Uw,12
|
91
|
+
topologicpy-0.5.9.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|