topologicpy 0.7.45__py3-none-any.whl → 0.7.47__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/Graph.py +43 -7
- topologicpy/Plotly.py +21 -7
- topologicpy/version.py +1 -1
- {topologicpy-0.7.45.dist-info → topologicpy-0.7.47.dist-info}/METADATA +2 -2
- {topologicpy-0.7.45.dist-info → topologicpy-0.7.47.dist-info}/RECORD +8 -8
- {topologicpy-0.7.45.dist-info → topologicpy-0.7.47.dist-info}/LICENSE +0 -0
- {topologicpy-0.7.45.dist-info → topologicpy-0.7.47.dist-info}/WHEEL +0 -0
- {topologicpy-0.7.45.dist-info → topologicpy-0.7.47.dist-info}/top_level.txt +0 -0
topologicpy/Graph.py
CHANGED
@@ -1389,9 +1389,10 @@ class Graph:
|
|
1389
1389
|
# Add edges based on the adjacency matrix
|
1390
1390
|
edges = []
|
1391
1391
|
for i in range(len(adjacencyMatrix)):
|
1392
|
-
for j in range(
|
1393
|
-
if not
|
1394
|
-
|
1392
|
+
for j in range(len(adjacencyMatrix)):
|
1393
|
+
if not i == j:
|
1394
|
+
if not adjacencyMatrix[i][j] == 0:
|
1395
|
+
edges.append(Edge.ByVertices([vertices[i], vertices[j]]))
|
1395
1396
|
|
1396
1397
|
return Graph.ByVerticesEdges(vertices, edges)
|
1397
1398
|
|
@@ -4318,6 +4319,7 @@ class Graph:
|
|
4318
4319
|
d = Graph.TopologicalDistance(graph, va, vb, tolerance)
|
4319
4320
|
top_dist += d
|
4320
4321
|
if top_dist == 0:
|
4322
|
+
print("Topological Distance is Zero!!")
|
4321
4323
|
scores.append(0)
|
4322
4324
|
else:
|
4323
4325
|
scores.append(round((n-1)/top_dist, mantissa))
|
@@ -7993,9 +7995,39 @@ class Graph:
|
|
7993
7995
|
return shortestPaths
|
7994
7996
|
|
7995
7997
|
@staticmethod
|
7996
|
-
def Show(graph, vertexColor="black",
|
7997
|
-
|
7998
|
-
|
7998
|
+
def Show(graph, vertexColor="black",
|
7999
|
+
vertexSize=6,
|
8000
|
+
vertexLabelKey=None,
|
8001
|
+
vertexGroupKey=None,
|
8002
|
+
vertexGroups=[],
|
8003
|
+
showVertices=True,
|
8004
|
+
showVertexLabels=False,
|
8005
|
+
showVertexLegend=False,
|
8006
|
+
edgeColor="black",
|
8007
|
+
edgeWidth=1,
|
8008
|
+
edgeLabelKey=None,
|
8009
|
+
edgeGroupKey=None,
|
8010
|
+
edgeGroups=[],
|
8011
|
+
showEdges=True,
|
8012
|
+
showEdgeLabels=False,
|
8013
|
+
showEdgeLegend=False,
|
8014
|
+
colorScale='viridis',
|
8015
|
+
renderer=None,
|
8016
|
+
width=950,
|
8017
|
+
height=500,
|
8018
|
+
xAxis=False,
|
8019
|
+
yAxis=False,
|
8020
|
+
zAxis=False,
|
8021
|
+
axisSize=1,
|
8022
|
+
backgroundColor='rgba(0,0,0,0)',
|
8023
|
+
marginLeft=0,
|
8024
|
+
marginRight=0,
|
8025
|
+
marginTop=20,
|
8026
|
+
marginBottom=0,
|
8027
|
+
camera=[-1.25, -1.25, 1.25],
|
8028
|
+
center=[0, 0, 0], up=[0, 0, 1],
|
8029
|
+
projection="perspective",
|
8030
|
+
tolerance=0.0001):
|
7999
8031
|
"""
|
8000
8032
|
Shows the graph using Plotly.
|
8001
8033
|
|
@@ -8021,6 +8053,8 @@ class Graph:
|
|
8021
8053
|
The list of vertex groups against which to index the color of the vertex. The default is [].
|
8022
8054
|
showVertices : bool , optional
|
8023
8055
|
If set to True the vertices will be drawn. Otherwise, they will not be drawn. The default is True.
|
8056
|
+
showVertexLabels : bool , optional
|
8057
|
+
If set to True, the vertex labels are shown permenantely on screen. Otherwise, they are not. The default is False.
|
8024
8058
|
showVertexLegend : bool , optional
|
8025
8059
|
If set to True the vertex legend will be drawn. Otherwise, it will not be drawn. The default is False.
|
8026
8060
|
edgeColor : str , optional
|
@@ -8041,6 +8075,8 @@ class Graph:
|
|
8041
8075
|
The list of edge groups against which to index the color of the edge. The default is [].
|
8042
8076
|
showEdges : bool , optional
|
8043
8077
|
If set to True the edges will be drawn. Otherwise, they will not be drawn. The default is True.
|
8078
|
+
showEdgeLabels : bool , optional
|
8079
|
+
If set to True, the edge labels are shown permenantely on screen. Otherwise, they are not. The default is False.
|
8044
8080
|
showEdgeLegend : bool , optional
|
8045
8081
|
If set to True the edge legend will be drawn. Otherwise, it will not be drawn. The default is False.
|
8046
8082
|
colorScale : str , optional
|
@@ -8099,7 +8135,7 @@ class Graph:
|
|
8099
8135
|
print("Graph.Show - Error: The input graph is not a valid graph. Returning None.")
|
8100
8136
|
return None
|
8101
8137
|
|
8102
|
-
data= Plotly.DataByGraph(graph, vertexColor=vertexColor, vertexSize=vertexSize, vertexLabelKey=vertexLabelKey, vertexGroupKey=vertexGroupKey, vertexGroups=vertexGroups, showVertices=showVertices, showVertexLegend=showVertexLegend, edgeColor=edgeColor, edgeWidth=edgeWidth, edgeLabelKey=edgeLabelKey, edgeGroupKey=edgeGroupKey, edgeGroups=edgeGroups, showEdges=showEdges, showEdgeLegend=showEdgeLegend, colorScale=colorScale)
|
8138
|
+
data= Plotly.DataByGraph(graph, vertexColor=vertexColor, vertexSize=vertexSize, vertexLabelKey=vertexLabelKey, vertexGroupKey=vertexGroupKey, vertexGroups=vertexGroups, showVertices=showVertices, showVertexLabels=showVertexLabels, showVertexLegend=showVertexLegend, edgeColor=edgeColor, edgeWidth=edgeWidth, edgeLabelKey=edgeLabelKey, edgeGroupKey=edgeGroupKey, edgeGroups=edgeGroups, showEdges=showEdges, showEdgeLabels=showEdgeLabels, showEdgeLegend=showEdgeLegend, colorScale=colorScale)
|
8103
8139
|
fig = Plotly.FigureByData(data, width=width, height=height, xAxis=xAxis, yAxis=yAxis, zAxis=zAxis, axisSize=axisSize, backgroundColor=backgroundColor,
|
8104
8140
|
marginLeft=marginLeft, marginRight=marginRight, marginTop=marginTop, marginBottom=marginBottom, tolerance=tolerance)
|
8105
8141
|
Plotly.Show(fig, renderer=renderer, camera=camera, center=center, up=up, projection=projection)
|
topologicpy/Plotly.py
CHANGED
@@ -279,6 +279,7 @@ class Plotly:
|
|
279
279
|
vertexGroupKey: str = None,
|
280
280
|
vertexGroups: list = [],
|
281
281
|
showVertices: bool = True,
|
282
|
+
showVertexLabels: bool = False,
|
282
283
|
showVertexLegend: bool = False,
|
283
284
|
edgeColor: str = "black",
|
284
285
|
edgeWidth: float = 1,
|
@@ -286,6 +287,7 @@ class Plotly:
|
|
286
287
|
edgeGroupKey: str = None,
|
287
288
|
edgeGroups: list = [],
|
288
289
|
showEdges: bool = True,
|
290
|
+
showEdgeLabels: bool = False,
|
289
291
|
showEdgeLegend: bool = False,
|
290
292
|
colorScale: str = "viridis",
|
291
293
|
mantissa: int = 6):
|
@@ -314,6 +316,8 @@ class Plotly:
|
|
314
316
|
The list of vertex groups against which to index the color of the vertex. The default is [].
|
315
317
|
showVertices : bool , optional
|
316
318
|
If set to True the vertices will be drawn. Otherwise, they will not be drawn. The default is True.
|
319
|
+
showVertexLabels : bool , optional
|
320
|
+
If set to True, the vertex labels are shown permenantely on screen. Otherwise, they are not. The default is False.
|
317
321
|
showVertexLegend : bool , optional
|
318
322
|
If set to True the vertex legend will be drawn. Otherwise, it will not be drawn. The default is False.
|
319
323
|
edgeColor : str , optional
|
@@ -334,6 +338,8 @@ class Plotly:
|
|
334
338
|
The list of groups to use for indexing the color of edges. The default is None.
|
335
339
|
showEdges : bool , optional
|
336
340
|
If set to True the edges will be drawn. Otherwise, they will not be drawn. The default is True.
|
341
|
+
showEdgeLabels : bool , optional
|
342
|
+
If set to True, the edge labels are shown permenantely on screen. Otherwise, they are not. The default is False.
|
337
343
|
showEdgeLegend : bool , optional
|
338
344
|
If set to True the edge legend will be drawn. Otherwise, it will not be drawn. The default is False.
|
339
345
|
colorScale : str , optional
|
@@ -376,11 +382,11 @@ class Plotly:
|
|
376
382
|
v_groupList.append(vertexGroups.index(v_group))
|
377
383
|
except:
|
378
384
|
v_groupList.append(len(vertexGroups))
|
379
|
-
if not v_label == "" and not v_group == "":
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
385
|
+
# if not v_label == "" and not v_group == "":
|
386
|
+
# if v_group == 0:
|
387
|
+
# v_label = v_label+" (0)"
|
388
|
+
# else:
|
389
|
+
# v_label = v_label+" ("+str(v_group)+")"
|
384
390
|
v_labels.append(v_label)
|
385
391
|
else:
|
386
392
|
for v in vertices:
|
@@ -391,10 +397,14 @@ class Plotly:
|
|
391
397
|
v_groupList = vertexColor
|
392
398
|
if len(v_labels) < 1:
|
393
399
|
v_labels = ""
|
400
|
+
if showVertexLabels == True:
|
401
|
+
mode = "markers+text"
|
402
|
+
else:
|
403
|
+
mode = "markers"
|
394
404
|
v_trace=go.Scatter3d(x=Xn,
|
395
405
|
y=Yn,
|
396
406
|
z=Zn,
|
397
|
-
mode=
|
407
|
+
mode=mode,
|
398
408
|
name='Graph Vertices',
|
399
409
|
legendgroup=4,
|
400
410
|
legendrank=4,
|
@@ -457,10 +467,14 @@ class Plotly:
|
|
457
467
|
if len(e_labels) < 1:
|
458
468
|
e_labels = ""
|
459
469
|
|
470
|
+
if showEdgeLabels == True:
|
471
|
+
mode = "lines+text"
|
472
|
+
else:
|
473
|
+
mode = "lines"
|
460
474
|
e_trace=go.Scatter3d(x=Xe,
|
461
475
|
y=Ye,
|
462
476
|
z=Ze,
|
463
|
-
mode=
|
477
|
+
mode=mode,
|
464
478
|
name='Graph Edges',
|
465
479
|
legendgroup=5,
|
466
480
|
legendrank=5,
|
topologicpy/version.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = '0.7.
|
1
|
+
__version__ = '0.7.47'
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: topologicpy
|
3
|
-
Version: 0.7.
|
3
|
+
Version: 0.7.47
|
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
|
@@ -49,7 +49,7 @@ Requires-Dist: pytest-xdist >=2.4.0 ; extra == 'test'
|
|
49
49
|
|
50
50
|
<img src="https://topologic.app/wp-content/uploads/2023/02/topologicpy-logo-no-loop.gif" alt="topologicpy logo" width="250" loop="1">
|
51
51
|
|
52
|
-
# An
|
52
|
+
# An AI-Powered Spatial Modelling and Analysis Software Library for Architecture, Engineering, and Construction
|
53
53
|
|
54
54
|
## Introduction
|
55
55
|
Welcome to topologicpy (rhymes with apple pie). topologicpy is an open-source python 3 implementation of [Topologic](https://topologic.app) which is a powerful spatial modelling and analysis software library that revolutionizes the way you design architectural spaces, buildings, and artefacts. Topologic's advanced features enable you to create hierarchical and topological information-rich 3D representations that offer unprecedented flexibility and control in your design process. With the integration of geometry, topology, information, and artificial intelligence, Topologic enriches Building Information Models with Building *Intelligence* Models.
|
@@ -10,13 +10,13 @@ topologicpy/Dictionary.py,sha256=KqJ29YyE23Y3Xc6XmKLSCZXRfBvm-OEOxlMZ4dt-rfM,270
|
|
10
10
|
topologicpy/Edge.py,sha256=vhYHkobSLGSWV-oe2oJFFDobqFToDyb7s71yQ840AAA,65166
|
11
11
|
topologicpy/EnergyModel.py,sha256=XcCP55VW5WHDIIKcURijmBOZEgNUDEn_V9h5EejkntA,53876
|
12
12
|
topologicpy/Face.py,sha256=pn0LGusTPKLrHEMhY94_Bs3rc4wUpIyEqyW9q-ftdG0,115379
|
13
|
-
topologicpy/Graph.py,sha256=
|
13
|
+
topologicpy/Graph.py,sha256=1dtcE342b6d7cTiMbtUWWOud6Vu0vHaf4HP2eG_-iqg,402544
|
14
14
|
topologicpy/Grid.py,sha256=3-sn7CHWGcXk18XCnHjsUttNJTWwmN63g_Insj__p04,18218
|
15
15
|
topologicpy/Helper.py,sha256=i-AfI29NMsZXBaymjilfvxQbuS3wpYbpPw4RWu1YCHs,16358
|
16
16
|
topologicpy/Honeybee.py,sha256=vcBECJlgWVjNNdD9ZmjNik_pA1Y_ZNoOorsQb2CiyGA,21965
|
17
17
|
topologicpy/Matrix.py,sha256=umgR7An919-wGInXJ1wpqnoQ2jCPdyMe2rcWTZ16upk,8079
|
18
18
|
topologicpy/Neo4j.py,sha256=YvtF7RYUMATEZ8iHwFwK_MOxEDyARby2DTI2CCK6-cI,19694
|
19
|
-
topologicpy/Plotly.py,sha256=
|
19
|
+
topologicpy/Plotly.py,sha256=o0JWE51lViK-UJUpIpf2Yusk_vTX5hfNMyFXFinKSRg,106048
|
20
20
|
topologicpy/Polyskel.py,sha256=EFsuh2EwQJGPLiFUjvtXmAwdX-A4r_DxP5hF7Qd3PaU,19829
|
21
21
|
topologicpy/PyG.py,sha256=0yeECsMz-dqhhZSv52s_xPCO_3BcEXUK7z1YFDN9qoo,106987
|
22
22
|
topologicpy/Shell.py,sha256=aKdWIAqmLKPyi80f2PtH3_1iMfQRW0Eklbqol9cOPWM,87601
|
@@ -27,9 +27,9 @@ topologicpy/Vector.py,sha256=WQQUbwrg7VKImtxuBUi2i-FRiPT77WlrzLP05gdXKM8,33079
|
|
27
27
|
topologicpy/Vertex.py,sha256=EQdVYHmW85_pZdHZB3N8pEi0GiadCCkF3z_oqohA7B0,71161
|
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=dUV7gU4tNxCy2pDr--lKpOV5DarADBM2ESg5M5mYK6w,23
|
31
|
+
topologicpy-0.7.47.dist-info/LICENSE,sha256=BRNw73R2WdDBICtwhI3wm3cxsaVqLTAGuRwrTltcfxs,1068
|
32
|
+
topologicpy-0.7.47.dist-info/METADATA,sha256=6U-VIKu7gA3coK8iB1LazrQeGV8Wkj-q5Fpf4B9ppM0,10918
|
33
|
+
topologicpy-0.7.47.dist-info/WHEEL,sha256=Mdi9PDNwEZptOjTlUcAth7XJDFtKrHYaQMPulZeBCiQ,91
|
34
|
+
topologicpy-0.7.47.dist-info/top_level.txt,sha256=J30bDzW92Ob7hw3zA8V34Jlp-vvsfIkGzkr8sqvb4Uw,12
|
35
|
+
topologicpy-0.7.47.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|