[Paraview-developers] Strange Problem with vtkKdTreePointLocator
Joachim Pouderoux
joachim.pouderoux at kitware.com
Tue Feb 28 11:56:28 EST 2017
Hi Amit,
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.
Then rebuild your cell array from those unique cells.
Best,
*Joachim Pouderoux*, PhD
*Technical Expert - Scientific Computing Team*
*Kitware SAS <http://www.kitware.fr>*
2017-02-26 0:29 GMT-04:00 Amit Prabhakar <amitprabhakar05 at gmail.com>:
> Hi Utkarsh,
>
> Thanks for your suggestion. I used vtkOctreeIncrementalPointLocator class
> and it worked fine. It also helped me in managing the duplicate points
> inside a vtkPolydata.
>
>
> Any idea how a vtkCellArray class can filter the duplicate cells?
>
> Thanks again,
>
> On Feb 1, 2017, at 23:18, Amit Prabhakar <amitprabhakar05 at gmail.com>
> wrote:
>
> Hello All!
>
>
> I am facing a strange problem with vtkKdTreePointLocator class that says:
>
> *ERROR : In /path/to/VTK-build/Common/DataModel/vtkLocator.cxx line 49*
> *vtkPointLocator (0xf132d0): Input Not set*
>
>
> 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().
>
> *vtkKdTreePontLocator *kdt = vtkKdTreePointLocator::New();*
> *kdt->SetDataSet(polydata_new);*
>
> *for(int i=0;i<1000;i++)*
> *{*
> * …. //the operations to add a few points and a cell to polydata_new *
> * <check if there is a point in kdt that if near-enough to an arbitrary
> point. Do some point insertion to polydata_new>*
>
> * kdt->SetDataSet(polydata_new);*
> * kdt->BuildLocator();*
> * kdt->Update();*
>
>
> *}*
>
>
> This seems like a simple operation, but am not able to figure out why this
> happens. Your help can put my brains straight.
>
> Thanks in advance!
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Search the list archives at: http://markmail.org/search/?q=
> Paraview-developers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20170228/407f4d92/attachment.html>
More information about the Paraview-developers
mailing list