<div>Actually the approach you suggested (using feature edges + loop) is the one I&#39;m using now, and is working without problems.</div><div><br></div><div>Thanks!</div><div>Miguel</div><div><br><br><div class="gmail_quote">
2011/8/1 Adriano Gagliardi <span dir="ltr">&lt;<a href="mailto:agagliardi@ara.co.uk">agagliardi@ara.co.uk</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<u></u>



<div>
<div><span><font face="Arial" color="#0000ff" size="2">There 
is a class in ParaView that will do this for you, but unfortunately it is not 
available in VTK yet. However, it has been flagged up in 
Mantis.</font></span></div>
<div><span><font face="Arial" color="#0000ff" size="2"></font></span> </div>
<div><span><font face="Arial" color="#0000ff" size="2">I&#39;ve 
done something similar as you want, but I managed to obtain connectivity 
information first by using extracting feature edges. I then order the 
points in clockwise fashion by doing a simple loop around each feature edge (or 
vtkLine), which would then loop around the rest of the edges looking for a 
common point. This worked for me in the end although for a very large number of 
points it will get slow. The other option is to come up with a scalar value 
that gives you the correct ordering of the points and then sort the points based 
on it (something like value = sqrt(x*x + y*y)*(value for direction). Otherwise, 
I&#39;d check out vtkPlotEdges in the ParaView distribution and see if you can 
integrate it into VTK yourself.</font></span></div>
<div><font face="Arial" color="#0000ff" size="2"></font> </div>
<div><span><font face="Arial" color="#0000ff" size="2">Cheers,</font></span></div>
<div><span><font face="Arial" color="#0000ff" size="2">Adriano</font></span></div>
<p><font size="2">===================================<br><br>Adriano Gagliardi 
MEng PhD<br>Business Sector Leader<br>Computational Aerodynamics<br>Aircraft 
Research Association Ltd.<br>Manton Lane<br>Bedford<br><br>Tel: 01234 32 
4644<br>E-mail: <a href="mailto:agagliardi@ara.co.uk" target="_blank">agagliardi@ara.co.uk</a><br>Url: <a href="http://www.ara.co.uk" target="_blank">www.ara.co.uk</a> </font></p>
<div> </div><br>
<div lang="en-us" dir="ltr" align="left">
<hr>
<font face="Tahoma" size="2"><b>From:</b> <a href="mailto:vtkusers-bounces@vtk.org" target="_blank">vtkusers-bounces@vtk.org</a> 
[mailto:<a href="mailto:vtkusers-bounces@vtk.org" target="_blank">vtkusers-bounces@vtk.org</a>] <b>On Behalf Of </b>Miguel 
Sotaquirá<br><b>Sent:</b> 30 July 2011 04:14<br><b>To:</b> 
<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a><br><b>Subject:</b> [vtkusers] Sort unordered set of points 
clockwise (orcounter-clockwise)<br></font><br></div><div><div></div><div class="h5">
<div></div>Hi,
<div><br></div>
<div>In 3-D space I have an unordered set of, say, 6 points; something like 
this:</div>
<div><br></div>
<div>               (A)*</div>
<div>                     
         (C)*</div>
<div>(E)*</div>
<div>                     
        (F)*</div>
<div>         (B)*</div>
<div><br></div>
<div>                     
 (D)*</div>
<div><br></div>
<div>The points form a 3-D contour but they are unordered. For unordered I 
mean that they are stored in a vtkIdList = [A - B - C - D - E - F]. I just want 
to reorganize this list starting from an arbitrary location (let&#39;s say point A) 
and traversing the points clockwise or counter-clockwise. Something like 
this:</div>
<div><br></div>
<div>orderedList = [A - E - B - D - F - C]</div>
<div>or</div>
<div>orderedList = [A - C - F - D - B - E]</div>
<div><br></div>
<div>I&#39;m trying to implement an algorithm as simple as possible, since 
the set of points in mention corresponds to a N-ring neighborhood of each 
vertex on a mesh of ~420000 points, and I have to do this for each point on the 
mesh.</div>
<div><br></div>
<div>How can I do this in VTK?</div>
<div><br></div>
<div>Thanks,</div>
<div>Miguel</div></div></div><p>**********************************************************************<br>This email contains information that is private and confidential and is intended only for the addressee.<br>If you are not the intended recipient please delete it and notify us immediately by e-mailing the sender.<br>
Note: All email sent to or from this address may be accessed by someone other than the recipient, for<br>system management and security reasons.<br>Aircraft Research Association Ltd.  Registered in England, Registration No 503668 Registered Office:<br>
Manton Lane, Bedford MK41 7PF England VAT No GB 196351245</p><p>**********************************************************************</p>
</div>
</blockquote></div><br></div>