<div dir="ltr"><div><div>Also, OBBTree, contrary to my initial comments, seems to work.<br></div>See:<br><a href="http://itk.org/Wiki/VTK/Examples/Cxx/DataStructures/OBBTreeExtractCells">http://itk.org/Wiki/VTK/Examples/Cxx/DataStructures/OBBTreeExtractCells</a><br>
<br></div>Bill<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Apr 7, 2013 at 12:56 PM, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>This example:<br><a href="http://itk.org/Wiki/VTK/Examples/Cxx/DataStructures/ModifiedBSPTreeExtractCells" target="_blank">http://itk.org/Wiki/VTK/Examples/Cxx/DataStructures/ModifiedBSPTreeExtractCells</a><br>
<br></div>
<div>illustrates how to extract cells intersected by a line.<br><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 5, 2013 at 6:00 PM, Alex Malyushytskyy <span dir="ltr"><<a href="mailto:alexmalvtk@gmail.com" target="_blank">alexmalvtk@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Have you tried vtkModifiedBSPTree? It has IntersectWithLine version which returns multiple cells.<br>
</div><div><span><font color="#888888">
</font></span><table><tbody><tr><td>virtual <a href="http://www.vtk.org/doc/nightly/html/vtkVectorOperators_8h.html#a61569f2965b7a369eb10b6d75d410d11" target="_blank">int</a> vtkModifiedBSPTree::IntersectWithLine </td>
<td>(</td>
<td>const <a href="http://www.vtk.org/doc/nightly/html/vtkVectorOperators_8h.html#a45c855d65dd0e2b57b08024500ff9159" target="_blank">double</a> </td>
<td><em>p1</em>[3], </td>
</tr>
<tr>
<td><br></td>
<td><br></td>
<td>const <a href="http://www.vtk.org/doc/nightly/html/vtkVectorOperators_8h.html#a45c855d65dd0e2b57b08024500ff9159" target="_blank">double</a> </td>
<td><em>p2</em>[3], </td>
</tr>
<tr>
<td><br></td>
<td><br></td>
<td>const <a href="http://www.vtk.org/doc/nightly/html/vtkVectorOperators_8h.html#a45c855d65dd0e2b57b08024500ff9159" target="_blank">double</a> </td>
<td><em>tol</em>, </td>
</tr>
<tr>
<td><br></td>
<td><br></td>
<td><a href="http://www.vtk.org/doc/nightly/html/classvtkPoints.html" target="_blank">vtkPoints</a> * </td>
<td><em>points</em>, </td>
</tr>
<tr>
<td><br></td>
<td><br></td>
<td><a href="http://www.vtk.org/doc/nightly/html/classvtkIdList.html" target="_blank">vtkIdList</a> * </td>
<td><em>cellIds</em> </td>
</tr>
<tr>
<td><br></td>
<td>)</td><td><br></td></tr></tbody></table></div><span><font color="#888888"><br></font></span></div><span><font color="#888888">Alex</font></span></div><div><div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 5, 2013 at 2:12 PM, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I'm sorry. I should have said I have low confidence that vtkOBBTree::IntersectWithLine will work. If it does not, it is a bug.<span><font color="#888888"><br>
<br></font></span></div><span><font color="#888888">Bill<br></font></span></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Fri, Apr 5, 2013 at 4:39 PM, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div><div>David,<br><br></div>In theory the vtkOBBTree::IntersectWithLine should do the job, but since that method has 0 test coverage and my preliminary testing indicates it only returns the first intersection.<br>
<br></div>More investigation is required.<br><br></div>Bill<br><br></div><div class="gmail_extra"><div><div><br><br><div class="gmail_quote">On Fri, Apr 5, 2013 at 2:54 PM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Andreas,<br>
<br>
Look at vtkOBBTree. It has a method called InstersectWithLine that<br>
can return the Ids of all of the cells that are intersected by a line.<br>
<br>
- David<br>
<div><div><br>
On Fri, Apr 5, 2013 at 12:07 PM, Andreas Buykx <<a href="mailto:A.Buykx@tnodiana.com" target="_blank">A.Buykx@tnodiana.com</a>> wrote:<br>
> Hi all,<br>
><br>
><br>
><br>
> I’m looking for a way to extract cells from an unstructured grid by a<br>
> polyline selection, similar to what vtkImplicitSelectionLoop does for a<br>
> closed polygon. Is this something that can be implemented efficiently with<br>
> algorithms from VTK or should I write a custom algorithm?<br>
><br>
><br>
><br>
> Thanks,<br>
><br>
> Andreas Buykx<br>
><br>
> Senior Software Engineer<br>
><br>
><br>
><br>
> TNO DIANA BV<br>
><br>
> Software Developers and Analysis Consultants for Civil and Geotechnical<br>
> Engineering<br>
><br>
><br>
><br>
> Delftechpark 19a, 2628 XJ, Delft, The Netherlands<br>
><br>
> Tel: <a href="tel:%2B31%2088%2034262%2015" value="+31883426215" target="_blank">+31 88 34262 15</a> (Direct) │ Tel: <a href="tel:%2B31%2088%2034262%2000" value="+31883426200" target="_blank">+31 88 34262 00</a> (Switchboard) │ +31 88<br>
> 34262 99 (Fax)<br>
><br>
> <a href="http://tnodiana.com" target="_blank">http://tnodiana.com</a><br>
><br>
><br>
><br>
> …be green keep it on screen<br>
><br>
><br>
><br>
> ____________________________________________________________<br>
> TNO DIANA BV is a limited liability company registered in the trade register<br>
> of the Chamber of Commerce as TNO DIANA BV with registered number 27252655.<br>
> ____________________________________________________________<br>
> This e-mail and its contents are subject to the DISCLAIMER at<br>
> <a href="http://tnodiana.com/content/Disclaimer" target="_blank">http://tnodiana.com/content/Disclaimer</a><br>
> ____________________________________________________________<br>
</div></div>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br><br clear="all"><br></div></div><span><font color="#888888">-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</font></span></div>
</blockquote></div><br><br clear="all"><br>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div>
</div></div><br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div>