[vtkusers] FindCell method of vtkCellLocator
shinpei
noro_shinpei at web.de
Mon Jul 8 18:44:56 EDT 2013
Hi,
I have two triangle cells in my vtkCellLocator and I create a little bb
around a point of one triangle (see picture). Now I use FindCell(bb, idList)
and I should get one id, but I get two. Is this a bug, or must I change
something?
<http://vtk.1045678.n5.nabble.com/file/n5721831/Unbenannt.png>
- two trinagles (red)
- bb (blue)
My code:
for (vtkIdType ptId = 0; ptId < geometry->GetNumberOfPoints(); ++ptId)
{
bounds[0] = trianglePoint[0] - 0.01;
bounds[1] = trianglePoint[0] + 0.01;
bounds[2] = trianglePoint[1] - 0.01;
bounds[3] = trianglePoint[1] + 0.01;
bounds[4] = trianglePoint[2] - 0.01;
bounds[5] = trianglePoint[2] + 0.01;
cellLocator->FindCellsWithinBounds(bounds, foundCells);
int size = foundCells->GetNumberOfIds(); // is always two
}
Thx
--
View this message in context: http://vtk.1045678.n5.nabble.com/FindCell-method-of-vtkCellLocator-tp5721831.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list