Skip to content

Widget not rendering using jupyter_renderer #1192

Open
@Moerik123

Description

@Moerik123

Hello y'all!

I have the following problem:
I'm currently trying to visulize a 3D Model in a Jupyter Notebook. In order to do so I load a Step file and plan to display it using the jupyterRenderer. Unfortunally it doesn't work. The widget does appear but remains empty (when executed with VS Code). The code isn't that extensive:

from OCC.Display.WebGl.jupyter_renderer import JupyterRenderer
from OCC.Extend.TopologyUtils import TopologyExplorer


from ipywidgets import interact
from ipywidgets import widgets

shape=read_step_file("C:\\PATH\\Model.stp")

my_renderer= JupyterRenderer()
t=TopologyExplorer(shape)


my_renderer.DisplayShape(shape)

my_renderer.Display()

Now as mentioned the widget (in form of a white box) does show up but theres nothing in it. I know that the model is loaded properly, because when I changed the "DisplayShape" to "DisplayShapeAsSVG" it worked. I got an SVG output and a widget with Grid and Axes in it (built in to the renderer I guess). The SVG showed my model.
Now has any of you an Idea, what I might be missing?

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions