Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -52,7 +52,7 @@ def sample_info(sample_id_str, fieldn):
|
|
52 |
nb_nodes = nodes.shape[0]
|
53 |
|
54 |
triangles = plaid_sample.get_elements()['TRI_3']
|
55 |
-
nb_tris =
|
56 |
|
57 |
assert field.shape[0] == nb_nodes
|
58 |
|
@@ -61,7 +61,7 @@ def sample_info(sample_id_str, fieldn):
|
|
61 |
f.write(f"v {nodes[i,0]} {nodes[i,1]} {0.} {rgb_colors[i,0]} {rgb_colors[i,1]} {rgb_colors[i,2]}\n")
|
62 |
|
63 |
for i in range(nb_tris):
|
64 |
-
f.write(f"f {
|
65 |
|
66 |
# # generate colormap
|
67 |
# if np.linalg.norm(field) > 0:
|
|
|
52 |
nb_nodes = nodes.shape[0]
|
53 |
|
54 |
triangles = plaid_sample.get_elements()['TRI_3']
|
55 |
+
nb_tris = triangles.shape[0]
|
56 |
|
57 |
assert field.shape[0] == nb_nodes
|
58 |
|
|
|
61 |
f.write(f"v {nodes[i,0]} {nodes[i,1]} {0.} {rgb_colors[i,0]} {rgb_colors[i,1]} {rgb_colors[i,2]}\n")
|
62 |
|
63 |
for i in range(nb_tris):
|
64 |
+
f.write(f"f {triangles[i,0] + 1} {triangles[i,1] + 1} {triangles[i,2] + 1} \n")
|
65 |
|
66 |
# # generate colormap
|
67 |
# if np.linalg.norm(field) > 0:
|