<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>try this:</div><div><br></div><div><br></div><div><div> vtkOBBTree *obb = vtkOBBTree::New();</div><div> obb->SetDataSet( pdmesh );</div><div> obb->CacheCellBoundsOn();</div><div> obb->SetTolerance(0.0);</div><div> obb->BuildLocator();</div><div><br></div><div> double p0[3] = {x, y, z}; // point used in query</div><div> double p1[3] = {1e20,0.0,0.0};</div><div> int code = obb->IntersectWithLine(p0,p1,0,0);</div><div> // or : bool isInside = obb->InsideOrOutside(p0)<0;</div><div> bool isInside = (code==-1);</div><div><br></div><div><br></div><div>Good luck,</div><div><br></div><div>Bryn</div></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br><div><div>On Aug 23, 2008, at 12:24 PM, lucas Grijander wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div class="hmmessage" style="font-size: 10pt; font-family: Tahoma; ">Hi all,<br><br>I have a closed 3D mesh and a cloud of 3D points. For my application I have to find which points are inside the closed mesh and which are outside. The shape of the mesh is random, we cannot apply convex methods, etc... I would like to know if there is any method implemented in vtk to solve this problem?<br><br>best regards<br><br>Lucas.<br><br><hr>Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy!<span class="Apple-converted-space"> </span><a href="http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us" target="_new">Try it!</a><span class="Apple-converted-space"> </span>_______________________________________________<br>This is the private VTK discussion list.<br>Please keep messages on-topic. Check the FAQ at:<span class="Apple-converted-space"> </span><a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br></div></span></blockquote></div><br></div></body></html>