<div dir="ltr"><div><div><div>Hi Amit,<br><br></div>Not simple answer, but for instance you might compute some kind of hash using cell->sorted_point_ids connectivity (eg. rearrange faces in such a way that the first id is the lowest one) and create a map with hash->cell_id.<br></div>Then rebuild your cell array from those unique cells.<br><br></div>Best,<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><b>Joachim Pouderoux</b><font size="2">, <font size="1">PhD</font></font><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><font size="1"><i>Technical Expert - Scientific Computing Team</i></font><br><b><font size="1"><a href="http://www.kitware.fr" target="_blank">Kitware SAS</a></font></b><br></blockquote>
</div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">2017-02-26 0:29 GMT-04:00 Amit Prabhakar <span dir="ltr"><<a href="mailto:amitprabhakar05@gmail.com" target="_blank">amitprabhakar05@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="auto" style="word-wrap:break-word"><span class="">Hi Utkarsh,<div><br></div><div>Thanks for your suggestion. I used vtkOctreeIncrementalPointLocat<wbr>or class and it worked fine. It also helped me in managing the duplicate points inside a vtkPolydata.</div><div><br></div><div><br></div><div>Any idea how a vtkCellArray class can filter the duplicate cells?</div><div><br></div><div>Thanks again,</div></span><div><br><div class="m_5489909237351600118m_-4635973884560765728AppleOriginalContents" style="direction:ltr"><blockquote type="cite"><span class=""><div>On Feb 1, 2017, at 23:18, Amit Prabhakar <<a href="mailto:amitprabhakar05@gmail.com" target="_blank">amitprabhakar05@gmail.com</a>> wrote:</div><br class="m_5489909237351600118m_-4635973884560765728Apple-interchange-newline"></span><div><div class="h5"><div><div style="word-wrap:break-word">Hello All!<div><br></div><div><br></div><div>I am facing a strange problem with vtkKdTreePointLocator class that says:</div><div><br></div><div><font color="#a77b00"><b>ERROR : In /path/to/VTK-build/Common/Data<wbr>Model/vtkLocator.cxx line 49</b></font></div><div><font color="#a77b00"><b>vtkPointLocator (0xf132d0): Input Not set</b></font></div><div><br></div><div><br></div><div>I am setting the vtkKdtreePointLocator using a polydata. The poly data get 2-3 points and a cell added to it, in a for loop. After every loop operation, we update the poly data, the kdtreelocator and BuildLocator().</div><div><br></div><div><font color="#9a244f"><b>vtkKdTreePontLocator *kdt = vtkKdTreePointLocator::New();</b></font></div><div><font color="#9a244f"><b>kdt->SetDataSet(polydata_new);</b></font></div><div><font color="#9a244f"><b><br></b></font></div><div><font color="#9a244f"><b>for(int i=0;i<1000;i++)</b></font></div><div><font color="#9a244f"><b>{</b></font></div><div><font color="#9a244f"><b><span class="m_5489909237351600118m_-4635973884560765728Apple-tab-span" style="white-space:pre-wrap"> </span>…. //the operations to add a few points and a cell to polydata_new </b></font></div><div><b><font color="#9a244f"><span class="m_5489909237351600118m_-4635973884560765728Apple-tab-span" style="white-space:pre-wrap"> </span></font><span style="color:rgb(154,36,79)"><</span><span style="color:rgb(154,36,79)">check if there is a point in kdt that if near-enough to an arbitrary point. Do some point insertion to polydata_new></span></b></div><div><font color="#9a244f"><b><br></b></font></div><div><font color="#9a244f"><b><span class="m_5489909237351600118m_-4635973884560765728Apple-tab-span" style="white-space:pre-wrap"> </span>kdt->SetDataSet(polydata_new);</b></font></div><div><font color="#9a244f"><b><span class="m_5489909237351600118m_-4635973884560765728Apple-tab-span" style="white-space:pre-wrap"> </span>kdt->BuildLocator();</b></font></div><div><font color="#9a244f"><b><span class="m_5489909237351600118m_-4635973884560765728Apple-tab-span" style="white-space:pre-wrap"> </span>kdt->Update();</b></font></div><div><font color="#9a244f"><b><br></b></font></div><div><b><br></b></div><div><font color="#9a244f"><b>}</b></font></div><div><br></div><div><br></div><div>This seems like a simple operation, but am not able to figure out why this happens. Your help can put my brains straight.</div><div><br></div><div>Thanks in advance!</div></div></div></div></div></blockquote></div><br></div></div></div>
<br>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=Paraview-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>Paraview-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview-developers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/paraview-<wbr>developers</a><br>
<br></blockquote></div><br></div>