Hi,

I want to read cell data tuples in pvpython, but somehow I am stuck. My data 
is read from an ensight case file and I can process it until that point when 
I need to access the single tuples of my cell data arrays. Please find an 
extract of my pvpython-code below. Does anyone know how to solve that 
problem? Thanks in advance for your efforts.

Best regards,

Andreas

>from paraview import servermanager, vtk
>
>    # Set up connection to the Paraview server
>if not servermanager.ActiveConnection:
>       connection = servermanager.Connect()
>if not connection:
>       raise exceptions.RuntimeError, "Connection to server failed"
>
>    # read ensight source object
>reader = servermanager.sources.ensight()
>reader.ByteOrder = 1   
>resultfile = "...._structure_new2.case"
>reader.CaseFileName = resultfile
>reader.UpdatePipelineInformation()
>
>    # Point to Cell Data
>ptc = servermanager.filters.PointDataToCellData(Input=reader)
>ptc.UpdatePipeline()
>    
>pdi = ptc.GetDataInformation().DataInformation
>numCells = pdi.GetNumberOfCells()
>celldata = pdi.GetCellDataInformation()
>
>    # here I get my vtkPVArrayInformation
>vM_array = celldata.GetArrayInformation("vMises_stress")
>for i in range(numCells):
>       vMises_str = vM_array.GetTuple1(i) ## <- this does not work
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to