[vtkusers] TubeFilter on PolyData with constant Radius

David Doria daviddoria at gmail.com
Wed Nov 14 07:44:17 EST 2012


On Wed, Nov 14, 2012 at 2:35 AM, Johannes Strecha <j.strecha at gmail.com>wrote:

> Hi,
>
> I'm not sure if I understand your problem correctly. I assume you have the
> polydata with the scalar you want to vary the tube radius by as a named
> array in the pointData (as returned by yourPolyData.GetPointData()). You
> could try to specify which array to process with the TubeFilters inherited
> method SetInputArrayToProcess<http://www.vtk.org/doc/release/5.8/html/a00128.html#6bea16e1329609dbccce0ff8d2367484>(int idx, int port, int connection, int fieldAssociation, const char
> *name). fieldAssociation will most likely be FIELD_ASSOCIATION_POINTS, idx,
> port, connection most likely 0. Check the class reference for further
> information*.
>
> Kind regards,
> Johannes Strecha.*


Sounds like you want to make an array on the CellData so that every edge
has a scalar rather than every vertex having a scalar. Then you can specify
which array to use using something like what Johannes said. Of course,
you'll have to decide on the logic to make a value for each edge from the
values on each of its end points - the same trouble VTK was having :)

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20121114/97a97cb4/attachment.htm>


More information about the vtkusers mailing list