<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<font size="-1"><font face="Tahoma">Hi David,<br>
<br>
That's what I've tried but it seems quite long when I iterated
threw all the lines.<br>
Anyway I'll try again and try to optimize it.<br>
<br>
</font></font><font size="-1"><font face="Tahoma">Thanks a lot,<br>
</font></font><br>
Le 03/01/2011 15:19, David Gobbi [via VTK] a écrit :
<blockquote
cite="mid:AANLkTinNUeUUASzn8hy9Xr6Cp=p3K_6R9RtnZuLgEVdg@mail.gmail.com"
type="cite"> On Mon, Jan 3, 2011 at 1:47 PM, nsarrasin <<a
moz-do-not-send="true" href="/user/SendEmail.jtp?type=node&node=3325747&i=0&by-user=t"
target="_top" rel="nofollow" link="external">[hidden email]</a>> wrote:
<br>
>
<br>
> First of all, Happy New Year to everyone !
<br>
>
<br>
> Now that's done, I describe my problem.
<br>
>
<br>
> Is there a way to construct a vtkPolyLine from a set of
vtkLines ?
<br>
<br>
Yes, the vtkStripper filter will do exactly that.
<br>
<br>
But there is something else that you need to fix. The Points in a
<br>
vtkPolyData are not ordered according to connectivity. What you
have
<br>
to do is get the cells from the data, since the PointIds in the
cells
<br>
_are_ ordered by connectivity:
<br>
<br>
vtkCellArray *lines = data->GetLines();
<br>
vtkPoints *points = data->GetPoints();
<br>
<br>
Go through all the polylines in the cell array and use the point
Ids
<br>
to get the points.
<br>
<br>
David
<br>
_______________________________________________
<br>
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com" target="_top" rel="nofollow" link="external">www.kitware.com</a>
<br>
<br>
Visit other Kitware open-source projects at <a
moz-do-not-send="true"
href="http://www.kitware.com/opensource/opensource.html"
target="_top" rel="nofollow" link="external">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a
moz-do-not-send="true" href="http://www.vtk.org/Wiki/VTK_FAQ"
target="_top" rel="nofollow" link="external">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:
<br>
<a moz-do-not-send="true"
href="http://www.vtk.org/mailman/listinfo/vtkusers"
target="_top" rel="nofollow" link="external">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br>
<br>
<hr noshade="noshade" size="1" color="#cccccc">
<div style="color: rgb(102, 102, 102); font: 11px
tahoma,geneva,helvetica,arial,sans-serif;"> View message @ <a
moz-do-not-send="true" href="http://vtk.1045678.n5.nabble.com/construct-a-vtkPolyLine-PolyGon-from-a-set-of-vtkLines-tp3325716p3325747.html?by-user=t" target="_top" rel="nofollow" link="external">http://vtk.1045678.n5.nabble.com/construct-a-vtkPolyLine-PolyGon-from-a-set-of-vtkLines-tp3325716p3325747.html</a><br>
To unsubscribe from construct a vtkPolyLine/PolyGon from a set
of vtkLines, <a moz-do-not-send="true" href="http://vtk.1045678.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3325716&code=bnNhcnJhc2luQHBoZW5peC1zeXN0ZW1zLmNvbXwzMzI1NzE2fC0xMTc5MTE0ODU5&by-user=t" target="_top" rel="nofollow" link="external">click
here</a>. </div>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>Test_Signature</title>
<hr style="width: 100%; height: 2px;">
<table style="text-align: left; font-family: Verdana; width:
500px; height: 110px;" border="0" cellpadding="2"
cellspacing="0">
<tbody>
<tr>
<td style="text-align: center; width: 80px; font-family:
Verdana;"><a href="www.phenix-systems.com?by-user=t" target="_top" rel="nofollow" link="external"></a></td>
<td style="width: 506px; font-family: Verdana;"><small style="color: rgb(51, 102, 102);"><span style="font-weight: bold;">Nicolas Sarrasin -
Ingénieur Developpement 3D CFAO</span><br style="background-color: transparent;">
<a style="background-color: transparent;
text-decoration: underline;" href="www.phenix-systems.com?by-user=t" target="_top" rel="nofollow" link="external">Phenix systems</a><br style="background-color: transparent; font-style:
italic;">
<small><span style="background-color: transparent;
font-style: italic;"> Parc Européen d'Entreprises </span><br style="background-color: transparent; font-style:
italic;">
<span style="background-color: transparent;
font-style: italic;">
rue Richard Wagner - 63200 Riom FRANCE </span><br style="font-style: italic;">
<span style="font-style: italic;">
tel : +33 (0)4 73 33 45 85 | fax : +33 (0)4 73 33 45
86 </span></small></small></td>
</tr>
<tr style="font-family: Verdana;">
<td colspan="2" rowspan="1" style="width: 80px;"><font
size="2" color="#36a629">Pensez environnement !</font><br>
<font size="1" color="#36a629">N'imprimez ce mail que si
c'est vraiment nécessaire</font></td>
</tr>
</tbody>
</table>
<br style="font-family: Verdana;">
</div>
<div class="small"><br/><img src="/images/icon_attachment.gif" > <strong>logo_contact.gif</strong> (3K) <a href="/attachment/3325773/0/logo_contact.gif" target="_top">Download Attachment</a></div>
<br><hr align="left" width="300">
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/construct-a-vtkPolyLine-PolyGon-from-a-set-of-vtkLines-tp3325716p3325773.html">Re: construct a vtkPolyLine/PolyGon from a set of vtkLines</a><br>
Sent from the <a href="http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html">VTK - Users mailing list archive</a> at Nabble.com.<br>