[Paraview] Building a PlugIn for v3 for an existing Reader (OpenFOAM)

Clinton Stimpson clinton at elemtech.com
Tue May 29 11:06:46 EDT 2007


The server side OpenFOAM stuff is already built into ParaView.
You just need a GUI side plugin.
There was a typo on the Wiki that is now fixed.
Use GUI_RESOURCES instead of GUI_RESOURCE

FIND_PACKAGE(ParaView REQUIRED)
INCLUDE(${PARAVIEW_USE_FILE})
ADD_PARAVIEW_PLUGIN(OpenFOAMGUIPlugin "1.0" 
                    GUI_RESOURCES foamReader.qrc )


Clint

Bernhard Gschaider wrote:
> Hi!
>
> I'm trying to include the reader found in
>
> VTK/IO/vtkOpenFOAMReader.cxx
>
> into the Paraview3-GUI with a PlugIn. I'm using two sources of
> information:
>
> 1. http://paraview.org/Wiki/Plugin_HowTo
> 2. Examples/Plugins/GUIReader from the PAraview-Sources
>
> To me they seem to contradict each other. 1 says that I need a
> server-Plugin as well in 2 (and the neighbouring directories) I see no
> trace for that. From 2 I derived this:
>
> CMakeLists.txt:
>
> FIND_PACKAGE(ParaView REQUIRED)
> INCLUDE(${PARAVIEW_USE_FILE})
> ADD_PARAVIEW_PLUGIN(OpenFOAMGUIPlugin "1.0" 
>                     GUI_RESOURCE foamReader.qrc )
>
> foamReader.qrc:
>
> <RCC>
>     <qresource prefix="/ParaViewResources" >
>         <file>foamReader.xml</file>
>     </qresource>
> </RCC>
>
> foamReader.xml:
>
> <ParaViewReaders>
>   <Reader name="OpenFOAMReader"
>           extensions="controlDict foam"
>           file_description="OpenFOAM Files">
>   </Reader>
> </ParaViewReaders>
>
>
> When I run ccmake on this I get this message when configuring:
>
>  You have called ADD_LIBRARY for library OpenFOAMGUIPlugin without any source
>  files. This typically indicates a problem with your CMakeLists.txt file
>
> Compiling generates nothing. 
>
> Am I missing something embarrasingly obvious? Or did I misunderstand
> something?
>
> Bernhard
>
> PS: I also tried adding this to CMakeLists.txt
>
> ADD_PARAVIEW_PLUGIN(OpenFOAMSMPlugin "1.0" 
>                     SERVER_MANAGER_XML foamReader.xml
>                     SERVER_MANAGER_SOURCES /path/to/ParaView3/VTK/IO/vtkOpenFOAMReader.cxx)
>
> This generates a .so (although the XML-File is not correct I think)
> that loads into paraview but I guess I need the GUI-Plugin to see it
> in the File-Open-dialog.
> _______________________________________________
> ParaView mailing list
> ParaView at paraview.org
> http://www.paraview.org/mailman/listinfo/paraview
>   



More information about the ParaView mailing list