Paraview plugin

When we would like to display geometries from G+Smo .xml files, we must first convert the xml file to a Paraview file (.vts, .pvd, …), typically with gsView, and then open this file inside Paraview. The G+Smo Paraview plugin allows to open G+Smo .xml files inside Paraview program.

This wiki page describes how to set up and use the plugin.

Set up

The compilation requires three steps: building Paraview from source, building G+Smo paraview plugin and enabling the plugin inside Paraview.

Building Paraview from source

  • Downloading Paraview source. Go to the webpage and for the Type of Download choose Paraview Source Files. Then download the source files to your computer.
  • Build Paraview. Unpack the source files to some directory. Make the build directory and build the Paraview with cmake and make commands.

Build G+Smo paraview plugin

  • Set the following G+Smo cmake options:
    • Paraview_DIR to Paraview build directory from previuos step.
  • Then make GiSmoPlugin.

It is recommended to build G+Smo in release mode, to get the fastest performance of the plugin. But it is not required.

Enabling the plugin inside Paraview

  • Go to Tools -> Manage Plugins.
    In Plugin Manager click Load New.
    Go to the Paraview build directory, enter the lib subdirectory and select
  • [Optional but recommended] If you want that the plugin is auto loaded every time when you start Paraview, then you check the Auto Load box of G+Smo Plugin inside Plugin Manager.

Congratulations, you set up the G+Smo plugin inside Paraview.

Using Paraview Plugin

The Paraview plugin can display multipatch geometries of

  • Curves (don't forget to change the layout to Outline)
  • Surfaces
  • Volumes (change the layout to Surface

We can specify the Resolution in Properties tab. There is also an option to plot the control net of given geometry.

Finally, we can choose between three ways of Plot style:Geometry, Mesh and Geometry and Mesh.

Note to developers

The code is inside devel/plugins/gsParaview. The most important is the vtkGismoReader.cxx file. The member function responsible for displaying is vtkGismoReader::RequestData. Paraview can use normals to display "smooth" surfaces. This approach is used for surfaces. TO DO:

  • implement gsGeometry::outerNormal_into member function and use normals to display "smooth" volumes,
  • implement reader for gsBasis class,
Last modified 2 years ago Last modified on 2015-10-08T21:17:34+01:00