[vtkusers] TubeFilter on PolyData with constant Radius

Karim Khayrat kkhayrat at gmail.com
Wed Nov 14 11:06:32 EST 2012


I attached a simple example. As David said, I would like to have each edge
have a fixed radius, independent of it's neighbour. I tried using
SetInputArrayToProcess() with FIELD_ASSOCIATION_CELLS , and have the radii
stored as CellData, but it doesn't seem to work. Have I used it correctly ?
An alternative would be to create 2 separate points for every line ( which
would mean defining multiple points at the same location), but I hope this
is unnecessary.

On 14 November 2012 13:44, David Doria <daviddoria at gmail.com> wrote:

> 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
>



-- 
Karim Khayrat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20121114/e57c3440/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Simple_network.py
Type: application/octet-stream
Size: 2470 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20121114/e57c3440/attachment.obj>


More information about the vtkusers mailing list