<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1255">
<META content="MSHTML 6.00.2900.2995" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial>
<DIV><SPAN class=468132115-16112006><FONT face=Arial>Hi All,</FONT></SPAN></DIV>
<DIV><SPAN class=468132115-16112006><FONT face=Arial></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=468132115-16112006><FONT face=Arial>I am trying to locate a 
point in an UnstructuredGrid using 2 methods (not in the same time) of 
vtkPointLocator :</FONT></SPAN></DIV>
<DIV><SPAN class=468132115-16112006><FONT face=Arial></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=468132115-16112006><FONT face=Arial>1) 
FindClosestPointWithinRadius </FONT></SPAN></DIV>
<DIV><SPAN class=468132115-16112006><FONT face=Arial>Am I using a wrong type of 
variable for the returned distance (dist2) ?</FONT></SPAN></DIV>
<DIV><SPAN class=468132115-16112006><FONT face=Arial>the doc says:" 
<TABLE cellSpacing=0 cellPadding=0 border=0>
  <TBODY>
  <TR>
    <TD class=md vAlign=top 
      noWrap>vtkPointLocator::FindClosestPointWithinRadius </TD>
    <TD class=md vAlign=top>(&nbsp;</TD>
    <TD class=md vAlign=top noWrap>float&nbsp;</TD>
    <TD class=mdname noWrap>&nbsp; <EM>radius</EM>, </TD></TR>
  <TR>
    <TD></TD>
    <TD></TD>
    <TD class=md noWrap>const float&nbsp;</TD>
    <TD class=mdname noWrap>&nbsp; <EM>x</EM>[3], </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></TR></TBODY></TABLE></FONT></SPAN></DIV>
<DIV><SPAN class=468132115-16112006><FONT face=Arial>The tcl code I 
use:</FONT></SPAN></DIV>
<DIV><SPAN class=468132115-16112006><FONT face=Arial># define the 
locator<BR>&nbsp;vtkPointLocator locator1<BR>&nbsp;&nbsp;locator1 SetTolerance 
$toler0</FONT></SPAN></DIV>
<DIV><SPAN class=468132115-16112006><FONT face=Arial>&nbsp;&nbsp;locator1 
SetDataSet usgModel<BR>...</FONT></SPAN></DIV>
<DIV><SPAN class=468132115-16112006><FONT face=Arial>&nbsp;&nbsp;&nbsp;set dist 
0.0<BR>&nbsp;&nbsp;&nbsp;set found [locator_tmp FindClosestPointWithinRadius 
$radius $x $y $z dist]<BR></FONT></SPAN></DIV>
<DIV><SPAN class=468132115-16112006><FONT face=Arial>The error message 
is:</DIV></FONT></SPAN>
<DIV><FONT face=Arial>Object named: locator<SPAN 
class=468132115-16112006>1</SPAN>, could not find requested method: 
FindClosestPointWithinRadius<BR>or the method was called with incorrect 
arguments.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial>while executing<SPAN class=468132115-16112006> 
</SPAN>"locator<SPAN class=468132115-16112006>1</SPAN> 
FindClosestPointWithinRadius $radius $x $y $z dist"</FONT></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><SPAN class=468132115-16112006><FONT face=Arial>2) 
FindClosestPoint</FONT></SPAN></DIV>
<DIV><SPAN class=468132115-16112006><FONT face=Arial>&nbsp;&nbsp;&nbsp;set found 
[locator1 FindClosestPoint $x $y $z]<BR>This one works but I can not control the 
tolerance.&nbsp;No matter which&nbsp;value is given to SetTolerance - the result 
is not changed as it should.</FONT></SPAN></DIV>
<DIV><SPAN class=468132115-16112006><FONT face=Arial></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=468132115-16112006><FONT face=Arial>Thanks for your 
help,</FONT></SPAN></DIV>
<P><FONT face=Arial>Gil </FONT></P></FONT></DIV></BODY></HTML>