[Paraview] python script and axis

spam.me at gmx.info spam.me at gmx.info
Fri Jan 28 09:44:41 EST 2011


Hello!

I'm a newbie on python and VTK. 

I would like to add axis notation in my figure, but it fails, there are never represented. No error output occurs by running the script. Please could somebody help me to set up a correct script? Thanks in advance!

Below you can find an abstract of my script. I hope it's not overloaded. 

Since it is quite difficult to find a comprehensive documentation about all the options of "CubeAxesRepresentation" by using google, could someone send me a link? Thanks as well!


vtkreader = LegacyVTKReader(FileNames=INPUTFILE)
Show()

dp = GetDisplayProperties(vtkreader)
[...]

view = GetActiveView()
[...]

camera = GetActiveCamera()
p = camera.GetPosition()
camera.Zoom(1.5)
camera.SetWindowCenter(+.2,0.0)

axes = servermanager.rendering.CubeAxesRepresentation(Input=vtkreader)
axes.Visibility = 1 
axes.Color = [1,1,1]
axes.SetPosition((p[0],p[1],p[2]))
axpos = axes.GetPosition()
view.Representations.append(axes)


More information about the ParaView mailing list