[vtk-developers] VTK Wiki example using vtkFrustumSource

David Cole dlrdave at aol.com
Mon Jul 28 08:26:23 EDT 2014


This example:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Frustum

uses vtkFrustumSource to visualize the view frustum from a vtkCamera 
object.

The example's test was failing on my Windows Debug dashboard because 
the vtkFrustumSource defaults to "ShowLines" ON, and when ShowLines is 
on, there are extra points added to the polydata output.... but the 
coordinate values of those points are never set, and so the geometric 
data is undefined, resulting in ridiculous bounds values in the Debug 
build. (Thanks to the Microsoft compiler's 
forced-crazy-value-initialization of uninitialized stuff...)

The code in question is here:
http://vtk.org/gitweb?p=VTK.git;a=blob;f=Filters/Sources/vtkFrustumSource.cxx;h=7803ece7810d3cce76efd5f2d83e8099f1973a87;hb=refs/heads/master#l146

(5 extra points are added, but point ID values 8, 9, 10, 11, and 12 are 
never set, even though they *are* referenced later on...)

So: does anybody here know what the extra points are supposed to be set 
to? If so, could you submit a gerrit patch? If not, could we remove the 
extra points from the output since they're not well defined...?

I "fixed" the example for now by setting ShowLines to OFF.


Thanks,
David C.



More information about the vtk-developers mailing list