[vtkusers] Gouraud shading of a vtkStructuredGrid's boundary

Luca Pallozzi Lavorante lplavorante at gmail.com
Wed Aug 10 13:51:08 EDT 2016


Sorry Cory, I was mistaken and way too quick in replying. When I wrote the
last mail I was still observing the output from the six combined
vtkStructuredGridGeometryFilter's. Now I have tried one single filter
without providing any SetExtent call and the result I have is the
visualization of the StructuredGrid's points. No Boundary. How can I
instruct the filter to generate the Boundaries?

Thank you

   Luca

On Wed, Aug 10, 2016 at 2:44 PM, Luca Pallozzi Lavorante <
lplavorante at gmail.com> wrote:

> Hi Cory, thank you for your reply.
>
> You are absolutely right! I have followed  your adviced and removed the
> SetExtent() call to vtkStructuredGridGeometryFIlter (I had previously
> used six of them to get the all the boundaries and then merged them with
> vtkAppendPolyData) and I have magically obtained the complete boundary as
> output with a single filter.
> It worked really fine.
> Thank you for your kind help!
>
> Best regards,
>
>    Luca
>
>
> On Wed, Aug 10, 2016 at 2:07 PM, Cory Quammen <cory.quammen at kitware.com>
> wrote:
>
>> Luca,
>>
>> You are on the right track. vtkStructuredGridGeometryFilter should
>> extract just one polydata defining all the boundaries of your structured
>> grid. In the end, your pipeline should look like
>>
>> vtkStructuredGrid -> vtkStructuredGridGeometryFilter -> vtkPolyDataNormals
>> -> vtkDataSetMapper -> vtkActor
>>
>> HTH,
>> Cory
>>
>> On Wed, Aug 10, 2016 at 12:08 PM, Luca Pallozzi Lavorante <
>> lplavorante at gmail.com> wrote:
>>
>>> Hi everybody,
>>> Is there  any way to visualize a StructuredGrid's boundary with Gouraud
>>> shading?
>>> When I use a very simple pipeline vtkStructuredGrid -> vtkDataSetMapper
>>> -> vtkActor I am able to visualize the closed boundary of the grid. The
>>> polygons used in the rendering are triangles with a flat shading look.
>>> If I wish to apply  a Gouraud shading to this boundary, should I extract
>>> this closed surface as a vtkPolyData and then use vtkPolyDataNormals on it?
>>> If this is the case, How can I extract the boundary? Should I use
>>> vtkStructuredGridGeometryFilter to obtain six separate polydata's
>>> defining the boundary and then append them using vtkAppendPolyData?
>>>
>>> Thank you very much for your help
>>>
>>> Luca Pallozzi Lavorante
>>>
>>> _______________________________________________
>>> 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
>>>
>>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://public.kitware.com/mailman/listinfo/vtkusers
>>>
>>>
>>
>>
>> --
>> Cory Quammen
>> R&D Engineer
>> Kitware, Inc.
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160810/223860a3/attachment.html>


More information about the vtkusers mailing list