topologicpy 0.5.6__py3-none-any.whl → 0.5.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/Dictionary.py +51 -0
- topologicpy/Face.py +21 -14
- topologicpy/Graph.py +355 -112
- topologicpy/Topology.py +60 -16
- topologicpy/__init__.py +1 -1
- {topologicpy-0.5.6.dist-info → topologicpy-0.5.8.dist-info}/METADATA +1 -1
- {topologicpy-0.5.6.dist-info → topologicpy-0.5.8.dist-info}/RECORD +10 -10
- {topologicpy-0.5.6.dist-info → topologicpy-0.5.8.dist-info}/LICENSE +0 -0
- {topologicpy-0.5.6.dist-info → topologicpy-0.5.8.dist-info}/WHEEL +0 -0
- {topologicpy-0.5.6.dist-info → topologicpy-0.5.8.dist-info}/top_level.txt +0 -0
topologicpy/Topology.py
CHANGED
@@ -3541,7 +3541,7 @@ class Topology():
|
|
3541
3541
|
return False
|
3542
3542
|
|
3543
3543
|
@staticmethod
|
3544
|
-
def Fix(topology, topologyType: str ="CellComplex", tolerance: float = 0.0001):
|
3544
|
+
def Fix(topology, topologyType: str = "CellComplex", tolerance: float = 0.0001):
|
3545
3545
|
"""
|
3546
3546
|
Attempts to fix the input topology to matched the desired output type.
|
3547
3547
|
|
@@ -3951,7 +3951,7 @@ class Topology():
|
|
3951
3951
|
return json_string
|
3952
3952
|
|
3953
3953
|
@staticmethod
|
3954
|
-
def OBJString(topology, transposeAxes=True, mantissa=6, tolerance=0.0001):
|
3954
|
+
def OBJString(topology, transposeAxes: bool = True, mode: int = 0, meshSize: float = None, mantissa: int = 6, tolerance: float = 0.0001):
|
3955
3955
|
"""
|
3956
3956
|
Returns the Wavefront string of the input topology. This is very experimental and outputs a simple solid topology.
|
3957
3957
|
|
@@ -3961,6 +3961,21 @@ class Topology():
|
|
3961
3961
|
The input topology.
|
3962
3962
|
transposeAxes : bool , optional
|
3963
3963
|
If set to True the Z and Y coordinates are transposed so that Y points "up"
|
3964
|
+
mode : int , optional
|
3965
|
+
The desired mode of meshing algorithm. Several options are available:
|
3966
|
+
0: Classic
|
3967
|
+
1: MeshAdapt
|
3968
|
+
3: Initial Mesh Only
|
3969
|
+
5: Delaunay
|
3970
|
+
6: Frontal-Delaunay
|
3971
|
+
7: BAMG
|
3972
|
+
8: Fontal-Delaunay for Quads
|
3973
|
+
9: Packing of Parallelograms
|
3974
|
+
All options other than 0 (Classic) use the gmsh library. See https://gmsh.info/doc/texinfo/gmsh.html#Mesh-options
|
3975
|
+
WARNING: The options that use gmsh can be very time consuming and can create very heavy geometry.
|
3976
|
+
meshSize : float , optional
|
3977
|
+
The desired size of the mesh when using the "mesh" option. If set to None, it will be
|
3978
|
+
calculated automatically and set to 10% of the overall size of the face.
|
3964
3979
|
mantissa : int , optional
|
3965
3980
|
The desired length of the mantissa. The default is 6.
|
3966
3981
|
tolerance : float , optional
|
@@ -3983,7 +3998,7 @@ class Topology():
|
|
3983
3998
|
lines = []
|
3984
3999
|
version = Helper.Version()
|
3985
4000
|
lines.append("# topologicpy "+version)
|
3986
|
-
topology = Topology.Triangulate(topology, tolerance=tolerance)
|
4001
|
+
topology = Topology.Triangulate(topology, mode=mode, meshSize=meshSize, tolerance=tolerance)
|
3987
4002
|
d = Topology.Geometry(topology, mantissa=mantissa)
|
3988
4003
|
vertices = d['vertices']
|
3989
4004
|
faces = d['faces']
|
@@ -4005,7 +4020,7 @@ class Topology():
|
|
4005
4020
|
return finalLines
|
4006
4021
|
|
4007
4022
|
@staticmethod
|
4008
|
-
def ExportToOBJ(topology, path, transposeAxes=True, overwrite=False):
|
4023
|
+
def ExportToOBJ(topology, path, transposeAxes: bool = True, mode: int = 0, meshSize: float = None, overwrite: bool = False, mantissa: int = 6, tolerance: float = 0.0001):
|
4009
4024
|
"""
|
4010
4025
|
Exports the input topology to a Wavefront OBJ file. This is very experimental and outputs a simple solid topology.
|
4011
4026
|
|
@@ -4016,7 +4031,26 @@ class Topology():
|
|
4016
4031
|
path : str
|
4017
4032
|
The input file path.
|
4018
4033
|
transposeAxes : bool , optional
|
4019
|
-
If set to True the Z and Y coordinates are transposed so that Y points "up"
|
4034
|
+
If set to True the Z and Y coordinates are transposed so that Y points "up"
|
4035
|
+
mode : int , optional
|
4036
|
+
The desired mode of meshing algorithm. Several options are available:
|
4037
|
+
0: Classic
|
4038
|
+
1: MeshAdapt
|
4039
|
+
3: Initial Mesh Only
|
4040
|
+
5: Delaunay
|
4041
|
+
6: Frontal-Delaunay
|
4042
|
+
7: BAMG
|
4043
|
+
8: Fontal-Delaunay for Quads
|
4044
|
+
9: Packing of Parallelograms
|
4045
|
+
All options other than 0 (Classic) use the gmsh library. See https://gmsh.info/doc/texinfo/gmsh.html#Mesh-options
|
4046
|
+
WARNING: The options that use gmsh can be very time consuming and can create very heavy geometry.
|
4047
|
+
meshSize : float , optional
|
4048
|
+
The desired size of the mesh when using the "mesh" option. If set to None, it will be
|
4049
|
+
calculated automatically and set to 10% of the overall size of the face.
|
4050
|
+
mantissa : int , optional
|
4051
|
+
The desired length of the mantissa. The default is 6.
|
4052
|
+
tolerance : float , optional
|
4053
|
+
The desired tolerance. The default is 0.0001.
|
4020
4054
|
overwrite : bool , optional
|
4021
4055
|
If set to True the ouptut file will overwrite any pre-existing file. Otherwise, it won't. The default is False.
|
4022
4056
|
|
@@ -4040,7 +4074,7 @@ class Topology():
|
|
4040
4074
|
if ext.lower() != ".obj":
|
4041
4075
|
path = path+".obj"
|
4042
4076
|
status = False
|
4043
|
-
objString = Topology.OBJString(topology, transposeAxes=transposeAxes)
|
4077
|
+
objString = Topology.OBJString(topology, transposeAxes=transposeAxes, mode=mode, meshSize=meshSize, mantissa=mantissa, tolerance=tolerance)
|
4044
4078
|
with open(path, "w") as f:
|
4045
4079
|
f.writelines(objString)
|
4046
4080
|
f.close()
|
@@ -5175,7 +5209,7 @@ class Topology():
|
|
5175
5209
|
return new_topology
|
5176
5210
|
|
5177
5211
|
@staticmethod
|
5178
|
-
def Rotate(topology, origin=None, axis: list = [0, 0, 1], angle: float = 0, angTolerance: float =0.001, tolerance: float =0.0001):
|
5212
|
+
def Rotate(topology, origin=None, axis: list = [0, 0, 1], angle: float = 0, angTolerance: float = 0.001, tolerance: float = 0.0001):
|
5179
5213
|
"""
|
5180
5214
|
Rotates the input topology
|
5181
5215
|
|
@@ -6771,7 +6805,7 @@ class Topology():
|
|
6771
6805
|
|
6772
6806
|
|
6773
6807
|
@staticmethod
|
6774
|
-
def Triangulate(topology, transferDictionaries: bool = False, mode:
|
6808
|
+
def Triangulate(topology, transferDictionaries: bool = False, mode: int = 0, meshSize: float = None, tolerance: float = 0.0001):
|
6775
6809
|
"""
|
6776
6810
|
Triangulates the input topology.
|
6777
6811
|
|
@@ -6781,9 +6815,18 @@ class Topology():
|
|
6781
6815
|
The input topologgy.
|
6782
6816
|
transferDictionaries : bool , optional
|
6783
6817
|
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
|
-
|
6818
|
+
mode : int , optional
|
6819
|
+
The desired mode of meshing algorithm. Several options are available:
|
6820
|
+
0: Classic
|
6821
|
+
1: MeshAdapt
|
6822
|
+
3: Initial Mesh Only
|
6823
|
+
5: Delaunay
|
6824
|
+
6: Frontal-Delaunay
|
6825
|
+
7: BAMG
|
6826
|
+
8: Fontal-Delaunay for Quads
|
6827
|
+
9: Packing of Parallelograms
|
6828
|
+
All options other than 0 (Classic) use the gmsh library. See https://gmsh.info/doc/texinfo/gmsh.html#Mesh-options
|
6829
|
+
WARNING: The options that use gmsh can be very time consuming and can create very heavy geometry.
|
6787
6830
|
meshSize : float , optional
|
6788
6831
|
The desired size of the mesh when using the "mesh" option. If set to None, it will be
|
6789
6832
|
calculated automatically and set to 10% of the overall size of the face.
|
@@ -6801,7 +6844,6 @@ class Topology():
|
|
6801
6844
|
from topologicpy.Cell import Cell
|
6802
6845
|
from topologicpy.CellComplex import CellComplex
|
6803
6846
|
from topologicpy.Cluster import Cluster
|
6804
|
-
from topologicpy.Dictionary import Dictionary
|
6805
6847
|
|
6806
6848
|
if not isinstance(topology, topologic.Topology):
|
6807
6849
|
print("Topology.Triangulate - Error: The input parameter is not a valid topology. Returning None.")
|
@@ -6813,13 +6855,16 @@ class Topology():
|
|
6813
6855
|
temp_topologies = []
|
6814
6856
|
cellComplexes = Topology.SubTopologies(topology, subTopologyType="cellcomplex") or []
|
6815
6857
|
for cc in cellComplexes:
|
6816
|
-
temp_topologies.append(Topology.Triangulate(cc, transferDictionaries=transferDictionaries, tolerance=tolerance))
|
6858
|
+
temp_topologies.append(Topology.Triangulate(cc, transferDictionaries=transferDictionaries, mode=mode, meshSize=meshSize, tolerance=tolerance))
|
6817
6859
|
cells = Cluster.FreeCells(topology, tolerance=tolerance) or []
|
6818
6860
|
for c in cells:
|
6819
|
-
temp_topologies.append(Topology.Triangulate(c, transferDictionaries=transferDictionaries, tolerance=tolerance))
|
6861
|
+
temp_topologies.append(Topology.Triangulate(c, transferDictionaries=transferDictionaries, mode=mode, meshSize=meshSize, tolerance=tolerance))
|
6820
6862
|
shells = Cluster.FreeShells(topology, tolerance=tolerance) or []
|
6821
6863
|
for s in shells:
|
6822
|
-
temp_topologies.append(Topology.Triangulate(s, transferDictionaries=transferDictionaries, tolerance=tolerance))
|
6864
|
+
temp_topologies.append(Topology.Triangulate(s, transferDictionaries=transferDictionaries, mode=mode, meshSize=meshSize, tolerance=tolerance))
|
6865
|
+
faces = Cluster.FreeFaces(topology, tolerance=tolerance) or []
|
6866
|
+
for f in faces:
|
6867
|
+
temp_topologies.append(Topology.Triangulate(f, transferDictionaries=transferDictionaries, mode=mode, meshSize=meshSize, tolerance=tolerance))
|
6823
6868
|
if len(temp_topologies) > 0:
|
6824
6869
|
return Cluster.ByTopologies(temp_topologies)
|
6825
6870
|
else:
|
@@ -6837,7 +6882,6 @@ class Topology():
|
|
6837
6882
|
if transferDictionaries:
|
6838
6883
|
selectors.append(Topology.SetDictionary(Face.Centroid(triFace), Topology.Dictionary(aFace)))
|
6839
6884
|
faceTriangles.append(triFace)
|
6840
|
-
|
6841
6885
|
if t == 8 or t == 16: # Face or Shell
|
6842
6886
|
return_topology = Shell.ByFaces(faceTriangles, tolerance=tolerance)
|
6843
6887
|
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.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
|
Project-URL: Homepage, https://github.com/wassimj/TopologicPy
|
@@ -5,11 +5,11 @@ topologicpy/Cluster.py,sha256=Lg6d6wQ-hbPu-YAsprJmjXki8PTFcTnRgHmk9gjx60k,54978
|
|
5
5
|
topologicpy/Color.py,sha256=CDKCuQlX1LqBU4d8Xl_Lt_iOiEbCGIkVNFu_IGn_jUw,17094
|
6
6
|
topologicpy/Context.py,sha256=bgwslZSu8Ijuz3fusdhP6XcDnCdwGhtbI0-uhVjB36U,2977
|
7
7
|
topologicpy/DGL.py,sha256=-FDDTANjQb4fBtLHI433_KPmmGlTEPE7boYybXkoPuI,138321
|
8
|
-
topologicpy/Dictionary.py,sha256=
|
8
|
+
topologicpy/Dictionary.py,sha256=3qPs9xHarKaDKUChDBm_xa2uaWz2H4LmpLL-qoSZAZA,26742
|
9
9
|
topologicpy/Edge.py,sha256=ZWR2icdFd7dMe8v-RPLAvg1C29hFFsMDBDlp85hluQk,50261
|
10
10
|
topologicpy/EnergyModel.py,sha256=VPWkMP2uhJORiVqEomb2Dlx5VgKcVUbqnZBZX1IpF_Y,51771
|
11
|
-
topologicpy/Face.py,sha256=
|
12
|
-
topologicpy/Graph.py,sha256=
|
11
|
+
topologicpy/Face.py,sha256=xcVn0QfhSrxriDlp7h9NurqNh40KSTSUFlMGKf5V5y8,90780
|
12
|
+
topologicpy/Graph.py,sha256=O9DCVz_BCbq4irgnTxbpZXigsCvRM25ASAI_NJfw96I,369263
|
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=U1jvO8b4lD-dtOiDGusfkk54jbK5IZ37wKTPDAVwNbg,308976
|
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=WvAlhZfZHLCdW-BIPYBKqbGRZd9A-QcVtr25CyD80-w,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.8.dist-info/LICENSE,sha256=RUmXeeqj63bBySLJjEfhwb9OE7M8h9K6HuOBF3ASVyI,35697
|
88
|
+
topologicpy-0.5.8.dist-info/METADATA,sha256=kkWD8o4Tt1llGphAon3HT6FF3bdviUPOTD78rBv-JeA,7306
|
89
|
+
topologicpy-0.5.8.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
90
|
+
topologicpy-0.5.8.dist-info/top_level.txt,sha256=J30bDzW92Ob7hw3zA8V34Jlp-vvsfIkGzkr8sqvb4Uw,12
|
91
|
+
topologicpy-0.5.8.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|