skoch9 / meshplot

Plot 3D triangle meshes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

meshplot.plot function not displaying mesh

SelvamArul opened this issue · comments

When I call meshplot.plot function, instead of the mesh being displayed, I get just the following text displayed.
Renderer(camera=PerspectiveCamera(children=(DirectionalLight(color='white', intensity=0.6, position=(-0.016860…
A screenshot of demonstrating this issue:

image

I am running jupyter lab version 1.1.4

I am not sure what other information regarding my system setup would be helpful. If needed, I will be glad to provide it.

Hi,
you need to activate the front-end extension for pythreejs as described here. Either for the notebooks or jupyterlab.

Thanks for the reply.

Sorry for bothering - I was using Jupyter Lab 2.2.6 and I see the same problem. I tried jupyter labextension install jupyter-threejs but the problem still persists. Did anyone also run into this?

Same issue here @yw5aj did you find a solution ?

@yw5aj @cryckx Did you install the labextension for ipywidgets, as described here: https://ipywidgets.readthedocs.io/en/stable/user_install.html

I am using Jupyter Notebook 6.1.4 in a Conda environment:

import igl
import meshplot as mp
import numpy as np

v, f = igl.read_triangle_mesh("./earth.ply")
k = igl.gaussian_curvature(v, f)
mp.plot(v, f, k, return_plot = True)

OUTPUT:
<meshplot.Viewer.Viewer at 0x1b53eb03fa0>

it is not displaying the mesh. it just outputs the location it stored in memory. Please help me.

commented

I am using Jupyter Notebook 6.1.4 in a Conda environment:

import igl import meshplot as mp import numpy as np

v, f = igl.read_triangle_mesh("./earth.ply") k = igl.gaussian_curvature(v, f) mp.plot(v, f, k, return_plot = True)

OUTPUT: <meshplot.Viewer.Viewer at 0x1b53eb03fa0>

it is not displaying the mesh. it just outputs the location it stored in memory. Please help me.

I still have this issue, nothing above worked.. Any ideas please..?

commented

Hi @stigersh, this link could be useful. You could also try the html approach.

If you are using VSCode, i recently ran into a very tricky case.
Try to click the "..." in the output cell, and "change presentation", if you have a "Jupyter Ipywidget renderer" choice, very likely the plot is already rendered. But your ipywidget is showing nothing, not even a blank window. In my case, i uninstalled the jupyter renderer extensions VSCode suggests and it works again.

commented

OMG the html approach worked! Thank you so much!
btw - it works for jupyter notebook only, for jupyter lab 80% of the screen gets gray immediately after..

Hi @stigersh, this link could be useful. You could also try the html approach.

If you are using VSCode, i recently ran into a very tricky case. Try to click the "..." in the output cell, and "change presentation", if you have a "Jupyter Ipywidget renderer" choice, very likely the plot is already rendered. But your ipywidget is showing nothing, not even a blank window. In my case, i uninstalled the jupyter renderer extensions VSCode suggests and it works again.

It's not work for me. Please help me.
vertices,faces,, = marching_cubes(predImg,method='lewiner')
mp.jupyter()
mp.plot(vertices, faces, return_plot=True)

Output
<meshplot.Viewer.Viewer at 0x22281d74ee0>