Not able Run pvpython script (Request tips and tricks for paraview automate through pvpython )

python
(sankar) #1

Hello,

We planning to automate paraview operation through pvpython.(ex.slice,clip,structural analysis for various object,mechanical behavior of object for various parameters)

The thing is the above said operation are currently we are doing manually.which consume huge time.

The concern is,

1.working with paraview with trace enable condition ,The traces are logged.However again trying to run same trace through python shell the result is failure(not able to reproduce the same operation again…hope u understand)
2.We create one manual file (refer below ex.) and execute paraview command one by one it is respond and produce respective output .where as if we save the file.py and run the same in “Run script” through python shell,it wont reproduce the same output.

what we need exactly is,

How to run the pvpython through “Runscript” in pythonshell?
Have you any suggestion tips/trick for paraview automation using pvpython? if so pls share.

//////
cone=Cone()

Show()
<paraview.servermanager.GeometryRepresentation object at 0x00000158357FBFD0>

Render()
<paraview.servermanager.RenderView object at 0x0000015835699F28>

camera=GetActiveCamera()
camera.SetFocalPoint(0,0,0)
camera.SetPosition(0,0,-10)
camera.SetViewUp(0,1,0)

camera.Dolly(10)
Render()
<paraview.servermanager.RenderView object at 0x0000015835699F28>

camera.Dolly(.1)
Render()
<paraview.servermanager.RenderView object at 0x0000015835699F28>

camera=GetActiveCamera()
camera.SetFocalPoint(0,0,0)
camera.SetPosition(0,0,-10)
camera.SetViewUp(0,1,0)

camera.Roll(45)
Render()
<paraview.servermanager.RenderView object at 0x0000015835699F28>

camera=GetActiveCamera()
camera.SetFocalPoint(0,0,0)
camera.SetPosition(0,0,-10)
camera.SetViewUp(0,1,0)

camera.Yaw(45)
Render()
<paraview.servermanager.RenderView object at 0x0000015835699F28>

camera=GetActiveCamera()
camera.SetFocalPoint(0,0,0)
camera.SetPosition(0,0,-10)
camera.SetViewUp(0,1,0)

camera.Pitch(45)
Render()
<paraview.servermanager.RenderView object at 0x0000015835699F28>

camera=GetActiveCamera()
camera.SetFocalPoint(0,0,0)
camera.SetPosition(0,0,-10)
camera.SetViewUp(0,1,0)

camera.Azimuth(45)
Render()
<paraview.servermanager.RenderView object at 0x0000015835699F28>

camera.Roll(45)
Render()
<paraview.servermanager.RenderView object at 0x0000015835699F28>

camera.Elevation(45)
Render()
<paraview.servermanager.RenderView object at 0x0000015835699F28>

//////