Lib2geom FAQ

From Inkscape Wiki
Jump to: navigation, search


I will place the questions that I have as I am learning about lib2geom on this page of the Inkscape Wiki. Over the course of time I will patiently pester the developers of the library for detailed answers to these questions. As I recieve these answers I will post them here for others. (2006-09-01)

See also the page Working with 2geom FAQ for more practical Q/A.


What is lib2geom?

lib2geom was initially a library developed for Inkscape but will provide a robust computational geometry framework for any application. It is not a rendering library, instead concentrating on high level algorithms such as computing arc length. (from

How does lib2geom represent the coordinates of geometries?

What are the basic geometry types defined in lib2geom, and where can I find the source code for those definitions?

How do I access the source code for lib2geom?

There is a Subversion or SVN repository for the library at lib2geom SVN Address: . You can browse the contents of the repository with your web browser, but you will need a Subversion client like TortoiseSVN or RapidSVN to download its contents.


  • Cairo :
  • cmake (building system) to compile lib2geom


  • The gnu libgsl.
If you install from your distribution, don't forget libgsl*-dev
It's used for test only.
  • BLAS (Basic Linear Algebra Subprograms):

How do I compile lib2geom from svn?

On Unix :

cmake .
make install

On MS-windows :

cmake -G "MinGW Makefiles" .

Configuring lib2geom building on Windows

Update: I don't know what happened, but using Boost's buildtool sucks in version 1.42.0, as it no longer builds the dynamic lib that we need for linking. So, forget about the text down here, and change src/2geom/py2geom/CMakeLists.txt" around line 28 to

    SET(BOOST_PYTHON_SRC "C:/boost_1_42_0/libs/python/src")

No longer valid:

In the lib2geom dir, do:

 cmake -i

Choose to see the advanced options if you do this for the first time.

Now you can change the options with which lib2geom is built.

Set BOOST_PYTHON_LIBRARY to where your Boost.Python library binary is located. The what? Yes, you must build this binary yourself, follow these instructions: and So for example:

   bjam --with-python --build-dir=c:\boost\build --toolset=gcc

You probably need to rename things by adding "lib" at the start of the files too, so you get for example "libboost_python-mgw42-1_34_1.a".

Set PYTHON_INCLUDE_PATH to for example: "c:/devlibs/python/include"