skoch9 / meshplot

Plot 3D triangle meshes
GNU General Public License v3.0
145 stars 37 forks source link

MeshViewer rendertype == "Website" #18

Open otmanon opened 4 years ago

otmanon commented 4 years ago

Hi! This viewer works great when I tried it for jupyter notebook! I'd like to do more complex stuff in a different IDE like pycharm where I can debug more efficiently, and I can't get it to work. Doing some digging, I see I can either render it offline, on a website, or in jupyter. Is there any documentation for getting it to run on a webstie I could look at? How would that work? Could I have my code in pycharm, click, run, and an html file would be generated? Thanks Otman

skoch9 commented 4 years ago

Hi Otman, some IDE's (and also Pycharm) support to work directly with Jupyter Notebooks, for those the visualization should also work out of the box.There are the 3 rendertypes that you mentioned. The type "Website" we use for rendering a static html version of larger notebooks in an automatic conversion process within mkdocs. For your usecase, the type "Offline" is the right mode and you can switch to this mode by running

import meshplot as mp 
mp.offline()

The actual plot you can then run and save with mp.plot(v, f, filename="myplot").