<!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>&nbsp;</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>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I use vtkCellLocator and the method 
FindClosestPoint (vtk 4.2 and C++) to solve the following:&nbsp; 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>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>In the documentaion for 
vtkCellLocator-&gt;FindClosestPoint() it sais</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</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>(&nbsp;</TD>
    <TD class=md vAlign=top noWrap>float&nbsp;</TD>
    <TD class=mdname noWrap>&nbsp; <EM>x</EM>[3], </TD></TR>
  <TR>
    <TD></TD>
    <TD></TD>
    <TD class=md noWrap>float&nbsp;</TD>
    <TD class=mdname noWrap>&nbsp; <EM>closestPoint</EM>[3], </TD></TR>
  <TR>
    <TD></TD>
    <TD></TD>
    <TD class=md noWrap><A class=el href="">vtkIdType</A> &amp;&nbsp;</TD>
    <TD class=mdname noWrap>&nbsp; <EM>cellId</EM>, </TD></TR>
  <TR>
    <TD></TD>
    <TD></TD>
    <TD class=md noWrap>int &amp;&nbsp;</TD>
    <TD class=mdname noWrap>&nbsp; <EM>subId</EM>, </TD></TR>
  <TR>
    <TD></TD>
    <TD></TD>
    <TD class=md noWrap>float &amp;&nbsp;</TD>
    <TD class=mdname noWrap>&nbsp; <EM>dist2</EM></TD></TR>
  <TR>
    <TD></TD>
    <TD class=md>)&nbsp;</TD>
    <TD class=md colSpan=2></TD></TR></TABLE>
<TABLE cellSpacing=5 cellPadding=0 border=0>
  
  <TR>
    <TD>&nbsp; </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>&nbsp;&nbsp; </P>
      <P>Here it sais, in other words, that the returned closest point is an 
      interpolation (? is this correctly understood ?) &nbsp;across the 
cell.</P>
      <P>HOWEVER, when I use vtkCellLocator-&gt;FindClosestPoint I always get 
      exactly one of the points in the mesh, not an interpolation.&nbsp; </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>&nbsp;</DIV><DIV><FONT face='Arial' color=#000000 size=2></FONT>&nbsp;</DIV></BODY></HTML>