On Tue, Nov 30, 2010 at 9:14 AM, David Doria <span dir="ltr"><<a href="mailto:daviddoria@gmail.com">daviddoria@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">> FindCell does what it is supposed to. The documentation says:<br>
> "Returns cellId >= 0 if inside, < 0 otherwise."<br>
> - David<br>
<br>
</div>Changing the query point from<br>
<div class="im"><br>
double p[3] = {1.0,1.0,1.0};<br>
<br>
</div>to<br>
<br>
double p[3] = {0.9,0.9,0.9};<br>
<br>
returns the cell id of 0 as it should.<br>
<br>
I thought the tolerance parameter (which I've set to 10.0) determined<br>
if the point was "inside"? Since (1.0,1.0,1.0) is less than 10.0 away<br>
from all of the cells, shouldn't it be considered "inside"?<br></blockquote><div><br></div><div>No, that's not what tolerances are for. The tolerance is only used in</div><div>cases where, due to expected roundoff error, the algorithm is uncertain</div>
<div>about whether the point is inside or outside. If the algorithm is certain</div><div>about whether the point is inside or outside, the tolerance is not applied.</div><div><br></div><div>Keep all tolerances on the scale of the anticipated roundoff error, i.e.</div>
<div>between 1e-16 and 1e-3 depending on the algorithm. If you aren't sure</div><div>what the expected error is, use the default tolerance.</div><div><br></div><div> David</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Also, the documentation for vtkImageData::FindCell is not helpful:<br>
<a href="http://www.vtk.org/doc/nightly/html/classvtkImageData.html#a649a10235c8fdf88b110cb763149cabd" target="_blank">http://www.vtk.org/doc/nightly/html/classvtkImageData.html#a649a10235c8fdf88b110cb763149cabd</a><br>
<br>
should the documentation of vtkDataSet::FindCell<br>
(<a href="http://www.vtk.org/doc/nightly/html/classvtkDataSet.html#a2221c10d3c4cca44e82c5ef70e4e1cbd" target="_blank">http://www.vtk.org/doc/nightly/html/classvtkDataSet.html#a2221c10d3c4cca44e82c5ef70e4e1cbd</a>)<br>
be duplicated? Or at least link directly to vtkDataSet::FindCell from<br>
vtkImageData::FindCell ?<br>
<font color="#888888"><br>
David<br>
</font></blockquote></div><br>