<div>Hi Andreas:</div>
<div> </div>
<div>    Have you tried visualizing the EnSight data using ParaView UI (instead of python script)? If it is due to the EnSight reader, please let me know.</div>
<div> </div>
<div>    -Zhanping<br><br></div>
<div class="gmail_quote">On Wed, Apr 7, 2010 at 11:12 AM, Andreas Maier <span dir="ltr">&lt;<a href="mailto:andi.maier@mytum.de">andi.maier@mytum.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi,<br><br>I want to read cell data tuples in pvpython, but somehow I am stuck. My data<br>is read from an ensight case file and I can process it until that point when<br>
I need to access the single tuples of my cell data arrays. Please find an<br>extract of my pvpython-code below. Does anyone know how to solve that<br>problem? Thanks in advance for your efforts.<br><br>Best regards,<br><br>
Andreas<br><br>&gt;from paraview import servermanager, vtk<br>&gt;<br>&gt;    # Set up connection to the Paraview server<br>&gt;if not servermanager.ActiveConnection:<br>&gt;       connection = servermanager.Connect()<br>
&gt;if not connection:<br>&gt;       raise exceptions.RuntimeError, &quot;Connection to server failed&quot;<br>&gt;<br>&gt;    # read ensight source object<br>&gt;reader = servermanager.sources.ensight()<br>&gt;reader.ByteOrder = 1<br>
&gt;resultfile = &quot;...._structure_new2.case&quot;<br>&gt;reader.CaseFileName = resultfile<br>&gt;reader.UpdatePipelineInformation()<br>&gt;<br>&gt;    # Point to Cell Data<br>&gt;ptc = servermanager.filters.PointDataToCellData(Input=reader)<br>
&gt;ptc.UpdatePipeline()<br>&gt;<br>&gt;pdi = ptc.GetDataInformation().DataInformation<br>&gt;numCells = pdi.GetNumberOfCells()<br>&gt;celldata = pdi.GetCellDataInformation()<br>&gt;<br>&gt;    # here I get my vtkPVArrayInformation<br>
&gt;vM_array = celldata.GetArrayInformation(&quot;vMises_stress&quot;)<br>&gt;for i in range(numCells):<br>&gt;       vMises_str = vM_array.GetTuple1(i) ## &lt;- this does not work<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br><br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Zhanping Liu, PhD<br>Kitware, Inc.<br>28 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-371-3971 x 138<br><a href="http://www.zhanpingliu.org">http://www.zhanpingliu.org</a><br>