[vtkusers] Displaying a simple non convex polygon

Kemloh Ulrich kemlohulrich at gmail.com
Thu Feb 20 08:14:58 EST 2014


Thank you very much David.

I did not know about the convex requirement for the rendering.
That's exactly the piece of information I was missing.
Everything is working fine now after applying

vtkTriangleFilter

to the dataset.

Cheers

Ulrich

On 19.02.2014 22:47, David Gobbi wrote:
> Hi Ulrich,
>
> The vtkPolygon can store a non-convex polygon, but much of the
> polygon-related code in VTK (including the rendering code) requires
> the polygons to be convex.
>
> If you have a data set that has non-convex polygons, you should
> pass it through vtkTriangleFilter before rendering it.
>
>    David
>
>
>
> On Wed, Feb 19, 2014 at 11:45 AM, Ulrich Kemloh <kemlohulrich at gmail.com> wrote:
>> Dear VTK users,
>>
>> I am having some troubles displaying a simple non convex polygon.
>> There are at least two triangles strips out of nowhere which seem to be
>> connected to the first vertex.
>> Attached is the code and the output.
>>
>> It is quite simple, so I guess I might be doing something terribly wrong,
>> or I am missing some fundamental knowledge about vtk.
>> As far as I know vtkPolygon handles non convex polygons as well.
>> the Vertex should just be counter-clockwise.
>>
>> Any hints will be so highly appreciated.
>>
>> Viele Grüße
>> Ulrich
> _______________________________________________
> 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


More information about the vtkusers mailing list