I'd like to expand on Burlen's answer, which is correct. VTK sort of handles concave polygons and sort of doesn't. In particular, it does not render them correctly because the polygons are send directly to the OpenGL rendering system, which in turn does not handle them. It would be possible for VTK to handle this correctly, but it would be inefficient in the common case where polygons are convex.
In general, filters should handle concave polygons correctly. For example, run your polygon through the Triangulate filter. It will be properly triangulated and will then render correctly. This issue has shown up on the ParaView and VTK mailing lists before. For a lengthy discussion, see this email thread: http://markmail.org/message/e3fal43v6wzwkgm4 -Ken **** Kenneth Moreland *** Sandia National Laboratories *********** *** *** *** email: kmo...@sandia.gov ** *** ** phone: (505) 844-8919 *** web: http://www.cs.unm.edu/~kmorel From: Burlen Loring <blor...@lbl.gov<mailto:blor...@lbl.gov>> Date: Wed, 13 Jul 2011 14:01:55 -0700 To: David Doria <daviddo...@gmail.com<mailto:daviddo...@gmail.com>> Cc: ParaView <paraview@paraview.org<mailto:paraview@paraview.org>> Subject: Re: [Paraview] Displaying a flat polygon with multiple vertices Hi David, I think that the issue is that the polygon you constructed is not convex. Figure 19-20 in VTK users guide is misleading because the example of VTK_POLYGON shows a non-convex polygon which as you found out doesn't work. Burlen On 07/13/2011 01:40 PM, David Doria wrote: I have created a polygon with many vertices using vtkPolygon, then put it in a vtkPolyData, and then saved it as a vtp file (attached). When I open it in Paraview, it looks very "broken" (seems like backfaces are showing, things are overlapping that shouldn't be, etc). If I run the TriangleFilter on it, it looks fine. Is there something wrong with how I created the data? Or is Paraview just not able to handle displaying something like this? Thanks, David _______________________________________________ Powered by www.kitware.com<http://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 ParaView Wiki at: http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview _______________________________________________ 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 ParaView Wiki at: http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview
_______________________________________________ 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 ParaView Wiki at: http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview