I tried visualizing the uploaded .stl file into webpage with the below code.
Now if I want to visualize the geometry by cutting into 2 parts to see the inner view, how this can be achieved.?
import streamlit as st
import pyvista as pv
from stpyvista import stpyvista
import mimetypes
# ipythreejs does not support scalar bars :(
pv.global_theme.show_scalar_bar = False
plotter = pv.Plotter(
border=True,
window_size=[580,400])
plotter.background_color = "white"
color = st.sidebar.selectbox("Pick a color:",["green","white","yellow","blue","red"])
## Initialize pyvista reader and plotter
reader = pv.STLReader("D://4_im//cub.stl")
# Read data and send to plotter
mesh = reader.read()
plotter.add_mesh(mesh,color=color)
# Final touches
plotter.background_color = "white"
plotter.view_isometric()
# Pass a key to avoid re-rendering at each time something changes in the page
stpyvista(plotter)