[vtkusers] construct a vtkPolyLine/PolyGon from a set of vtkLines

nsarrasin nsarrasin at phenix-systems.com
Mon Jan 3 09:37:43 EST 2011


Hi David,

That's what I've tried but it seems quite long when I iterated threw all 
the lines.
Anyway I'll try again and try to optimize it.

Thanks a lot,

Le 03/01/2011 15:19, David Gobbi [via VTK] a écrit :
> On Mon, Jan 3, 2011 at 1:47 PM, nsarrasin <[hidden email] 
> </user/SendEmail.jtp?type=node&node=3325747&i=0>> wrote:
> >
> > First of all, Happy New Year to everyone !
> >
> > Now that's done, I describe my problem.
> >
> > Is there a way to construct a vtkPolyLine from a set of vtkLines ?
>
> Yes, the vtkStripper filter will do exactly that.
>
> But there is something else that you need to fix.  The Points in a
> vtkPolyData are not ordered according to connectivity.  What you have
> to do is get the cells from the data, since the PointIds in the cells
> _are_ ordered by connectivity:
>
> vtkCellArray *lines = data->GetLines();
> vtkPoints *points = data->GetPoints();
>
> Go through all the polylines in the cell array and use the point Ids
> to get the points.
>
>   David
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: 
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
> ------------------------------------------------------------------------
> View message @ 
> http://vtk.1045678.n5.nabble.com/construct-a-vtkPolyLine-PolyGon-from-a-set-of-vtkLines-tp3325716p3325747.html
> To unsubscribe from construct a vtkPolyLine/PolyGon from a set of 
> vtkLines, click here 
> <http://vtk.1045678.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3325716&code=bnNhcnJhc2luQHBoZW5peC1zeXN0ZW1zLmNvbXwzMzI1NzE2fC0xMTc5MTE0ODU5>. 
>

-- 
------------------------------------------------------------------------
Logo Phenix Systems <www.phenix-systems.com> 	Nicolas Sarrasin - 
Ingénieur Developpement 3D CFAO
Phenix systems <www.phenix-systems.com>
Parc Européen d'Entreprises
rue Richard Wagner - 63200 Riom FRANCE
tel : +33 (0)4 73 33 45 85 | fax : +33 (0)4 73 33 45 86
Pensez environnement !
N'imprimez ce mail que si c'est vraiment nécessaire



-- 
View this message in context: http://vtk.1045678.n5.nabble.com/construct-a-vtkPolyLine-PolyGon-from-a-set-of-vtkLines-tp3325716p3325773.html
Sent from the VTK - Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110103/8634cc34/attachment.htm>


More information about the vtkusers mailing list