<br><div class="gmail_quote">On Thu, Feb 25, 2010 at 6:22 AM, Andrea Bottino <span dir="ltr">&lt;<a href="mailto:andrea.bottino@polito.it">andrea.bottino@polito.it</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">






<div bgcolor="#ffffff" text="#000000">
<font size="-1"><font face="Verdana">Hi everybody,<br>
this is probably a trivial question, but after half an hour of
navigation into the documentation, I think I got a little bit lost. The
point is:<br>
- I have a vtkPolyData and I want to intersect it with a line<br>
- I was trying to recycle a similar function I wrote which was cutting
the mesh with a plane with vtkCutter, but there&#39;s no implicit function
defining a line<br>
<br>
can somebody give me a hint, or few lines of code hot to perform this
operation? (e.g. by defining start-endpoint of the line/segment)<br>
<br>
regards,<br>
a.<br>
</font></font></div><div bgcolor="#ffffff" text="#000000"><font size="-1"><font face="Verdana"><br></font></font></div></blockquote><div><br></div><div>You should load the polydata into some kind of data structure (OBBTree, KdTree, CellLocator). All of these have an IntersectWithLine function.</div>
<div><br></div><div>Here is an example:</div><div> </div><a href="http://www.vtk.org/Wiki/VTK/Examples/OBBTree">http://www.vtk.org/Wiki/VTK/Examples/OBBTree</a></div><div class="gmail_quote"><br></div><div class="gmail_quote">
Let us know if you have any problems.</div><div class="gmail_quote"><br clear="all">Thanks,<br><br><div>David </div></div>