topologicpy 0.5.2__py3-none-any.whl → 0.5.4__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 +112 -112
- topologicpy/CellComplex.py +32 -29
- topologicpy/Cluster.py +3 -3
- topologicpy/Color.py +10 -10
- topologicpy/Edge.py +12 -9
- topologicpy/Face.py +32 -30
- topologicpy/Graph.py +30 -30
- topologicpy/Grid.py +9 -9
- topologicpy/Plotly.py +29 -29
- topologicpy/Shell.py +42 -43
- topologicpy/Speckle.py +1 -1
- topologicpy/Topology.py +58 -62
- topologicpy/Vector.py +36 -36
- topologicpy/Vertex.py +12 -12
- topologicpy/Wire.py +80 -76
- topologicpy/__init__.py +1 -1
- {topologicpy-0.5.2.dist-info → topologicpy-0.5.4.dist-info}/METADATA +1 -1
- {topologicpy-0.5.2.dist-info → topologicpy-0.5.4.dist-info}/RECORD +21 -21
- {topologicpy-0.5.2.dist-info → topologicpy-0.5.4.dist-info}/LICENSE +0 -0
- {topologicpy-0.5.2.dist-info → topologicpy-0.5.4.dist-info}/WHEEL +0 -0
- {topologicpy-0.5.2.dist-info → topologicpy-0.5.4.dist-info}/top_level.txt +0 -0
topologicpy/Graph.py
CHANGED
@@ -337,7 +337,7 @@ class Graph:
|
|
337
337
|
elif (len(gk) < 1) and (len(vk) > 0):
|
338
338
|
d = vd
|
339
339
|
if d:
|
340
|
-
_ = Topology.SetDictionary(gv,d)
|
340
|
+
_ = Topology.SetDictionary(gv, d)
|
341
341
|
unique = False
|
342
342
|
returnVertex = gv
|
343
343
|
break
|
@@ -858,7 +858,7 @@ class Graph:
|
|
858
858
|
# Iterate through the grouped nodes DataFrames
|
859
859
|
for graph_id, group_node_df in grouped_nodes:
|
860
860
|
vertices = []
|
861
|
-
verts = [] #This is a list of x,y,z tuples to make sure the vertices have unique locations.
|
861
|
+
verts = [] #This is a list of x, y, z tuples to make sure the vertices have unique locations.
|
862
862
|
n_verts = 0
|
863
863
|
for index, row in group_node_df.iterrows():
|
864
864
|
n_verts += 1
|
@@ -886,12 +886,12 @@ class Graph:
|
|
886
886
|
y = random.randrange(0,1000)
|
887
887
|
if not isinstance(z, numbers.Number):
|
888
888
|
z = random.randrange(0,1000)
|
889
|
-
while [x,y,z] in verts:
|
889
|
+
while [x, y, z] in verts:
|
890
890
|
x = x + random.randrange(10000,30000,1000)
|
891
891
|
y = y + random.randrange(4000,6000, 100)
|
892
892
|
z = z + random.randrange(70000,90000, 1000)
|
893
|
-
verts.append([x,y,z])
|
894
|
-
v = Vertex.ByCoordinates(x,y,z)
|
893
|
+
verts.append([x, y, z])
|
894
|
+
v = Vertex.ByCoordinates(x, y, z)
|
895
895
|
if isinstance(v, topologic.Vertex):
|
896
896
|
if len(nodeFeaturesKeys) == 0:
|
897
897
|
values = [node_id, label, mask, features]
|
@@ -1247,7 +1247,7 @@ class Graph:
|
|
1247
1247
|
x = random.uniform(xMin,xMax)
|
1248
1248
|
y = random.uniform(yMin,yMax)
|
1249
1249
|
z = random.uniform(zMin,zMax)
|
1250
|
-
centroid = Vertex.ByCoordinates(x,y,z)
|
1250
|
+
centroid = Vertex.ByCoordinates(x, y, z)
|
1251
1251
|
d = Dictionary.ByKeysValues(["id","psets", "type", "type_id", "name", "label"], [obj_id, psets, obj_type, obj_type_id, name, label])
|
1252
1252
|
centroid = Topology.SetDictionary(centroid, d)
|
1253
1253
|
return centroid
|
@@ -1375,9 +1375,9 @@ class Graph:
|
|
1375
1375
|
Parameters
|
1376
1376
|
----------
|
1377
1377
|
vertices : list
|
1378
|
-
The list of [x,y,z] coordinates of the vertices/
|
1378
|
+
The list of [x, y, z] coordinates of the vertices/
|
1379
1379
|
edges : list
|
1380
|
-
the list of [i,j] indices into the vertices list to signify and edge that connects vertices[i] to vertices[j].
|
1380
|
+
the list of [i, j] indices into the vertices list to signify and edge that connects vertices[i] to vertices[j].
|
1381
1381
|
vertexDictionaries : list , optional
|
1382
1382
|
The python dictionaries of the vertices (in the same order as the list of vertices).
|
1383
1383
|
edgeDictionaries : list , optional
|
@@ -3172,7 +3172,7 @@ class Graph:
|
|
3172
3172
|
for i, v in enumerate(vertices):
|
3173
3173
|
d = Topology.Dictionary(v)
|
3174
3174
|
d = Dictionary.SetValueAtKey(d, newKey, colors[i])
|
3175
|
-
v = Topology.SetDictionary(v,d)
|
3175
|
+
v = Topology.SetDictionary(v, d)
|
3176
3176
|
return graph
|
3177
3177
|
|
3178
3178
|
@staticmethod
|
@@ -3208,8 +3208,8 @@ class Graph:
|
|
3208
3208
|
d1 = Vertex.Distance(vertex, sv)
|
3209
3209
|
d2 = Vertex.Distance(vertex, ev)
|
3210
3210
|
if d1 < d2:
|
3211
|
-
return [ev,1]
|
3212
|
-
return [sv,0]
|
3211
|
+
return [ev, 1]
|
3212
|
+
return [sv, 0]
|
3213
3213
|
if not isinstance(graph, topologic.Graph):
|
3214
3214
|
print("Graph.ContractEdge - Error: The input graph parameter is not a valid graph. Returning None.")
|
3215
3215
|
return None
|
@@ -3905,7 +3905,7 @@ class Graph:
|
|
3905
3905
|
flag = True
|
3906
3906
|
if nodeMaskKey in keys:
|
3907
3907
|
value = Dictionary.ValueAtKey(nd, nodeMaskKey)
|
3908
|
-
if not value in [0,1,2]:
|
3908
|
+
if not value in [0, 1, 2]:
|
3909
3909
|
flag = True
|
3910
3910
|
elif value == 0:
|
3911
3911
|
train_mask = True
|
@@ -3992,7 +3992,7 @@ class Graph:
|
|
3992
3992
|
flag = True
|
3993
3993
|
if edgeMaskKey in keys:
|
3994
3994
|
value = Dictionary.ValueAtKey(ed, edgeMaskKey)
|
3995
|
-
if not value in [0,1,2]:
|
3995
|
+
if not value in [0, 1, 2]:
|
3996
3996
|
flag = True
|
3997
3997
|
elif value == 0:
|
3998
3998
|
train_mask = True
|
@@ -4193,7 +4193,7 @@ class Graph:
|
|
4193
4193
|
source, target = edge_id
|
4194
4194
|
file.write(f'<edge id="{edge_id}" source="{source}" target="{target}" label="{edge_attrs["label"]}">\n')
|
4195
4195
|
if "color" in edge_attrs:
|
4196
|
-
r,g,b = Color.ByCSSNamedColor(edge_attrs["color"])
|
4196
|
+
r, g, b = Color.ByCSSNamedColor(edge_attrs["color"])
|
4197
4197
|
file.write(f'<viz:color r="{r}" g="{g}" b="{b}"/>\n')
|
4198
4198
|
file.write('<attvalues>\n')
|
4199
4199
|
keys = edge_attrs.keys()
|
@@ -4302,7 +4302,7 @@ class Graph:
|
|
4302
4302
|
if not vertex_color in Color.CSSNamedColors():
|
4303
4303
|
vertex_color = defaultVertexColor
|
4304
4304
|
node_dict['color'] = vertex_color
|
4305
|
-
r,g,b = Color.ByCSSNamedColor(vertex_color)
|
4305
|
+
r, g, b = Color.ByCSSNamedColor(vertex_color)
|
4306
4306
|
node_dict['r'] = r
|
4307
4307
|
node_dict['g'] = g
|
4308
4308
|
node_dict['b'] = b
|
@@ -4370,7 +4370,7 @@ class Graph:
|
|
4370
4370
|
edge_color = defaultVertexColor
|
4371
4371
|
edge_dict['color'] = edge_color
|
4372
4372
|
|
4373
|
-
r,g,b = Color.ByCSSNamedColor(edge_color)
|
4373
|
+
r, g, b = Color.ByCSSNamedColor(edge_color)
|
4374
4374
|
edge_dict['r'] = r
|
4375
4375
|
edge_dict['g'] = g
|
4376
4376
|
edge_dict['b'] = b
|
@@ -4887,7 +4887,7 @@ class Graph:
|
|
4887
4887
|
return graph.GetGUID()
|
4888
4888
|
|
4889
4889
|
@staticmethod
|
4890
|
-
def IncomingEdges(graph: topologic.Graph, vertex: topologic.Vertex, directed: bool=False, tolerance: float=0.0001) -> list:
|
4890
|
+
def IncomingEdges(graph: topologic.Graph, vertex: topologic.Vertex, directed: bool = False, tolerance: float = 0.0001) -> list:
|
4891
4891
|
"""
|
4892
4892
|
Returns the incoming edges connected to a vertex. An edge is considered incoming if its end vertex is
|
4893
4893
|
coincident with the input vertex.
|
@@ -4928,7 +4928,7 @@ class Graph:
|
|
4928
4928
|
return incoming_edges
|
4929
4929
|
|
4930
4930
|
@staticmethod
|
4931
|
-
def IncomingVertices(graph: topologic.Graph, vertex: topologic.Vertex, directed: bool=False, tolerance: float=0.0001) -> list:
|
4931
|
+
def IncomingVertices(graph: topologic.Graph, vertex: topologic.Vertex, directed: bool = False, tolerance: float = 0.0001) -> list:
|
4932
4932
|
"""
|
4933
4933
|
Returns the incoming vertices connected to a vertex. A vertex is considered incoming if it is an adjacent vertex to the input vertex
|
4934
4934
|
and the the edge connecting it to the input vertex is an incoming edge.
|
@@ -5146,7 +5146,7 @@ class Graph:
|
|
5146
5146
|
j_data = {}
|
5147
5147
|
j_data['nodes'] = {}
|
5148
5148
|
j_data['edges'] = {}
|
5149
|
-
n = len(str(len(vertices)))
|
5149
|
+
n = max(len(str(len(vertices))), 4)
|
5150
5150
|
v_labels = []
|
5151
5151
|
v_dicts = []
|
5152
5152
|
for i, v in enumerate(vertices):
|
@@ -5534,7 +5534,7 @@ class Graph:
|
|
5534
5534
|
keys.append(residualKey)
|
5535
5535
|
values.append(residual)
|
5536
5536
|
d = Dictionary.ByKeysValues(keys, values)
|
5537
|
-
edge = Topology.SetDictionary(edge,d)
|
5537
|
+
edge = Topology.SetDictionary(edge, d)
|
5538
5538
|
return max_flow
|
5539
5539
|
|
5540
5540
|
@staticmethod
|
@@ -5551,8 +5551,8 @@ class Graph:
|
|
5551
5551
|
-------
|
5552
5552
|
dict
|
5553
5553
|
The python dictionary of the mesh data of the input graph. The keys in the dictionary are:
|
5554
|
-
'vertices' : The list of [x,y,z] coordinates of the vertices.
|
5555
|
-
'edges' : the list of [i,j] indices into the vertices list to signify and edge that connects vertices[i] to vertices[j].
|
5554
|
+
'vertices' : The list of [x, y, z] coordinates of the vertices.
|
5555
|
+
'edges' : the list of [i, j] indices into the vertices list to signify and edge that connects vertices[i] to vertices[j].
|
5556
5556
|
'vertexDictionaries' : The python dictionaries of the vertices (in the same order as the list of vertices).
|
5557
5557
|
'edgeDictionaries' : The python dictionaries of the edges (in the same order as the list of edges).
|
5558
5558
|
|
@@ -5898,7 +5898,7 @@ class Graph:
|
|
5898
5898
|
return len(Graph.Vertices(graph))
|
5899
5899
|
|
5900
5900
|
@staticmethod
|
5901
|
-
def OutgoingEdges(graph: topologic.Graph, vertex: topologic.Vertex, directed: bool=False, tolerance: float=0.0001) -> list:
|
5901
|
+
def OutgoingEdges(graph: topologic.Graph, vertex: topologic.Vertex, directed: bool = False, tolerance: float = 0.0001) -> list:
|
5902
5902
|
"""
|
5903
5903
|
Returns the outgoing edges connected to a vertex. An edge is considered outgoing if its start vertex is
|
5904
5904
|
coincident with the input vertex.
|
@@ -5939,7 +5939,7 @@ class Graph:
|
|
5939
5939
|
return outgoing_edges
|
5940
5940
|
|
5941
5941
|
@staticmethod
|
5942
|
-
def OutgoingVertices(graph: topologic.Graph, vertex: topologic.Vertex, directed: bool=False, tolerance: float=0.0001) -> list:
|
5942
|
+
def OutgoingVertices(graph: topologic.Graph, vertex: topologic.Vertex, directed: bool = False, tolerance: float = 0.0001) -> list:
|
5943
5943
|
"""
|
5944
5944
|
Returns the list of outgoing vertices connected to a vertex. A vertex is considered outgoing if it is an adjacent vertex to the input vertex
|
5945
5945
|
and the the edge connecting it to the input vertex is an outgoing edge.
|
@@ -6348,7 +6348,7 @@ class Graph:
|
|
6348
6348
|
@staticmethod
|
6349
6349
|
def ShortestPath(graph, vertexA, vertexB, vertexKey="", edgeKey="Length", tolerance=0.0001):
|
6350
6350
|
"""
|
6351
|
-
Returns the shortest path that connects the input vertices.
|
6351
|
+
Returns the shortest path that connects the input vertices. The shortest path will take into consideration both the vertexKey and the edgeKey if both are specified and will minimize the total "cost" of the path. Otherwise, it will take into consideration only whatever key is specified.
|
6352
6352
|
|
6353
6353
|
Parameters
|
6354
6354
|
----------
|
@@ -6537,7 +6537,7 @@ class Graph:
|
|
6537
6537
|
zAxis : bool , optional
|
6538
6538
|
If set to True the z axis is drawn. Otherwise it is not drawn. The default is False.
|
6539
6539
|
axisSize : float , optional
|
6540
|
-
The size of the X,Y,Z, axes. The default is 1.
|
6540
|
+
The size of the X, Y, Z, axes. The default is 1.
|
6541
6541
|
backgroundColor : str , optional
|
6542
6542
|
The desired color of the background. This can be any plotly color string and may be specified as:
|
6543
6543
|
- A hex string (e.g. '#ff0000')
|
@@ -6555,11 +6555,11 @@ class Graph:
|
|
6555
6555
|
marginBottom : int , optional
|
6556
6556
|
The size in pixels of the bottom margin. The default value is 0.
|
6557
6557
|
camera : list , optional
|
6558
|
-
The desired location of the camera). The default is [-1.25
|
6558
|
+
The desired location of the camera). The default is [-1.25, -1.25, 1.25].
|
6559
6559
|
center : list , optional
|
6560
|
-
The desired center (camera target). The default is [0,0,0].
|
6560
|
+
The desired center (camera target). The default is [0, 0, 0].
|
6561
6561
|
up : list , optional
|
6562
|
-
The desired up vector. The default is [0,0,1].
|
6562
|
+
The desired up vector. The default is [0, 0, 1].
|
6563
6563
|
projection : str , optional
|
6564
6564
|
The desired type of projection. The options are "orthographic" or "perspective". It is case insensitive. The default is "perspective"
|
6565
6565
|
|
@@ -6735,7 +6735,7 @@ class Graph:
|
|
6735
6735
|
return Graph.ByVerticesEdges(dictionary['vertices'], dictionary['edges'])
|
6736
6736
|
|
6737
6737
|
@staticmethod
|
6738
|
-
def VertexDegree(graph : topologic.Graph, vertex: topologic.Vertex, edgeKey: str=None, tolerance: float=0.0001):
|
6738
|
+
def VertexDegree(graph : topologic.Graph, vertex: topologic.Vertex, edgeKey: str = None, tolerance: float = 0.0001):
|
6739
6739
|
"""
|
6740
6740
|
Returns the degree of the input vertex. See https://en.wikipedia.org/wiki/Degree_(graph_theory).
|
6741
6741
|
|
topologicpy/Grid.py
CHANGED
@@ -56,12 +56,12 @@ class Grid(topologic.Cluster):
|
|
56
56
|
return None
|
57
57
|
if not uOrigin:
|
58
58
|
if not isinstance(face, topologic.Face):
|
59
|
-
uOrigin = Vertex.ByCoordinates(0,0,0)
|
59
|
+
uOrigin = Vertex.ByCoordinates(0, 0, 0)
|
60
60
|
else:
|
61
61
|
uOrigin = Face.VertexByParameters(face, 0, 0)
|
62
62
|
if not vOrigin:
|
63
63
|
if not isinstance(face, topologic.Face):
|
64
|
-
vOrigin = Vertex.ByCoordinates(0,0,0)
|
64
|
+
vOrigin = Vertex.ByCoordinates(0, 0, 0)
|
65
65
|
else:
|
66
66
|
vOrigin = Face.VertexByParameters(face, 0, 0)
|
67
67
|
|
@@ -71,9 +71,9 @@ class Grid(topologic.Cluster):
|
|
71
71
|
v3 = Face.VertexByParameters(face, 0, 0)
|
72
72
|
v4 = Face.VertexByParameters(face, 0, 1)
|
73
73
|
else:
|
74
|
-
v1 = Vertex.ByCoordinates(0,0,0)
|
74
|
+
v1 = Vertex.ByCoordinates(0, 0, 0)
|
75
75
|
v2 = Vertex.ByCoordinates(max(uRange),0,0)
|
76
|
-
v3 = Vertex.ByCoordinates(0,0,0)
|
76
|
+
v3 = Vertex.ByCoordinates(0, 0, 0)
|
77
77
|
v4 = Vertex.ByCoordinates(0,max(vRange),0)
|
78
78
|
|
79
79
|
uVector = [v2.X()-v1.X(), v2.Y()-v1.Y(),v2.Z()-v1.Z()]
|
@@ -224,7 +224,7 @@ class Grid(topologic.Cluster):
|
|
224
224
|
face : topologic.Face , optional
|
225
225
|
The input face. If set to None, the grid will be created on the XY plane. The default is None.
|
226
226
|
origin : topologic.Vertex , optional
|
227
|
-
The origin of the grid vertices. If set to None: if the face is set, the origin will be set to vertex at the face's 0,0 paratmer. If the face is set to None, the origin will be set to (0,0,0). The default is None.
|
227
|
+
The origin of the grid vertices. If set to None: if the face is set, the origin will be set to vertex at the face's 0,0 paratmer. If the face is set to None, the origin will be set to (0, 0, 0). The default is None.
|
228
228
|
uRange : list , optional
|
229
229
|
A list of distances for the *u* grid lines from the uOrigin. The default is [-0.5,-0.25,0, 0.25,0.5].
|
230
230
|
vRange : list , optional
|
@@ -251,7 +251,7 @@ class Grid(topologic.Cluster):
|
|
251
251
|
return None
|
252
252
|
if not origin:
|
253
253
|
if not isinstance(face, topologic.Face):
|
254
|
-
origin = Vertex.ByCoordinates(0,0,0)
|
254
|
+
origin = Vertex.ByCoordinates(0, 0, 0)
|
255
255
|
else:
|
256
256
|
origin = Face.VertexByParameters(face, 0, 0)
|
257
257
|
|
@@ -261,9 +261,9 @@ class Grid(topologic.Cluster):
|
|
261
261
|
v3 = Face.VertexByParameters(face, 0, 0)
|
262
262
|
v4 = Face.VertexByParameters(face, 0, 1)
|
263
263
|
else:
|
264
|
-
v1 = Vertex.ByCoordinates(0,0,0)
|
264
|
+
v1 = Vertex.ByCoordinates(0, 0, 0)
|
265
265
|
v2 = Vertex.ByCoordinates(max(uRange),0,0)
|
266
|
-
v3 = Vertex.ByCoordinates(0,0,0)
|
266
|
+
v3 = Vertex.ByCoordinates(0, 0, 0)
|
267
267
|
v4 = Vertex.ByCoordinates(0,max(vRange),0)
|
268
268
|
|
269
269
|
uVector = [v2.X()-v1.X(), v2.Y()-v1.Y(),v2.Z()-v1.Z()]
|
@@ -300,7 +300,7 @@ class Grid(topologic.Cluster):
|
|
300
300
|
face : topologic.Face , optional
|
301
301
|
The input face. If set to None, the grid will be created on the XY plane. The default is None.
|
302
302
|
origin : topologic.Vertex , optional
|
303
|
-
The origin of the grid vertices. If set to None: if the face is set, the origin will be set to vertex at the face's 0,0 paratmer. If the face is set to None, the origin will be set to (0,0,0). The default is None.
|
303
|
+
The origin of the grid vertices. If set to None: if the face is set, the origin will be set to vertex at the face's 0,0 paratmer. If the face is set to None, the origin will be set to (0, 0, 0). The default is None.
|
304
304
|
uRange : list , optional
|
305
305
|
A list of *u* parameters for the *u* grid lines from the uOrigin. The default is [0.0,0.25,0.5,0.75,1.0].
|
306
306
|
vRange : list , optional
|
topologicpy/Plotly.py
CHANGED
@@ -223,7 +223,7 @@ class Plotly:
|
|
223
223
|
"""
|
224
224
|
|
225
225
|
if isinstance(data[labels[0]][0], int):
|
226
|
-
xAxis_list = list(range(1,data[labels[0]][0]+1))
|
226
|
+
xAxis_list = list(range(1, data[labels[0]][0]+1))
|
227
227
|
else:
|
228
228
|
xAxis_list = data[labels[0]][0]
|
229
229
|
plot_data = [xAxis_list]
|
@@ -307,9 +307,9 @@ class Plotly:
|
|
307
307
|
vertices = Graph.Vertices(graph)
|
308
308
|
if vertexLabelKey or vertexGroupKey:
|
309
309
|
for v in vertices:
|
310
|
-
Xn=[round(Vertex.X(v),4) for v in vertices] # x-coordinates of nodes
|
311
|
-
Yn=[round(Vertex.Y(v),4) for v in vertices] # y-coordinates of nodes
|
312
|
-
Zn=[round(Vertex.Z(v),4) for v in vertices] # x-coordinates of nodes
|
310
|
+
Xn=[round(Vertex.X(v), 4) for v in vertices] # x-coordinates of nodes
|
311
|
+
Yn=[round(Vertex.Y(v), 4) for v in vertices] # y-coordinates of nodes
|
312
|
+
Zn=[round(Vertex.Z(v), 4) for v in vertices] # x-coordinates of nodes
|
313
313
|
v_label = ""
|
314
314
|
v_group = ""
|
315
315
|
d = Topology.Dictionary(v)
|
@@ -334,9 +334,9 @@ class Plotly:
|
|
334
334
|
v_labels.append(v_label)
|
335
335
|
else:
|
336
336
|
for v in vertices:
|
337
|
-
Xn=[round(Vertex.X(v),4) for v in vertices] # x-coordinates of nodes
|
338
|
-
Yn=[round(Vertex.Y(v),4) for v in vertices] # y-coordinates of nodes
|
339
|
-
Zn=[round(Vertex.Z(v),4) for v in vertices] # x-coordinates of nodes
|
337
|
+
Xn=[round(Vertex.X(v), 4) for v in vertices] # x-coordinates of nodes
|
338
|
+
Yn=[round(Vertex.Y(v), 4) for v in vertices] # y-coordinates of nodes
|
339
|
+
Zn=[round(Vertex.Z(v), 4) for v in vertices] # x-coordinates of nodes
|
340
340
|
if len(list(set(v_groupList))) < 2:
|
341
341
|
v_groupList = vertexColor
|
342
342
|
if len(v_labels) < 1:
|
@@ -372,9 +372,9 @@ class Plotly:
|
|
372
372
|
for e in edges:
|
373
373
|
sv = Edge.StartVertex(e)
|
374
374
|
ev = Edge.EndVertex(e)
|
375
|
-
Xe+=[round(Vertex.X(sv),4), round(Vertex.X(ev),4), None] # x-coordinates of edge ends
|
376
|
-
Ye+=[round(Vertex.Y(sv),4), round(Vertex.Y(ev),4), None] # y-coordinates of edge ends
|
377
|
-
Ze+=[round(Vertex.Z(sv),4), round(Vertex.Z(ev),4), None] # z-coordinates of edge ends
|
375
|
+
Xe+=[round(Vertex.X(sv), 4), round(Vertex.X(ev), 4), None] # x-coordinates of edge ends
|
376
|
+
Ye+=[round(Vertex.Y(sv), 4), round(Vertex.Y(ev), 4), None] # y-coordinates of edge ends
|
377
|
+
Ze+=[round(Vertex.Z(sv), 4), round(Vertex.Z(ev), 4), None] # z-coordinates of edge ends
|
378
378
|
e_label = ""
|
379
379
|
e_group = ""
|
380
380
|
d = Topology.Dictionary(e)
|
@@ -398,9 +398,9 @@ class Plotly:
|
|
398
398
|
for e in edges:
|
399
399
|
sv = Edge.StartVertex(e)
|
400
400
|
ev = Edge.EndVertex(e)
|
401
|
-
Xe+=[round(Vertex.X(sv),4), round(Vertex.X(ev),4), None] # x-coordinates of edge ends
|
402
|
-
Ye+=[round(Vertex.Y(sv),4), round(Vertex.Y(ev),4), None] # y-coordinates of edge ends
|
403
|
-
Ze+=[round(Vertex.Z(sv),4), round(Vertex.Z(ev),4), None] # z-coordinates of edge ends
|
401
|
+
Xe+=[round(Vertex.X(sv), 4), round(Vertex.X(ev), 4), None] # x-coordinates of edge ends
|
402
|
+
Ye+=[round(Vertex.Y(sv), 4), round(Vertex.Y(ev), 4), None] # y-coordinates of edge ends
|
403
|
+
Ze+=[round(Vertex.Z(sv), 4), round(Vertex.Z(ev), 4), None] # z-coordinates of edge ends
|
404
404
|
|
405
405
|
if len(list(set(e_groupList))) < 2:
|
406
406
|
e_groupList = edgeColor
|
@@ -677,9 +677,9 @@ class Plotly:
|
|
677
677
|
for m, e in enumerate(edges):
|
678
678
|
sv = vertices[e[0]]
|
679
679
|
ev = vertices[e[1]]
|
680
|
-
x+=[round(sv[0],
|
681
|
-
y+=[round(sv[1],
|
682
|
-
z+=[round(sv[2],
|
680
|
+
x+=[round(sv[0], mantissa),round(ev[0], mantissa), None] # x-coordinates of edge ends
|
681
|
+
y+=[round(sv[1], mantissa),round(ev[1], mantissa), None] # y-coordinates of edge ends
|
682
|
+
z+=[round(sv[2], mantissa),round(ev[2], mantissa), None] # z-coordinates of edge ends
|
683
683
|
label = ""
|
684
684
|
group = ""
|
685
685
|
if len(dictionaries) > 0:
|
@@ -1338,7 +1338,7 @@ class Plotly:
|
|
1338
1338
|
zAxis : bool , optional
|
1339
1339
|
If set to True the z axis is drawn. Otherwise it is not drawn. The default is False.
|
1340
1340
|
axisSize : float , optional
|
1341
|
-
The size of the X,Y,Z, axes. The default is 1.
|
1341
|
+
The size of the X, Y, Z, axes. The default is 1.
|
1342
1342
|
backgroundColor : str , optional
|
1343
1343
|
The desired color of the background. This can be any plotly color string and may be specified as:
|
1344
1344
|
- A hex string (e.g. '#ff0000')
|
@@ -1370,7 +1370,7 @@ class Plotly:
|
|
1370
1370
|
if not isinstance(data, list):
|
1371
1371
|
return None
|
1372
1372
|
|
1373
|
-
v0 = Vertex.ByCoordinates(0,0,0)
|
1373
|
+
v0 = Vertex.ByCoordinates(0, 0, 0)
|
1374
1374
|
v1 = Vertex.ByCoordinates(axisSize,0,0)
|
1375
1375
|
v2 = Vertex.ByCoordinates(0,axisSize,0)
|
1376
1376
|
v3 = Vertex.ByCoordinates(0,0,axisSize)
|
@@ -1630,11 +1630,11 @@ class Plotly:
|
|
1630
1630
|
marginBottom : int , optional
|
1631
1631
|
The size in pixels of the bottom margin. The default value is 0.
|
1632
1632
|
camera : list , optional
|
1633
|
-
The desired location of the camera). The default is [-1.25
|
1633
|
+
The desired location of the camera). The default is [-1.25, -1.25, 1.25].
|
1634
1634
|
center : list , optional
|
1635
|
-
The desired center (camera target). The default is [0,0,0].
|
1635
|
+
The desired center (camera target). The default is [0, 0, 0].
|
1636
1636
|
up : list , optional
|
1637
|
-
The desired up vector. The default is [0,0,1].
|
1637
|
+
The desired up vector. The default is [0, 0, 1].
|
1638
1638
|
renderer : str , optional
|
1639
1639
|
The desired renderer. See Plotly.Renderers(). The default is "notebook".
|
1640
1640
|
intensityKey : str , optional
|
@@ -1888,11 +1888,11 @@ class Plotly:
|
|
1888
1888
|
figure : plotly.graph_objs._figure.Figure
|
1889
1889
|
The input plotly figure.
|
1890
1890
|
camera : list , optional
|
1891
|
-
The desired location of the camera. The default is [-1.25
|
1891
|
+
The desired location of the camera. The default is [-1.25, -1.25, 1.25].
|
1892
1892
|
center : list , optional
|
1893
|
-
The desired center (camera target). The default is [0,0,0].
|
1893
|
+
The desired center (camera target). The default is [0, 0, 0].
|
1894
1894
|
up : list , optional
|
1895
|
-
The desired up vector. The default is [0,0,1].
|
1895
|
+
The desired up vector. The default is [0, 0, 1].
|
1896
1896
|
projection : str , optional
|
1897
1897
|
The desired type of projection. The options are "orthographic" or "perspective". It is case insensitive. The default is "perspective"
|
1898
1898
|
|
@@ -1905,9 +1905,9 @@ class Plotly:
|
|
1905
1905
|
if not isinstance(camera, list):
|
1906
1906
|
camera = [-1.25, -1.25, 1.25]
|
1907
1907
|
if not isinstance(center, list):
|
1908
|
-
center = [0,0,0]
|
1908
|
+
center = [0, 0, 0]
|
1909
1909
|
if not isinstance(up, list):
|
1910
|
-
up = [0,0,1]
|
1910
|
+
up = [0, 0, 1]
|
1911
1911
|
projection = projection.lower()
|
1912
1912
|
if projection in "orthographic":
|
1913
1913
|
projection = "orthographic"
|
@@ -1932,11 +1932,11 @@ class Plotly:
|
|
1932
1932
|
figure : plotly.graph_objs._figure.Figure
|
1933
1933
|
The input plotly figure.
|
1934
1934
|
camera : list , optional
|
1935
|
-
The desired location of the camera. The default is [0,0,0].
|
1935
|
+
The desired location of the camera. The default is [0, 0, 0].
|
1936
1936
|
center : list , optional
|
1937
|
-
The desired center (camera target). The default is [0,0,0].
|
1937
|
+
The desired center (camera target). The default is [0, 0, 0].
|
1938
1938
|
up : list , optional
|
1939
|
-
The desired up vector. The default is [0,0,1].
|
1939
|
+
The desired up vector. The default is [0, 0, 1].
|
1940
1940
|
renderer : str , optional
|
1941
1941
|
The desired rendered. See Plotly.Renderers(). The default is "notebook".
|
1942
1942
|
projection : str, optional
|