topologicpy 0.5.4__py3-none-any.whl → 0.5.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- topologicpy/Cell.py +0 -23
- topologicpy/CellComplex.py +0 -3
- topologicpy/Face.py +157 -14
- topologicpy/Graph.py +612 -51
- topologicpy/Plotly.py +2025 -2025
- topologicpy/Topology.py +41 -26
- topologicpy/__init__.py +1 -1
- {topologicpy-0.5.4.dist-info → topologicpy-0.5.6.dist-info}/METADATA +3 -2
- {topologicpy-0.5.4.dist-info → topologicpy-0.5.6.dist-info}/RECORD +12 -12
- {topologicpy-0.5.4.dist-info → topologicpy-0.5.6.dist-info}/LICENSE +0 -0
- {topologicpy-0.5.4.dist-info → topologicpy-0.5.6.dist-info}/WHEEL +0 -0
- {topologicpy-0.5.4.dist-info → topologicpy-0.5.6.dist-info}/top_level.txt +0 -0
topologicpy/Topology.py
CHANGED
@@ -3099,7 +3099,7 @@ class Topology():
|
|
3099
3099
|
return returnObject
|
3100
3100
|
|
3101
3101
|
@staticmethod
|
3102
|
-
def Copy(topology):
|
3102
|
+
def Copy(topology, deep=False):
|
3103
3103
|
"""
|
3104
3104
|
Returns a copy of the input topology
|
3105
3105
|
|
@@ -3107,6 +3107,8 @@ class Topology():
|
|
3107
3107
|
----------
|
3108
3108
|
topology : topologic.Topology
|
3109
3109
|
The input topology.
|
3110
|
+
deep : bool , optional
|
3111
|
+
If set to True, a deep copy will be performed (this is slow). Othwerwise, it will not. The default is False
|
3110
3112
|
|
3111
3113
|
Returns
|
3112
3114
|
-------
|
@@ -3114,10 +3116,18 @@ class Topology():
|
|
3114
3116
|
A copy of the input topology.
|
3115
3117
|
|
3116
3118
|
"""
|
3119
|
+
from topologicpy.Dictionary import Dictionary
|
3117
3120
|
if not isinstance(topology, topologic.Topology):
|
3118
3121
|
print("Topology.Copy - Error: the input topology parameter is not a valid topology. Returning None.")
|
3119
3122
|
return None
|
3120
|
-
|
3123
|
+
if deep:
|
3124
|
+
return Topology.ByJSONString(Topology.JSONString([topology]), progressBar=False)
|
3125
|
+
d = Topology.Dictionary(topology)
|
3126
|
+
return_topology = Topology.ByBREPString(Topology.BREPString(topology))
|
3127
|
+
keys = Dictionary.Keys(d)
|
3128
|
+
if len(keys) > 0:
|
3129
|
+
return_topology = Topology.SetDictionary(return_topology, d)
|
3130
|
+
return return_topology
|
3121
3131
|
|
3122
3132
|
@staticmethod
|
3123
3133
|
def Dictionary(topology):
|
@@ -4322,40 +4332,41 @@ class Topology():
|
|
4322
4332
|
from topologicpy.Cell import Cell
|
4323
4333
|
from topologicpy.CellComplex import CellComplex
|
4324
4334
|
from topologicpy.Aperture import Aperture
|
4335
|
+
|
4325
4336
|
if not isinstance(topology, topologic.Topology):
|
4326
4337
|
print("Topology.InternalVertex - Error: the input topology parameter is not a valid topology. Returning None.")
|
4327
4338
|
return None
|
4328
4339
|
vst = None
|
4329
|
-
|
4330
|
-
if isinstance(
|
4331
|
-
tempCell = Topology.Cells(
|
4340
|
+
top = Topology.Copy(topology)
|
4341
|
+
if isinstance(top, topologic.CellComplex): #CellComplex
|
4342
|
+
tempCell = Topology.Cells(top)[0]
|
4332
4343
|
vst = Cell.InternalVertex(tempCell, tolerance=tolerance)
|
4333
|
-
elif isinstance(
|
4334
|
-
vst = Cell.InternalVertex(
|
4335
|
-
elif isinstance(
|
4336
|
-
tempFace = Topology.Faces(
|
4344
|
+
elif isinstance(top, topologic.Cell): #Cell
|
4345
|
+
vst = Cell.InternalVertex(top, tolerance=tolerance)
|
4346
|
+
elif isinstance(top, topologic.Shell): #Shell
|
4347
|
+
tempFace = Topology.Faces(top)[0]
|
4337
4348
|
vst = Face.InternalVertex(tempFace, tolerance=tolerance)
|
4338
|
-
elif isinstance(
|
4339
|
-
vst = Face.InternalVertex(
|
4340
|
-
elif isinstance(
|
4341
|
-
if
|
4349
|
+
elif isinstance(top, topologic.Face): #Face
|
4350
|
+
vst = Face.InternalVertex(top, tolerance=tolerance)
|
4351
|
+
elif isinstance(top, topologic.Wire): #Wire
|
4352
|
+
if top.IsClosed():
|
4342
4353
|
internalBoundaries = []
|
4343
4354
|
try:
|
4344
|
-
tempFace = topologic.Face.ByExternalInternalBoundaries(
|
4355
|
+
tempFace = topologic.Face.ByExternalInternalBoundaries(top, internalBoundaries)
|
4345
4356
|
vst = Face.InternalVertex(tempFace, tolerance=tolerance)
|
4346
4357
|
except:
|
4347
|
-
vst = Topology.Centroid(
|
4358
|
+
vst = Topology.Centroid(top)
|
4348
4359
|
else:
|
4349
|
-
tempEdge = Topology.Edges(
|
4360
|
+
tempEdge = Topology.Edges(top)[0]
|
4350
4361
|
vst = Edge.VertexByParameter(tempEdge, 0.5)
|
4351
|
-
elif isinstance(
|
4352
|
-
vst = Edge.VertexByParameter(
|
4353
|
-
elif isinstance(
|
4354
|
-
vst =
|
4362
|
+
elif isinstance(top, topologic.Edge): #Edge
|
4363
|
+
vst = Edge.VertexByParameter(top, 0.5)
|
4364
|
+
elif isinstance(top, topologic.Vertex): #Vertex
|
4365
|
+
vst = top
|
4355
4366
|
elif isinstance(topology, topologic.Aperture): #Aperture
|
4356
|
-
vst = Face.InternalVertex(Aperture.Topology(
|
4367
|
+
vst = Face.InternalVertex(Aperture.Topology(top), tolerance)
|
4357
4368
|
else:
|
4358
|
-
vst = Topology.Centroid(
|
4369
|
+
vst = Topology.Centroid(top)
|
4359
4370
|
return vst
|
4360
4371
|
|
4361
4372
|
@staticmethod
|
@@ -5483,8 +5494,6 @@ class Topology():
|
|
5483
5494
|
return None
|
5484
5495
|
if not isinstance(snapshot, topologic.Topology):
|
5485
5496
|
snapshot = Topology.Copy(topology)
|
5486
|
-
d = Topology.Dictionary(topology)
|
5487
|
-
snapshot = Topology.SetDictionary(snapshot, d)
|
5488
5497
|
if not isinstance(snapshot, topologic.Topology):
|
5489
5498
|
if not silent:
|
5490
5499
|
print("Topology.SetSnapshot - Error: The input snapshot parameter is not a valid topology. Returning None.")
|
@@ -6762,7 +6771,7 @@ class Topology():
|
|
6762
6771
|
|
6763
6772
|
|
6764
6773
|
@staticmethod
|
6765
|
-
def Triangulate(topology, transferDictionaries = False, tolerance=0.0001):
|
6774
|
+
def Triangulate(topology, transferDictionaries: bool = False, mode: str ="classic", meshSize: float = None, tolerance: float = 0.0001):
|
6766
6775
|
"""
|
6767
6776
|
Triangulates the input topology.
|
6768
6777
|
|
@@ -6772,6 +6781,12 @@ class Topology():
|
|
6772
6781
|
The input topologgy.
|
6773
6782
|
transferDictionaries : bool , optional
|
6774
6783
|
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 : str , optional
|
6785
|
+
The desired mode of meshing. Two options are available: "classic" and "mesh". They are case insensitive.
|
6786
|
+
The "mesh" option uses the gmsh library.
|
6787
|
+
meshSize : float , optional
|
6788
|
+
The desired size of the mesh when using the "mesh" option. If set to None, it will be
|
6789
|
+
calculated automatically and set to 10% of the overall size of the face.
|
6775
6790
|
tolerance : float , optional
|
6776
6791
|
The desired tolerance. The default is 0.0001.
|
6777
6792
|
|
@@ -6815,7 +6830,7 @@ class Topology():
|
|
6815
6830
|
selectors = []
|
6816
6831
|
for aFace in topologyFaces:
|
6817
6832
|
if len(Topology.Vertices(aFace)) > 3:
|
6818
|
-
triFaces = Face.Triangulate(aFace, tolerance=tolerance)
|
6833
|
+
triFaces = Face.Triangulate(aFace, mode=mode, meshSize=meshSize, tolerance=tolerance)
|
6819
6834
|
else:
|
6820
6835
|
triFaces = [aFace]
|
6821
6836
|
for triFace in triFaces:
|
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.6
|
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
|
@@ -9,7 +9,7 @@ Project-URL: Documentation, https://topologic.app/topologicpy_doc/
|
|
9
9
|
Classifier: Programming Language :: Python :: 3
|
10
10
|
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
11
11
|
Classifier: Operating System :: OS Independent
|
12
|
-
Requires-Python:
|
12
|
+
Requires-Python: <3.12,>=3.8
|
13
13
|
Description-Content-Type: text/markdown
|
14
14
|
License-File: LICENSE
|
15
15
|
Requires-Dist: numpy
|
@@ -27,6 +27,7 @@ Requires-Dist: plotly
|
|
27
27
|
Requires-Dist: pyvis
|
28
28
|
Requires-Dist: lark
|
29
29
|
Requires-Dist: webcolors
|
30
|
+
Requires-Dist: rdflib
|
30
31
|
|
31
32
|
# topologicpy
|
32
33
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
topologicpy/Aperture.py,sha256=vENYlFaM6Pu-xCJB1YsW1I1_u5yDj-A70aU3bo3lpFA,2819
|
2
|
-
topologicpy/Cell.py,sha256=
|
3
|
-
topologicpy/CellComplex.py,sha256=
|
2
|
+
topologicpy/Cell.py,sha256=qA-53s0ZDKzjaasRSuXuK-a55pZMORGHCw3uJ83k1Is,98603
|
3
|
+
topologicpy/CellComplex.py,sha256=en_cLuUIB1YkHdtUo3fkB3XTIfsA0YRqZTSPqG6qGLQ,47389
|
4
4
|
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
|
@@ -8,22 +8,22 @@ topologicpy/DGL.py,sha256=-FDDTANjQb4fBtLHI433_KPmmGlTEPE7boYybXkoPuI,138321
|
|
8
8
|
topologicpy/Dictionary.py,sha256=vGhiXPu7e7GsgQyTsX6rZBncnnrDlcYfM9xRb9h-l3U,24799
|
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=H1D232WC410G4IeZ7NJS0pmHS1ASnuTQaQqjV84-UlI,90509
|
12
|
+
topologicpy/Graph.py,sha256=CPODfbTli_vsZnTQTg5Jl9keuPijontjBCzEBSf-f9c,359645
|
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
|
16
16
|
topologicpy/Matrix.py,sha256=1aH7QKP6eNUbUXmZbB7e_4dw1ZSVQ8bsOsKJXtQq3_4,8357
|
17
17
|
topologicpy/Neo4j.py,sha256=4B_lYgZIDztqINkHL_J6gsfkZQ043wEsZpD_9uPYOMU,19356
|
18
|
-
topologicpy/Plotly.py,sha256=
|
18
|
+
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=WbQJbDx966YzbwujFoapnccRCkZvWUtQCP4GvS8gacQ,306191
|
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=2KUp5ucRuCUEOySyMek-SaQ3QUrSADNEEQXUbkKQjZY,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.6.dist-info/LICENSE,sha256=RUmXeeqj63bBySLJjEfhwb9OE7M8h9K6HuOBF3ASVyI,35697
|
88
|
+
topologicpy-0.5.6.dist-info/METADATA,sha256=vLO1U1dmObzRag-UAlRFpReaaBtLOUnhse1uiL5H3Vo,7306
|
89
|
+
topologicpy-0.5.6.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
90
|
+
topologicpy-0.5.6.dist-info/top_level.txt,sha256=J30bDzW92Ob7hw3zA8V34Jlp-vvsfIkGzkr8sqvb4Uw,12
|
91
|
+
topologicpy-0.5.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|