jupyter-widgets / pythreejs

A Jupyter - Three.js bridge
https://pythreejs.readthedocs.io
Other
934 stars 185 forks source link

* Problems running PlaneBufferGeometry * #365

Closed mllobera closed 2 years ago

mllobera commented 2 years ago

I am trying to make use of it to generate some visualizations of terrain data. I have ran into a problem and I am not certain whether it is a problem that has to do with Jupyterlab, Threejs or my computer itself. I have just started to learn threejs (via Python). In order to visualize the terrain I used the following:

` ref_plane = PlaneBufferGeometry(4810, 4460, 961, 891)

dtm = BufferGeometry.from_geometry(ref_plane)
` within Jupyter lab 3. It either gives me a blank object in return OR it 'freezes' Jupyterlab. If I reduce the width- and heightSegments to about 600, it seems to work. I imagine that this has to do with running out of memory?? What I would like to know is whether this is because I am running it in Jupyterlab, it is a limitation of threejs OR of my computer.

vidartf commented 2 years ago

There should be no reason to pass a PlaneBufferGeometry through from_geometry, as it should already be a BufferGeometry subclass. It might be that the code does something non-ideal in this scenario...