usage of vtkSelectEnclosedPoints

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

usage of vtkSelectEnclosedPoints

Sam Raby
Hello

I am using vtkSelectEnclosedPoints to identify if a "point" is inside a vtkPloyData or outside. The result always says the point is outside, no matter where the point is. My guess is it is because the vtkPolyData is not closed, although the vtkPloyData appears to be perfectly closed.

I was wondering what filter I can use as a reprocessing stage to close my vtkPolyData before passing it to vtkSelectEnclosedPoints?

vtkSmartPointer<vtkSelectEnclosedPoints> selectEnclosedPoints = vtkSmartPointer<vtkSelectEnclosedPoints>::New();
selectEnclosedPoints->SetInputData(myPoints);
selectEnclosedPoints->SetSurfaceData(myPolydata);
selectEnclosedPoints->Update();
std::cout << "Point " << i << ": " << selectEnclosedPoints->IsInside(i) << std::endl;

Thanks

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers