The numpy-stl
module is required for visualizations of a STL mesh.
# !pip install numpy-stl
import stl
Set Plotly as the default backend.
from ecell4.prelude import *
import ecell4.plotting
import ecell4.plotting._plotly
ecell4.plotting.BACKEND = ecell4.plotting._plotly
from ecell4.plotting._plotly import plot_stl
f = sgfrd.Factory()
Here is a STL-format file named stanford_bunny.stl:
plot_stl("stanford_bunny.stl")