<!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 &eacute;crit&nbsp;:
    <blockquote
      cite="mid:AANLkTinNUeUUASzn8hy9Xr6Cp=p3K_6R9RtnZuLgEVdg@mail.gmail.com"
      type="cite"> On Mon, Jan 3, 2011 at 1:47 PM, nsarrasin &lt;<a
        moz-do-not-send="true" href="/user/SendEmail.jtp?type=node&amp;node=3325747&amp;i=0&by-user=t"
        target="_top" rel="nofollow" link="external">[hidden email]</a>&gt; wrote:
      <br>
      &gt;
      <br>
      &gt; First of all, Happy New Year to everyone !
      <br>
      &gt;
      <br>
      &gt; Now that's done, I describe my problem.
      <br>
      &gt;
      <br>
      &gt; 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. &nbsp;The Points in a
      <br>
      vtkPolyData are not ordered according to connectivity. &nbsp;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-&gt;GetLines();
      <br>
      vtkPoints *points = data-&gt;GetPoints();
      <br>
      <br>
      Go through all the polylines in the cell array and use the point
      Ids
      <br>
      to get the points.
      <br>
      <br>
      &nbsp; 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&amp;node=3325716&amp;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&eacute;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&eacute;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&nbsp;!</font><br>
              <font size="1" color="#36a629">N'imprimez ce mail que si
                c'est vraiment n&eacute;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>