Hi,
I couldn’t find information about that so I take my chance here.
I am using pvpython 3.8 with on Paraview/5.9.1.
I attempt to generate a screenshot of a 3D surface in a 2D Interaction Mode.
The 3D surface is a cylinder made of triangles. The source is read from a .xmf file based of an HDF5 mesh file.
By setting the renderView.InteractionMode = '3D'
, the source is well represented.
However, I would rather use a 2D Interaction Mode for a question of perspective. But by setting renderView.InteractionMode = '2D'
, the PNG file obtained by SaveScreenshot()
has a bad rendering:
Here is the triangle mesh of the source:
Here is a simple example of my code :
renderView = GetActiveView()
renderView.InteractionMode = '2D' # Or '3D'
xmf = XDMFReader(FileNames=['file.xmf'])
display = Show(xmf, renderView)
display.SetRepresentationType('Surface')
display.SetScalarColoring(None, 0)
SaveScreenshot('output.png', renderView, ImageResolution=(252, 256), TransparentBackgound=1)
Do you have an idea on how to have the same rendering in ‘2D’ perspective than in ‘3D’ ?
Have a nice day,
Thibault