MercuryDPM  Trunk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Visualising Superquadrics in Paraview

MercuryDPM includes a paraview plugin to visualise superquadrics. Unfortunately, this requires you to build paraview-suberbuild from scratch. Below you find the installation instructions:

Installation instructions paraview-superbuild with superquadrics plugin

Tested on Xubuntu 16.04.3 LTS (Oracle VM VirtualBox) and Windows 10.1 (Developer mode using the Ubuntu shell

  1. Update apt
    $ sudo apt update
    # sudo apt upgrade
  2. You need gcc version 6 or higher (type gcc -v to see the version number). If you have an old version, you need to install gcc-6:
    $ sudo add-apt-repository ppa:ubuntu-toolchain-r/test
    $ sudo apt install gcc-6
  3. You need cmake version 3.10 or higher (type cmake –version). If you have an old version: (https://github.com/ruslo/hunter/issues/328#issuecomment-198672048)
    Remove cmake, cmake-curses-gui, cmake-qt-gui, curl
    $ sudo apt remove cmake curl
    Install necessary packages:
    $ sudo apt install zlib1g zlib1g-dev libssl-dev
    Download and install curl: https://curl.haxx.se/download.html
    $ wget https://curl.haxx.se/download/curl-7.56.1.tar.bz2
    $ tar xf curl-7.56.1.tar.bz2
    $ cd curl-7.56.1
    $ ./configure --with--ssl && make && sudo make install
    $ cd .. # you can now remove the folder curl-7.56.1
    $ curl --version # check curl is installed
    Install qt5
    $ sudo apt install qt5-default
    $ sudo apt install libncurses5-dev (ccmake command will also be created)
    Download and install cmake: https://cmake.org/download
    $ wget https://cmake.org/files/v3.10/cmake-3.10.0.tar.gz #Download cmake: https://cmake.org/download
    $ tar xf cmake-3.10.0.tar.gz
    $ cd cmake-3.10.0
    $ ./bootstrap --qt-gui --system-curl && make && sudo make install
    $ bash # restart bash such that it doesn't look for cmake in the old location
  4. Get paraview-superbuild
    $ sudo apt install git pkg-config #needed to make paraview
    $ mkdir ParaViewSuperBuild
    $ cd ParaViewSuperBuild
    $ git clone --recursive https://gitlab.kitware.com/paraview/paraview-superbuild.git Source
    $ cd Source
    $ git fetch origin
    $ git checkout v5.4.1
    $ git submodule update
    $ cd ../
    Install paraview-superbuild
    $ mkdir Build
    $ cd Build
    $ cmake ../Source -DENABLE_qt5=TRUE ../Source -DENABLE_qt5=TRUE -DENABLE_python=TRUE # use cmake-gui to debug if you encounter errors
    $ make && sudo make install #or make -j4 && sudo make install
    $ paraview & # check
    $ vi ~/ParaViewSuperBuild/Build/superbuild/paraview/build/ParaViewConfig.cmake
    Turn PARAVIEW_BUILD_QT_GUI, PARAVIEW_ENABLE_QT_SUPPORT, paraview_build_qt_gui from “ON” to “OFF”, and save.
  5. Download and install SuperquadricTensorGlyph
    $ svn co https://svn.mercurydpm.org/SourceCode/Trunk/Tools/SuperquadricTensorGlyphForParaviewSuperBuild SuperquadricTensorGlyph
    $ cd SuperquadricTensorGlyph
    $ mkdir Build
    $ cd Build
    $ cmake .. -DParaView_DIR=~/ParaViewSuperBuild/Build/superbuild/paraview/build
    $ make
  6. Load plugin
    In ParaView, go to Tools > Manage Plugins… Do Load New and select ~/SuperquadricTensorGlyph/Build/libSuperquadricTensorGlyphFilter.so. Click “OK”. Then the filter should appear on the Local plugins list, click on it and select "Auto Load", then close.
  7. Apply plugin
    When opening a *.vtu file with superquadric features, do "Apply" then go to Filters > Tensor Analysis > Superquadric Tensor Glyphs. Finally, do "Apply" again.