[Paraview-developers] Strange Problem with vtkKdTreePointLocator

Amit Prabhakar amitprabhakar05 at gmail.com
Tue Feb 21 12:07:43 EST 2017


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!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20170221/70dc3b81/attachment.html>


More information about the Paraview-developers mailing list