Skip to content
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

Grid / Bounds plotting incorrectly for parallel projection #3991

Open
giiyms opened this issue Feb 9, 2023 · 7 comments
Open

Grid / Bounds plotting incorrectly for parallel projection #3991

giiyms opened this issue Feb 9, 2023 · 7 comments
Labels
bug Uh-oh! Something isn't working as expected.

Comments

@giiyms
Copy link

giiyms commented Feb 9, 2023

Describe the bug, what's wrong, and what you expected.

Hello,

When plotting with parallel projection turned on the grid/bounds are always plotting in front of the mesh.

If you run the code below and toggle the ruler on you can see the example screenshot.

Steps to reproduce the bug.

import pyvista as pv
pv.set_jupyter_backend('trame')  
sp = pv.Sphere()
sp.points[:,-1] *= 2

pl = pv.Plotter(shape=(1,2))
pl.enable_parallel_projection()
pl.add_mesh(sp)
pl.subplot(0,1)
pl.add_mesh(pv.Cone())
pl.link_views()
pl.show()

System Information

--------------------------------------------------------------------------------
  Date: Thu Feb 09 16:51:21 2023 GMT Standard Time

                OS : Windows
            CPU(s) : 20
           Machine : AMD64
      Architecture : 64bit
               RAM : 31.7 GiB
       Environment : Python
        GPU Vendor : Intel
      GPU Renderer : Intel(R) Iris(R) Xe Graphics
       GPU Version : 4.5.0 - Build 31.0.101.3959

  Python 3.10.9 | packaged by conda-forge | (main, Feb  2 2023, 20:14:58) [MSC
  v.1929 64 bit (AMD64)]

           pyvista : 0.39.dev0
               vtk : 9.2.5
             numpy : 1.23.5
           imageio : 2.25.0
            scooby : 0.7.1
             pooch : v1.6.0
        matplotlib : 3.6.3
           IPython : 8.9.0
             scipy : 1.10.0
              tqdm : 4.64.1
             trame : 2.3.0
      trame_client : 2.4.0
      trame_server : 2.9.0
         trame_vtk : 2.0.14

  Intel(R) oneAPI Math Kernel Library Version 2022.1-Product Build 20220311
  for Intel(R) 64 architecture applications

Screenshots

image

@giiyms giiyms added the bug Uh-oh! Something isn't working as expected. label Feb 9, 2023
@banesullivan
Copy link
Member

I'm actually not seeing this issue. It's possible there is a graphics difference on Windows...

@giiyms
Copy link
Author

giiyms commented Feb 10, 2023

Interesting, especially considering with parallel projection turned off this doesn't happen on Windows.

@banesullivan
Copy link
Member

Odd. I cannot reproduce this even on my Windows computer

@giiyms
Copy link
Author

giiyms commented Feb 13, 2023

oh really. How weird.
Any tips on how I could debug this?

It works as expected if I have server rendering on.
Client rendering does not work and has the lines in front of the mesh.

@banesullivan
Copy link
Member

Ohhh, I thought the screenshot above looked like server-rendering to me so I didn't try this with client-rendering.

Indeed, I can reproduce:
Screen Shot 2023-02-13 at 8 28 21 AM

To me, this looks like the "Fly Mode" of the vtkCubeAxesActor is incorrectly set. @giiyms, can you open an issue with VTK.js: https://github.com/Kitware/vtk-js/issues/new/choose

@giiyms
Copy link
Author

giiyms commented Feb 14, 2023

@banesullivan is it a VTK.js issue or a trame issue? I thought trame was meant to be the next iteration of VTK.js

@banesullivan
Copy link
Member

is it a VTK.js issue or a trame issue?

This is a VTK.js issue

I thought trame was meant to be the next iteration of VTK.js

Trame is not the next iteration of VTK.js but rather, trame is a framework for creating web applications in Python that can utilize VTK.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Uh-oh! Something isn't working as expected.
Projects
None yet
Development

No branches or pull requests

2 participants