<!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> </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> </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>( </TD>
<TD class=md vAlign=top noWrap>float </TD>
<TD class=mdname noWrap> <EM>radius</EM>, </TD></TR>
<TR>
<TD></TD>
<TD></TD>
<TD class=md noWrap>const 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>dist2</EM></TD></TR>
<TR>
<TD></TD>
<TD class=md>) "</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> vtkPointLocator locator1<BR> locator1 SetTolerance
$toler0</FONT></SPAN></DIV>
<DIV><SPAN class=468132115-16112006><FONT face=Arial> locator1
SetDataSet usgModel<BR>...</FONT></SPAN></DIV>
<DIV><SPAN class=468132115-16112006><FONT face=Arial> set dist
0.0<BR> 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> </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> </DIV>
<DIV><SPAN class=468132115-16112006><FONT face=Arial>2)
FindClosestPoint</FONT></SPAN></DIV>
<DIV><SPAN class=468132115-16112006><FONT face=Arial> set found
[locator1 FindClosestPoint $x $y $z]<BR>This one works but I can not control the
tolerance. No matter which 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> </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>