a way to interact with pythonocc webbrowser display using streamlit
Prerequisites:
- streamlit: https://streamlit.io/
- pythonocc-core: https://github.com/tpaviot/pythonocc-core
# first create an environment
conda create --name=pyoccenv python=3.9
source activate pyoccenv /alternate command/ conda activate pyoccenv
conda install -c conda-forge pythonocc-core=7.7.0
pip install streamlit
In your terminal, with your conda env activated, just type:
streamlit run path_to_your_file/example_streamlit_pythonocc.py
Here a small example of application:
As pythonocc server refresh when streamlit rerun, we had to let the .render()
function return the new server's address to pass it to the iframe