<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000'>the bug is around that logic, that I try to understand.<br>It seems that the "ray_end" is reset, which is why some points are missed.<br><br>I didn't write that logic, maybe Tim or Paul know who did.<br><br>I don't think we should guarantee the order; <br>The user should order it if needed;<br><br> The "leafs" of the tree can come in any order, and we should not try to order it there.<br><br>Iulian<br><br><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div><br></div><div>Hi iulian </div><div><br></div><div>Thanks for that, additional side question. When you specify the maximum number of intersection to return, the list is ordered in distance from the start point, when you specify 0, the list is unordered. Should we not expect consistent behavior in both cases?</div><div><br></div><div>Thanks </div><div><br></div><div>Andy</div><div><br></div><div><br></div><div><br></div><div><div style="font-size:75%;color:#575757">Sent from my Samsung Galaxy Noteā¢, an AT&T LTE smartphone</div></div> <br>Iulian Grindeanu <iulian@mcs.anl.gov> wrote:<br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000">it works fine if you do not specify the limit 100 for number of intersections.<br>If you leave it 0, it is fine; <br>(so call with kdtree->ray_intersect_triangles( kdtree_root, 1.0e-6,<br> dir, box_center,<br> intersection_facets<br> , intersections);<br><br>I am still looking, but I think I am close :)<br><br><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><style>p { margin: 0; }</style><div style="font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000">OK, obb tree works fine with the same model, default setting for everything <br>(you do no have to put tetras in the build, only the faces)<br><br>So there might be an issue with the kdtree. <br>I will look at it.<br><br>Iulian<br><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;">
<font size="+1">The problem is <font size="+1">on the second<font size="+1"> run, moving the s<font size="+1">tarting point in
the <font size="+1">to y=4, then <font size="+1">we <font size="+1">get <font size="+1">no intersections<br>
<font size="+1">bey<font size="+1">ond 48.5.</font></font><br>
</font></font></font></font></font></font></font></font>
<div class="moz-cite-prefix">On 07/24/2013 10:50 AM, Iulian
Grindeanu wrote:<br>
</div>
<blockquote cite="mid:195029797.14314638.1374681019383.JavaMail.root@mcs.anl.gov">
<style>p { margin: 0; }</style>
<div style="font-family: times new roman,new york,times,serif;
font-size: 12pt; color: #000000">I see no error<br>
Your fifth slab is at about 49.5; <br>
(first at 9.5, ..., fifth at 49.5)<br>
<br>
Iulian<br>
<br>
<hr id="zwchr">
<blockquote style="border-left:2px solid
#1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;">I
think I may have found a bug in kdtree.<br>
<br>
My test problem consists of a tet mesh that is composed of
some 4000 <br>
tets. The mesh looks like that in mesh.png, a ray starts at
position <br>
(1,0,0) and fires along (1,0,0) and we get the following
results back <br>
from my test program swp.cpp<br>
<br>
Compile the minimum working example as<br>
<br>
g++ swp.cpp -I/<moab include dir> -L<moab lib dir>
-lMOAB<br>
<br>
<br>
This is as expected,<br>
<br>
# of intersections : 20<br>
intersection distances are on 8.5 8.74072 9.25928 9.5 18.5
18.7407 <br>
19.2593 19.5 28.5 28.7407 29.2593 29.5 38.5 38.7407 39.2593
39.5 48.5 <br>
48.7407 49.2593 49.5 of ray length 900<br>
<br>
8.5 9.5 18.5 19.5 etc are the boundaries of the faces of the
mesh.<br>
<br>
However, if we recompile and change the starting position to
(1,4,0) we get<br>
<br>
# of intersections : 17<br>
intersection distances are on 8.5 8.63513 9.06064 9.5 18.5
18.6351 <br>
19.0606 19.5 28.5 28.6351 29.0606 29.5 38.5 38.6351 39.0606
39.5 48.5 of <br>
ray length 900<br>
<br>
As far this ray is concerned there is no mesh in the 5th slab.<br>
<br>
What have I done wrong?<br>
<br>
Thanks<br>
<br>
Andy<br>
</blockquote>
<br>
</div>
</blockquote>
<br>
</blockquote><br></div></blockquote><br></div></blockquote><br></div></body></html>