Hello vtkUsers. I am trying to use GetPointCells function. But I am obtaining a wrong result.<div><br></div><div>Here is my code:</div><div><br></div><div><div>int main(int, char *[])</div><div>{</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>int vertice = 0;</div>

<div>  </div><div><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer&lt;vtkDiskSource&gt; diskSource = vtkSmartPointer&lt;vtkDiskSource&gt;::New();</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>diskSource-&gt;Update();</div>

<div> </div><div><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer&lt;vtkTriangleFilter&gt; triangleFilter = vtkSmartPointer&lt;vtkTriangleFilter&gt;::New();</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>triangleFilter-&gt;SetInputConnection(diskSource-&gt;GetOutputPort());</div>

<div><span class="Apple-tab-span" style="white-space:pre">        </span>triangleFilter-&gt;Update();</div><div> </div><div><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer&lt;vtkExtractEdges&gt; extractEdges =<span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer&lt;vtkExtractEdges&gt;::New();</div>

<div><span class="Apple-tab-span" style="white-space:pre">        </span>extractEdges-&gt;SetInputConnection(triangleFilter-&gt;GetOutputPort());</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>extractEdges-&gt;Update();</div>

<div> </div><div><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer&lt;vtkPolyData&gt; mesh = extractEdges-&gt;GetOutput();</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>mesh-&gt;BuildLinks();</div>

<div><span class="Apple-tab-span" style="white-space:pre">        </span>mesh-&gt;BuildCells();</div><div>  </div><div><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer&lt;vtkIdList&gt; N_cells = vtkSmartPointer&lt;vtkIdList&gt;::New();</div>

<div><span class="Apple-tab-span" style="white-space:pre">        </span>mesh-&gt;GetPointCells(vertice,N_cells);</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>for (int i = 0; i &lt; N_cells-&gt;GetNumberOfIds() ; i++)</div>

<div><span class="Apple-tab-span" style="white-space:pre">        </span>std::cout &lt;&lt; &quot;N_cells &quot; &lt;&lt; N_cells-&gt;GetId(i) &lt;&lt; std::endl ;  <font color="#ff0000"> //It should be 2, but gives me 3 cells.</font></div>

<div><div> </div><div> return EXIT_SUCCESS;</div><div>}</div></div><div><br></div><div>Here is the example with the rendering part, for a better comprehension of the problem when running.</div><div><a href="http://pastie.org/private/llafyhkzqqzs4mbiz2fa">http://pastie.org/private/llafyhkzqqzs4mbiz2fa</a></div>

<div><br></div>-- <br>--------<br>Gonzalo Amadio<br><br>
</div>