[vtkusers] FindCell method of vtkCellLocator
Biddiscombe, John A.
biddisco at cscs.ch
Tue Jul 9 16:39:13 EDT 2013
could it be that the first point you check is shared, so two is correct, but since you don't clear the Idlist between iterations, each subsequent check is just returning the same ids? (Check the vtkCellLocator code and see if the list is cleared, it may just be added to)
JB
-----Original Message-----
From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of shinpei
Sent: 09 July 2013 14:24
To: vtkusers at vtk.org
Subject: Re: [vtkusers] FindCell method of vtkCellLocator
Sry... I thought it would be clear what I mean.
The geometry contains two triangles:
Points are:
(0 0 0)
(0 10 0)
(10 0 0)
(10 10 0)
with connection:
(0 1 2)
(1 2 3)
for (vtkIdType ptId = 0; ptId < geometry->GetNumberOfPoints(); ++ptId)
{
geometry->getPoints()->GetPoint(ptId, trianglePoint);
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
}
The trianglePoint is e.g. (0 0 0) (first iteration of the loop) so I should get only one triangle, but I get always two triangles. The bb is small enough and there is a point which correspons to only one triangle.
--
View this message in context: http://vtk.1045678.n5.nabble.com/FindCell-method-of-vtkCellLocator-tp5721831p5721840.html
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
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
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list