<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML DIR=ltr><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"></HEAD><BODY>
<DIV><FONT face=Arial color=#000000 size=2>Dear VTK users,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Can anyone give me a quick answer to this
question:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I use vtkCellLocator and the method
FindClosestPoint (vtk 4.2 and C++) to solve the following: given a world
coordinate, compute distance to closest point on a polygonal mesh, and the
coordinates of the closest point.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>In the documentaion for
vtkCellLocator->FindClosestPoint() it sais</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV>
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TR>
<TD class=md vAlign=top noWrap>void vtkCellLocator::FindClosestPoint </TD>
<TD class=md vAlign=top>( </TD>
<TD class=md vAlign=top noWrap>float </TD>
<TD class=mdname noWrap> <EM>x</EM>[3], </TD></TR>
<TR>
<TD></TD>
<TD></TD>
<TD class=md noWrap>float </TD>
<TD class=mdname noWrap> <EM>closestPoint</EM>[3], </TD></TR>
<TR>
<TD></TD>
<TD></TD>
<TD class=md noWrap><A class=el href="">vtkIdType</A> & </TD>
<TD class=mdname noWrap> <EM>cellId</EM>, </TD></TR>
<TR>
<TD></TD>
<TD></TD>
<TD class=md noWrap>int & </TD>
<TD class=mdname noWrap> <EM>subId</EM>, </TD></TR>
<TR>
<TD></TD>
<TD></TD>
<TD class=md noWrap>float & </TD>
<TD class=mdname noWrap> <EM>dist2</EM></TD></TR>
<TR>
<TD></TD>
<TD class=md>) </TD>
<TD class=md colSpan=2></TD></TR></TABLE>
<TABLE cellSpacing=5 cellPadding=0 border=0>
<TR>
<TD> </TD>
<TD>
<P>Return the closest point and the cell which is closest to the point x.
The closest point is somewhere on a cell, <STRONG><U>it need not be one of
the vertices of the cell.</U></STRONG> </P>
<P>Here it sais, in other words, that the returned closest point is an
interpolation (? is this correctly understood ?) across the
cell.</P>
<P>HOWEVER, when I use vtkCellLocator->FindClosestPoint I always get
exactly one of the points in the mesh, not an interpolation. </P>
<P>Question: to get the interpolation (to get closest surface point, not
only the one of the points in the mesh), is there a flag or something that
I need to set? (Or do I have to compute it myself; however, this would be
contradictory to the documentation it seems.)</P>
<P>Thanks for any help.</P>
<P>Tron Darvann</P>
<P>3D-Laboratory, Copenhagen</P></TD></TR></TABLE></DIV>
<DIV><FONT face=Arial color=#000000 size=2></FONT> </DIV><DIV><FONT face='Arial' color=#000000 size=2></FONT> </DIV></BODY></HTML>