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<vtkDiskSource> diskSource = vtkSmartPointer<vtkDiskSource>::New();</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>diskSource->Update();</div>
<div> </div><div><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer<vtkTriangleFilter> triangleFilter = vtkSmartPointer<vtkTriangleFilter>::New();</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>triangleFilter->SetInputConnection(diskSource->GetOutputPort());</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>triangleFilter->Update();</div><div> </div><div><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer<vtkExtractEdges> extractEdges =<span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer<vtkExtractEdges>::New();</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>extractEdges->SetInputConnection(triangleFilter->GetOutputPort());</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>extractEdges->Update();</div>
<div> </div><div><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer<vtkPolyData> mesh = extractEdges->GetOutput();</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>mesh->BuildLinks();</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>mesh->BuildCells();</div><div> </div><div><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer<vtkIdList> N_cells = vtkSmartPointer<vtkIdList>::New();</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>mesh->GetPointCells(vertice,N_cells);</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>for (int i = 0; i < N_cells->GetNumberOfIds() ; i++)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>std::cout << "N_cells " << N_cells->GetId(i) << 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>