Introduction
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.
Questions
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 http://lib2geom.sourceforge.net)
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: https://lib2geom.svn.sourceforge.net/svnroot/lib2geom/lib2geom/trunk . 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.
Requirements
- Cairo :
- cmake (building system) to compile lib2geom
Optionnal
- 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 make install
On MS-windows :
cmake -G "MinGW Makefiles" .
Configuring lib2geom building on Windows
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: http://www.boost.org/doc/libs/1_37_0/libs/python/doc/building.html#installing-boost-python-on-your-system and http://www.boost.org/doc/libs/1_37_0/more/getting_started/windows.html#prepare-to-use-a-boost-library-binary 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"