Hi, <div><br></div><div>I am struggling to access polygon faces in my VTK files using Python. Suppose I have the following segment in my </div><div>file:</div><div><br></div><div><div>POLYGONS 275558 1102232</div><div>3 0 1 2</div>
<div>3 3 2 1</div><div>3 0 45 46</div><div>3 0 46 1</div><div>3 0 2 50</div></div><div><br></div><div>I used the piece of code below to prepare: </div><div><br></div><div><div> import vtk</div><div> Reader = vtk.vtkDataSetReader()</div>
<div> Reader.SetFileName('my_test_file.vtk')</div><div> Reader.ReadAllScalarsOn() # Activate the reading of all scalars</div><div> Reader.Update() </div><div> Data = Reader.GetOutput()</div></div><div>
CellData = Data.GetCell(0)</div><div> </div><div><br></div><div>I assume CellData.GetPointId(x) is what I should use. But I got wrong point ID after x =3. </div><div><br></div><div>Can someone help me on this? </div>
<div><br clear="all">Cheers, <br>Forrest<br>
</div>