[vtk-developers] [ARB?] Plans for the vtkGL2PSExporter class.

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Sat May 31 13:38:53 EDT 2003


Hi,

I've finally gotten around to adding the vtkGL2PSExporter class into
VTK CVS.  I'm not sure the ARB should be concerned with this but there
might be a few issues which the ARB might be interested in.

I'm CC'ing Goodwin since he has some advanced code that also handles
text and does some special culling to produce smaller PS files.  I
hope he has not given up on me and is not on vacation at this time.

Here are my plans for the class and various issues:

 1. I have a basic version of the class vtkGL2PSExporter that is
 derived from vtkExporter.  The class will go inside Rendering since
 it is an exporter and requires access to a RenderWindow (in order to
 invoke its Render method).  The class works for me on a vtkMy based
 build and supports a few of the important GL2PS flags.

 2. Earlier, there were discussions on adding gl2ps to VTK etc.  I
 think I'll go for a conservative approach for now.  I'll add an
 option in advanced options so that the user can choose to compile
 with gl2ps support or not.  The user will then have to supply the
 path to the gl2ps lib and header files during configuration.

 3. The class does not yet support text properly.  This will require
 modifications to vtkTextActor.  This could be somewhat involved.  I
 dont have any code for this yet but I believe Goodwin has a working
 implementation.  My plan is to first look at Goodwin's code and see
 how he does it.  What I'd like to eventually do is possibly toggle a
 global flag in the TextActor so that when gl2ps is generating output
 all TextActors will call gl2psText with the appropriate information.
 I dont know if this is workable or not.

 4. Finally Goodwin said that he had some code to cull backfaces and
 wireframes to reduce the size of the gl2ps output.  Perhaps these too
 can be incorporated.
   http://public.kitware.com/pipermail/vtkusers/2003-March/016798.html
 

Timeline:

 1.  I'm going to step 2 right away.  I'll integrate my local code
 into VTK CVS so that the basic exporter works with VTK.  I'm not sure
 I will be able to get it working immediately but I hope it will not
 be too hard.  Worst case it should be done by next weekend.  Over the
 course of the week after the commit I'll see if folks complain if
 I've broken anything else unintentionally.  Once this is done atleast
 non-text output should work fine.

 2. Investigate support for Text.  This depends on Goodwin's
 availability.  Once this is done I think bulk of the functionality
 should be in place.

 3. Investigate the backface culling etc.

 4. If the class is successful and users clamor for integration of
 GL2PS (just two files!) with VTK we'll bother the ARB with a request
 for a decision. :)


I guess that about sums it up.  I hope I'll get enough time to manage
this in a reasonable timeframe.

Finally, if there are going to be strong objections to my adding the
basic class to VTK then we can always back out the commits.  I want to
get this in ASAP before other pressing work takes me out of action for
a month or two! :(

cheers,
prabhu



More information about the vtk-developers mailing list