[vtkusers] Surface view for polygons shows redundant area

David E DeMarle dave.demarle at kitware.com
Thu Feb 7 12:45:31 EST 2013


OpenGL does not draw concave polygons correctly. VTK and ParaView
don't then, because we don't want to pay the price to convert them
before rendering for this corner case.

Search the mailing list (via mark mail) for previous discussions and
potential solutions.

David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909


On Thu, Feb 7, 2013 at 11:39 AM, Siavash Ameli <sameli at hawk.iit.edu> wrote:
> I am trying to display polygons in ParaView and VTK, but I do not get
> correct "surface" view. It seems that it draws redundant lines (areas); all
> excessive lines originated from point with index 0 and each line end up to
> all other points. Then surface view fills the area between consecutive
> redundant lines, sometimes with different color. The issue can be
> accentuated by using a concave polygon. Consider the following vtk file
> (file attached, Polygon.vtk):
>
> # vtk DataFile Version 3.0
> output of my filter
> ASCII
> DATASET POLYDATA
> POINTS 12 float
> -3 3 0
> -3 -3 0
> -2 0 0
> -1 1 0
> -1 -1 0
> 0 2 0
> 0 -2 0
> 1 1 0
> 1 -1 0
> 2 0 0
> 3 3 0
> 3 -3 0
>
> POLYGONS 2 14
> 8 0 2 1 6 11 9 10 5
> 4 3 4 8 7
>
> Three points with indices 0, 5 and 10 are on a concave boundary segment,
> with edges 0 to 5 and  5 to 10. However, surface view shows a link from
> point 0 to 10 (screenshot attached, Polygon.png). Same issue happens from
> point 0 to point 1. If you try polygons with more vertices, you can see it
> draws lines from point 0 to "all" other points. Only wireframe view reveals
> the two polygons properly in this file.
>
> Additionally, I have attached an editted Polygon.cxx code from wiki (files
> attached, Polygon.cxx and CMakeLists.txt) to display a simpler concave
> polygon with 6 vertices in VTK. Please switch comments in actor properties
> to see the inconsistency between surface and wireframe views.
>
> I would like to ask that is it a bug or am I doing something wrong?
>
> Thank you.
>
> -Siavash
>
> ---------------------------------------------------
> Siavash Ameli
> Ph.D student at Mechanical and Aerospace Eng. Dept.
> Illinois Institute Of Technology
> 10 West 32nd St. E-1, Suite 130H
> Chicago IL 60616
> Phone: (312) 567-3555
>
>
>
>
> _______________________________________________
> 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