[vtkusers] Re: vtkLineSource - multiple points

Phil Cook p.cook at cs.ucl.ac.uk
Fri Oct 25 06:56:42 EDT 2002


> 
> Message: 1
> From: Stefan Bruckner <stefan.bruckner at chello.at>
> To: vtkusers at public.kitware.com
> Date: 24 Oct 2002 21:52:31 +0200
> Subject: [vtkusers] vtkLineSource - multiple points
> 
> Hi. I have a question regarding vtkLineSource: I want to create a
> polyline connecting several points. Additionally, I want to be able to
> add new points to the line later.
> 
> However, vtkLineSource only supports two points.
> 
> What's the best way to to this? Is using several line sources a good
> way, what alternatives are there?
> 
> Thanks for your help!
> 
> --
> Stefan Bruckner
> 
> 

Try vtkTubeFilter. It will draw a multi-sided (min sides == 3) tube
around lines composed of many points. First, define the points
(vtkPoints) and lines (vtkCellArray), then call poly->SetPoints(points)
and poly->SetLines(lines). You can then use poly as the input to a
vtkTubeFilter.

You will need to reapply the filter if you change the input points.


Phil




More information about the vtkusers mailing list