-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3D surfaces not rotated correctly #130
Comments
I have since found a solution, although I don't fully understand it. It seems I can get it to work normally if change the code for applying rotations to the surfaces and components in ipywidgets.py,
to
although I couldn't see any notice or reason for this change in threejs. Another thing that may or may not be related -- when testing in firefox I noticed that there is now an issue with the centering of the field of view. It is no longer centered on the center of rotation of the camera, so often it is not possible to see the whole model. However, this seemed to be firefox specific, and when I tried in chrome that problem does not occur. In any case, I will go ahead and make a pull request for this small fix. Would be good to understand what is going on though. |
There is something weird going on here. In my case, this is working when opening a notebook in jupyterlab, but there are problems with the rotaions when the documentation is generated. |
@rdgraham do you use |
I am using jupyter lab. I just tried with the legacy jupyter notebook. I am seeing an issue with threejs: Is this the issue you are seeing, or something else? In my case, it seems like some issue with my installation, not related to the surface rotation issue. In any case, I don't have much need to debug it since I don't have a reason to use jupyter notebook, which seems to be being deprecated. I am not familiar with the documentation generation. If you could post the current procedure I could try to replicate the issue. |
Yes, that is exactly the issue. About the documentation, it is all located in the doc folder, and sphinx is being used. Also a sphinx extension called nbsphinx that allow to include Jupyter notebooks in the documentation, is being used. I'dont know the internals of nbsphinx, but it requires ipykernel to work so this is why I was trying to use the jupyter notebook to check how the documentation notebooks look there (because in Jupyter lab they look ok). To generate a local copy of the documentation, you need to run |
In a new build, rotations are not being applied correctly to 3d surfaces in the Plot3d py3js output.
The underlying simulation seems to be correct, but the surfaces of components are not rotated correctly. In the example below (taken from the tutorial), the cylindrical sides of the lens are rotated about the wrong axis.
This was discussed in the comments of pull request #127
Initially this was suspected to be related to the windows build, but actually seems to happen in linux also on a new install, using python 3.10, pythreejs 2.4.1.
The text was updated successfully, but these errors were encountered: