This repository was archived by the owner on Oct 14, 2022. It is now read-only.
forked from DLR-SC/tigl
-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
Malo edited this page Sep 17, 2019
·
10 revisions
Your about to spend some times to install it /)
Make sure that tixi is compatible with the "fPIC" compiler option.
(You can add set(CMAKE_POSITION_INDEPENDENT_CODE ON) to the CMakeList.txt of TIXI)
Then, build tixi:
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=install ..
make
make install
Then you can copy the file generated by make install
into your local system library.
eg:
cp -rf install/* /usr/local/
For the moment, there are some tricks to build the python python api. Especially because the pythonOCC core is hard to set correctly.
- Install anaconda
- Install tigl3 in anaconda
conda install tigl3 -c dlr-sc
- Add the path of pythonocc-core of this anaconda env to the cmake path.
eg: edit the FindPythonOCC.cmake file has follow:
FIND_PATH(PythonOCC_SOURCE_DIR NAMES src/SWIG_files/wrapper/Standard.i PATHS /opt/anaconda3/envs/tigl/src/pythonocc-core/
- Set the tixi used to build to be the tixi used by the anaconda env.
eg (replace the tixi search in the CMake main file ) :
FIND_PATH(TIXI_PATH NAMES "tixi3-config.cmake" PATHS "/opt/anaconda3/envs/tixi/lib/tixi3/" )
find_package( tixi3 3.0.3 REQUIRED CONFIG PATHS "${TIXI_PATH}" NO_DEFAULT_PATH )
- Set the cmake option:
TIGL_BINDINGS_PYTHON_INTERNAL=ON
- Create a new conda env with the same parameters has the one containing the pythonocc-core library
- Copy all the file of the build to the new conda env. For exemple, this script try to do this:
#! /bin/bash
BUILD_DIR="path_to_build"
CONDA_DIR="path_to_env"
echo "We will try to move the build internal tigl python api to conda env "
cp $BUILD_DIR/bindings/python_internal/*.py $CONDA_DIR/lib/python3.6/site-packages/tigl3/
cp $BUILD_DIR/bindings/python_internal/*.so $CONDA_DIR/lib/python3.6/site-packages/tigl3/
cp $BUILD_DIR/lib/* $CONDA_DIR/lib
- Download the source https://github.com/tpaviot/oce/releases/tag/OCE-0.17.2
- Patch it with https://github.com/DLR-SC/tigl/blob/cpacs_3/patches/oce-0.17/fix-geomapi_extremacurvecurve.patch
- Build the library with the following options (default ones):
cmake -DOCE_BUILD_SHARED_LIB=ON \
-DOCE_DATAEXCHANGE=ON \
-DOCE_DRAW=OFF \
-DOCE_INSTALL_PREFIX=/usr/local \
-OCE_MODEL=ON \
-OCE_MULTITHREAD_LIBRARY=NONE \
-OCE_OCAF=ON \
-OCE_VISUALISATION=ON \
-OCE_WITH_FREEIMAGE=OFF \
-OCE_WITH_GL2PS=OFF \
..