[vtkusers] vtkCellLocator::IntersectWithLine
Juergen Endres
jerng at gmx.de
Tue Oct 18 16:43:25 EDT 2011
Hi all!
I'm using VTK for finding intersections of two points defining a line
and a triangulated, closed surface (mesh). The intersection method from
vtkCellLocator (IntersectWithLine) is called if, and only if one point
is outside the mesh and the other point is inside the mesh. However, it
sometimes occurs that the intersectWithLine() function return 0 (no
intersection found). Has anybody experienced problems like this (and/or
probably a solution)?
P.S: the way to determine if a point is inside/outside the mesh is given
as follows:
1. find closest cell of the mesh for the given point
2. construct a plane from this cell
3. evaluate function (vtkPlane::EvaluateFunction()) for the point
4. if results > 0 : outside, otherwise inside
(the triangulated mesh is constructed s.t. the normals point to the
outside)
Best,
Juergen
More information about the vtkusers
mailing list