[vtkusers] TubeFilter on PolyData with constant Radius

Johannes Strecha j.strecha at gmail.com
Thu Nov 15 03:47:59 EST 2012


Hello again,

your problem seems to be the interpolation between the cell values that vtk
carries out. This interpolation is desired for most applications and
unfortunately I don't know a way to turn it off, but then my knowledge of
such internals is limited.

Johannes.


On Wed, Nov 14, 2012 at 5:06 PM, Karim Khayrat <kkhayrat at gmail.com> wrote:

> 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
>
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20121115/3faac938/attachment.htm>


More information about the vtkusers mailing list