[vtkusers] FindAndGetCell ?!
Berk Geveci
berkgeveci at hotmail.com
Tue Nov 6 17:21:15 EST 2001
You might want to adjust the tolerance (tol2). I doubt the point can ever be
"exactly" on the plain defined by the cell considering the fact that there
will be floating point errors.
-Berk
>From: "Terence Lim" <tlim at mda.ca>
>Reply-To: <tlim at mda.ca>
>To: <vtkusers at public.kitware.com>
>Subject: [vtkusers] FindAndGetCell ?!
>Date: Tue, 6 Nov 2001 14:06:51 -0800
>
>Hi vtkusers,
>
>I am looking for a way to get the cellid of a cell (triangle type) that
>contains an inputted point. This point is not a vertex of any of the
>triangles, it is a point which may be contained by the boundaries of the
>vertices. I have tried the FindAndGetCell method but i must be doing
>something wrong because the returned cellid is always 0 regardless of what
>the input point is. i am absolutely sure that the coordinates of this input
>point is actually contained within a cell in my mesh. What am I doing
>wrong?
>
>float tester[3], pcoords[3], *weights;
>float tol2 = 0;
>tester[0] = 100; //x coordinate of the point
>tester[1] = 10; //y coordinate of the point
>tester[2] = 5; //z coordinate of the point
>int cellid= 0;
>int subId= 0;
>vtkTriangle *tri = vtkTriangle::New();
>vtkCell *testcell =
>Delaunay->GetOutput()->FindAndGetCell(tester,tri,cellid,tol2,subId,pcoords,w
>eights);
>cout<<"The cellid of the cell that contains this point is: "<<cellid<<endl;
>//this always returns 0
>
>
>Any suggestions would be greatly appreciated.
>
>Thanks,
>
>Terence Lim
>
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at:
><http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://public.kitware.com/mailman/listinfo/vtkusers
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
More information about the vtkusers
mailing list