Axel Plugin

In order to compile and use the Axel plugin, first we need to fetch and compile Axel. Then we can compile the plugin in gismo. Detailed instructions follow.

Note: On windows the procedure is analogous. Please use the CMake option DTK_USE_PRECOMPILED_HEADERS=OFF when configuring Axel.

On Linux

Axel depends on two libraries: Qt4/Qt5 and Vtk. therefore we first need to install those libraries to the system. The respective packages usually have names as

qt4 (or) libqt4

vtk (or) libvtk

In some linux distributions there is a separate package for the header/developer files, which is also required, should be called

qt4-dev (or) qt4-devel (or) libqt4-devel

vtk-dev (or) vtk-devel

Alternatively you can always download the sources of these libraries and compile them. We describe this process for VTK here:

Compiling VTK

Download and extract sources from http://www.vtk.org/VTK/resources/software.html

Important note: Axel is currently not compatible with VTK 6.x. One must download VTK version 5.x.

Then:

mkdir build-vtk
cd build-vtk
cmake ../<vtk-sources-path> -DVTK_USE_QT=ON
make -j2

Compiling Axel

Note: If Axel has already been installed system-wide by your system administrator you may skip this step.

Axel can be downloaded from the gitorious repository as follows (the master branch requires an installed Qt5 framework):

git clone git://dtk.inria.fr/axel/axel-sdk.git axel-sdk

There is also a legacy branch available which can still be used with Qt4:

git clone --branch master_legacy git://dtk.inria.fr/axel/axel-sdk.git axel-sdk

Note: The version that are posted on the website might not work with the plugin. Please use the latest git revision.

The actual sources will be downloaded using the config script, i.e.

cd axel-sdk
./scripts/config_anonym

After that, we need to make a new folder and build:

cd ..
mkdir build-axel
cd build-axel
cmake ../<path-to-axel-sdk> -DVTK_DIR=/<path-to-build-vtk>  -DAXL_WRAP_PYTHON=OFF -DDTK_USE_PRECOMPILED_HEADERS=OFF
make -j2

If you did not compile VTK yourself, you do not need -DVTK_DIR=/<path-to-build-vtk>.

Compiling the Axel plugin

In G+Smo CMake build configuration, set GISMO_BUILD_AXL=ON and configure. There should be an error message saying that Axel is not found.

For this, set the variable Axel_DIR to the full path of the build folder of Axel (eg. ~/build-axel) and configure again. For example, the complete command is:

cmake ../gismo/trunk -DGISMO_BUILD_AXL=ON -DAxel_DIR=/<path-to-axel-build> -DCMAKE_BUILD_TYPE=Release

In the above, we also added the -DCMAKE_BUILD_TYPE=Release to have a release build.

When you compile the plugin the resulting dynamic library libgsAxel.so is created in the subfolder plAxel. Axel looks in its plugins subdirectory for libraries and automatically includes them. To avoid having to copy over the library every time you build, you can replace the directory with a symbolic link. If the plAxel directory already exits, delete it. Then, from your Gismo build directory run

ln -s (path to build-axel directory)/plugins ./plAxel

Finally, compile the plugin (after you did the symbolic link)

make -j2 gsAxelPlugin

Running axel

You may like to add build-axel/bin to your path, or create a symbolic link from a directory in your path to the axel executable. On Mac, the folder that contains the "axel" executable might be something like /bin/axel.app/Contents/MacOS/axel Then you can run axel with

>axel
G+Smo Plugin for Axel is loaded.

if you see the second line "G+Smo Plugin for Axel is loaded" then the plugin is loaded.

You can also type

axel --verbose

With the —verbose flag, axel will log to stdout when it is loading our library. Also, in Gismo, we can stream information to the dtkWarn() object and axel will only log it to stdout when —verbose is on.

To test the interaction between Axel and Gismo: click the "i" button in the top-right of the Axel window, and click "tool". In the list of tools there should be a "gsGeometryCreator" item. Double click it, then choose an example from the drop-list and click "Create". Or, click on the "Load Geometry" button to load a G+SMO xml file.

Usefull keystrokes include:

e = edit control points of selected object

w = see the wire frame of selected object

s = solid view

r = reset view (brings the visible object in the center of the screen)

More information at: http://axel.inria.fr/

Updating Axel

If you want to update axel to receive the latest version, proceed as follows:

cd axel-sdk
./scripts/config_update

The above script updates everything via the internet.

Then go to the build directory and make again:

cd ../axel-build
make -j2
Last modified 3 years ago Last modified on 2014-12-21T23:29:57+01:00