Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,7 @@ def plot_vertices_and_mesh(vertices, faces):
|
|
30 |
# Streamlit UI
|
31 |
st.title("3D Graphics and Geometry with Streamlit")
|
32 |
|
33 |
-
if st.button('Plot Vertices and Meshes'):
|
34 |
vertices = np.array([[-3, -3, 0], [+3, -3, 0], [+3, +3, 0], [-3, +3, 0], [+0, +0, +3]])
|
35 |
faces = np.array([[4, 1, 0], [4, 2, 1], [3, 4, 0], [3, 4, 2], [3, 2, 1], [3, 1, 0]], dtype=np.int32)
|
36 |
plot_vertices_and_mesh(vertices, faces)
|
@@ -66,20 +66,20 @@ def create_solid_models():
|
|
66 |
# Streamlit UI
|
67 |
st.title("3D Graphics and Geometry with Streamlit")
|
68 |
|
69 |
-
if st.button('Plot Vertices and Meshes'):
|
70 |
# Add vertices and faces data here
|
71 |
vertices = np.array([[-3, -3, 0], [+3, -3, 0], [+3, +3, 0], [-3, +3, 0], [+0, +0, +3]])
|
72 |
faces = np.array([[4, 1,0], [4, 2, 1], [3, 4, 0], [3, 4, 2], [3, 2, 1], [3, 1, 0]], dtype=int32)
|
73 |
plot_vertices_and_mesh(vertices, faces)
|
74 |
|
75 |
-
if st.button('Plot Convex Hull'):
|
76 |
points = np.array([[0, 0], [-2, 0], [-2, 2], [0, 1.5], [2, 2], [2, 0]])
|
77 |
plot_convex_hull(points)
|
78 |
|
79 |
-
if st.button('Create and Save 3D Meshes'):
|
80 |
create_3d_meshes()
|
81 |
st.write("3D meshes saved to files.")
|
82 |
|
83 |
-
if st.button('Create and Save Solid Models'):
|
84 |
create_solid_models()
|
85 |
st.write("Solid models saved to files.")
|
|
|
30 |
# Streamlit UI
|
31 |
st.title("3D Graphics and Geometry with Streamlit")
|
32 |
|
33 |
+
if st.button('Plot Vertices and Meshes', key='01'):
|
34 |
vertices = np.array([[-3, -3, 0], [+3, -3, 0], [+3, +3, 0], [-3, +3, 0], [+0, +0, +3]])
|
35 |
faces = np.array([[4, 1, 0], [4, 2, 1], [3, 4, 0], [3, 4, 2], [3, 2, 1], [3, 1, 0]], dtype=np.int32)
|
36 |
plot_vertices_and_mesh(vertices, faces)
|
|
|
66 |
# Streamlit UI
|
67 |
st.title("3D Graphics and Geometry with Streamlit")
|
68 |
|
69 |
+
if st.button('Plot Vertices and Meshes', key='02'):
|
70 |
# Add vertices and faces data here
|
71 |
vertices = np.array([[-3, -3, 0], [+3, -3, 0], [+3, +3, 0], [-3, +3, 0], [+0, +0, +3]])
|
72 |
faces = np.array([[4, 1,0], [4, 2, 1], [3, 4, 0], [3, 4, 2], [3, 2, 1], [3, 1, 0]], dtype=int32)
|
73 |
plot_vertices_and_mesh(vertices, faces)
|
74 |
|
75 |
+
if st.button('Plot Convex Hull', key='03'):
|
76 |
points = np.array([[0, 0], [-2, 0], [-2, 2], [0, 1.5], [2, 2], [2, 0]])
|
77 |
plot_convex_hull(points)
|
78 |
|
79 |
+
if st.button('Create and Save 3D Meshes', key='04'):
|
80 |
create_3d_meshes()
|
81 |
st.write("3D meshes saved to files.")
|
82 |
|
83 |
+
if st.button('Create and Save Solid Models', key='05'):
|
84 |
create_solid_models()
|
85 |
st.write("Solid models saved to files.")
|