[vtkusers] Displaying a simple non convex polygon

David Gobbi david.gobbi at gmail.com
Wed Feb 19 16:47:52 EST 2014


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


More information about the vtkusers mailing list