Hi Che, <br>
I have succesfully used vtkCellLocator::IntersectWithLine, although I donīt know the meaning of all its arguments:<br>
I have done the following:<br>
<br>
if (locator-&gt;IntersectWithLine(p1, p2, 0.001, t, pline, pcoords, subId, cellid, cell) != 0) {<br>
&nbsp; // Enters here if there is intersection<br>}<br>
<br>
where:<br>
<br>
&nbsp; p1 and p2 are the intersecting lineīs endpoints,<br>
&nbsp; double t = 0.0;<br>
&nbsp; double pline[3] = { 0, 0, 0};<br>
&nbsp; double pcoords[3] = { 0, 0, 0};<br>
&nbsp;&nbsp; int subId = 0;<br>
&nbsp;&nbsp; int cellid = -1;<br>
&nbsp;&nbsp; vtkGenericCell *cell = vtkGenericCell::New();<br>
<br>
Using the 'cell' instance you can get interesting informations about
the triangle involved in the intersection, but I havenīt&nbsp; used
this feature. <br>
<br>
Also, donīt forget to do sometthing like this before invoking the IntersectWithLine method:<br>
<br>
vtkCellLocator *locator = vtkCellLocator::New();<br>
&nbsp;&nbsp; locator-&gt;SetDataSet(vtkPolyData* data);<br>
&nbsp;&nbsp; locator-&gt;BuildLocator();<br>
<br>
Hope this help<br>
<br>
&nbsp;&nbsp;&nbsp; Luca<br>
<br>
<br><div><span class="gmail_quote">On 11/20/06, <b class="gmail_sendername">Chavdar Papazov</b> &lt;<a href="mailto:chenkaz@yahoo.com">chenkaz@yahoo.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Dear VTK Users,<br><br>would you explain to me how to use the method 'IntersectWithLine()' of the class vtkCellLocator.<br>There are three versions of this method. The first one is:<br><br>virtual vtkCellLocator::IntersectWithLine(double a0[3], 
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
double x[3],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
double pcoords[3],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
int&amp; subid)<br><br><br>In the html-doc there is no explanation of the parameters of the method, so I don't know how to call it.<br>I
have a vtkPolyData object and two points in 3D which define the line.
And I want to check whether the line intersects the vtkPolyData object.<br><br>Do you have any ideas?<br>Thanks!<br><br>Che<br><p> 

<font color="#666666"><font size="2"><hr size="1">Sponsored Link</font></font><br><br>   
<a href="http://forms.nextag.com/goto.jsp?url=/serv/main/buyer/education.jsp?doSearch=n&amp;tm=y&amp;search=wrkg_adults_1yr&amp;s=3968&amp;p=5036" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Degrees for working adults in as fast as 1 year. Bachelors, Masters, Associates. Top schools
</a>
</p><br>_______________________________________________<br>This is the private VTK discussion list.<br>Please keep messages on-topic. Check the FAQ at: <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">
http://www.vtk.org/Wiki/VTK_FAQ</a><br>Follow this link to subscribe/unsubscribe:<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers
</a><br><br><br></blockquote></div><br>