Third Party Libraries: Difference between revisions

From FreeCAD Documentation
No edit summary
(Marked this version for translation)
 
(104 intermediate revisions by 20 users not shown)
Line 1: Line 1:
<languages/>
=== Overview ===
<translate>
These are libraries which are not changed in the FreeCAD project. They are basically used unchanged as a dynamic link library (*.so or *.dll). If there is a change necessary or a wrapper class is needed, then the code of the wrapper or the changed library code have to be moved to the FreeCAD base package.
The used libraries are:


<!--T:72-->
Consider using [[#LibPack|LibPack]] instead of downloading and installing all the stuff on your own.
{{Docnav
|[[Compiling_(Speeding_up)|Compiling (Speeding up)]]
|[[Third_Party_Tools|Third Party Tools]]
}}


</translate>
=== Links ===
{{TOCright}}
<translate>


== Overview == <!--T:117-->

<!--T:1-->
These are libraries which FreeCAD uses as third party dependencies during compilation. They are usually [https://en.wikipedia.org/wiki/Dynamic_loading dynamically linked libraries] and have an extension {{incode|.so}} in Linux/MacOS and {{incode|.dll}} in Windows, and are accompanied by their header files {{incode|.h}} or {{incode|.hpp}} or similar. If a modified library is necessary, or a wrapper class is needed, the code of the modified library, or the wrapper, has to become part of the FreeCAD source code, and compiled together with it.

<!--T:78-->
The dependencies need to be installed in the system before proceeding with compilation; see [[Compile_on_Linux|compile on Linux]], [[Compile_on_Windows|compile on Windows]], and [[Compile_on_MacOS|compile on MacOS]] for more information.

<!--T:2-->
If you are compiling using Windows, consider using the [[#LibPack|LibPack]] instead of trying to install the libraries individually.

== Links == <!--T:3-->

<!--T:4-->
{| class="wikitable" style="text-align:left"
{| class="wikitable" style="text-align:left"
|+ Link table
|-
|-
! Lib name !! Version needed !! Link to get it
! Library name !! Version needed !! Link to get it
|-
|-
| Python || >= 2.5.x || http://www.python.org/
| Python || >= 3.6 || http://www.python.org/
|-
|-
| OpenCasCade || >= 5.2 || http://www.opencascade.org
| Boost || >= 1.33 || http://www.boost.org/
|-
|-
| Qt || >= 4.1.x || http://www.qtsoftware.com
| OpenCASCADE || >= 7.3 || http://www.opencascade.org
|-
|-
| Coin3D || >= 2.x || http://www.coin3d.org
| Qt || >= 5.4 || https://www.qt.io/
|-
|-
| ODE || >= 0.10.x || http://www.ode.org
| Shiboken2 || {{Emphasis|same as Qt}} || https://wiki.qt.io/Qt_for_Python/Shiboken
|-
|-
| SoQt || >= 1.2 || http://www.coin3d.org
| PySide2 || {{Emphasis|same as Qt}} || https://wiki.qt.io/Qt_for_Python/Shiboken
|-
|-
| Xerces-C++ || >= 2.3.x || http://xml.apache.org/xerces-c/
| Coin3D || >= 3.x || https://github.com/coin3d/coin
|-
|-
| GTS || >= 0.7.x || http://gts.sourceforge.net/
| SoQt (deprecated) || >= 1.2 || https://github.com/coin3d/soqt
|-
|-
| Zlib || >= 1.x.x || http://www.zlib.net/
| Quarter || >= 1.0 || https://github.com/coin3d/quarter
|-
|-
| Boost || >= 1.33.x || http://www.boost.org/
| Pivy || >= 0.6.5 || https://github.com/coin3d/pivy/
|-
|-
| OpenCV || >= 1.0 || http://sourceforge.net/projects/opencvlibrary/
| FreeType || >= XXX || XXX
|-
| PyCXX || >= XXX || XXX
|-
| KDL || >= XXX || https://orocos.org/wiki/orocos/kdl-wiki.html
|-
| Point Cloud Library || >= XXX || XXX
|-
| Salome SMESH || >= XXX || XXX
|-
| VTK || >= 6.0 || XXX
|-
| Ply || >= 3.11 || https://www.dabeaz.com/ply/
|-
| Xerces-C++ || >= 3.0 || https://xerces.apache.org/xerces-c/
|-
| Eigen3 || >= 3.0 || http://eigen.tuxfamily.org/index.php?title=Main_Page
|-
| Zipios++ || >= 0.1.5 || https://snapwebsites.org/project/zipios, https://github.com/Zipios/Zipios
|-
| Zlib || >= 1.0 || http://www.zlib.net/, https://github.com/madler/zlib
|-
| libarea || >= 0.0.20140514-1 || https://github.com/danielfalck/libarea
|-
|}
|}


=== Details ===
== Details == <!--T:5-->


==== Python ====
=== Python === <!--T:118-->
'''Version:''' 2.5 or higher


<!--T:6-->
'''License:''' Python 2.5 license
'''Version:''' 3.3 or higher


<!--T:7-->
You can use the source or binary from http://www.python.org/ or use alternetivly ActiveState Python from http://www.activestate.com/ though it is a little bit hard to get the debug libs from ActiveState.
'''License:''' Python 3.3 license


<!--T:74-->
===== Description =====
{{VeryImportantMessage|Python 2 became obsolete in 2019. Further development of FreeCAD will use exclusively Python 3; compatibility with Python 2 won't be tested, so old workbenches and macros that use this version will have to be updated or they may stop working. Please post on the [https://forum.freecadweb.org/ FreeCAD forum] if you encounter problems with Python 3.}}
Python is the primary scripting language and is used throughout the application.
For example:


<!--T:79-->
* Implement test scripts for testing on:
Python is a popular all-purpose scripting language that is widely used in Linux and open source software. In FreeCAD, Python is used during compilation and also at runtime in different ways. It is used
** memory leaks
* to write test scripts to test for different conditions, such as memory leaks, to ensure functionality of the software after changes, for post build checks, and test coverage tests,
** ensure presents of functionality after changes
* to write [[macros|macros]] and macro recording,
** post build checks
* to implement application logic for standard packages,
** test coverage tests
* to implement auxiliary tools such as the [[Std_AddonMgr|Addon Manager]],
* Macros and macro recording
* to implement entire workbenches like [[Draft Workbench|Draft]] and [[Arch Workbench|Arch]],
* Implement application logic for standard packages
* to dynamically load packages,
* Implementation of whole workbenches
* to implement rules for design (knowledge engineering),
* Dynamic loading of packages
* to do fancy Internet interactions like work groups and PDM
* Implementing rules for design (Knowledge engineering)
* Doing some fancy Internet stuff like work groups and PDM
* And so on ...


<!--T:8-->
Especially the dynamic package loading of Python is used to load at run time additional functionality and workbenches needed for the actual tasks. For a closer look to Python see: www.python.org Why Python you may ask. There are some reasons: So far I used different scripting languages in my professional life:
On Linux, Python is usually already installed in your distribution. For Windows you can get a precompiled binary from [http://www.python.org/ Python.org] or use [http://www.activestate.com/ ActiveState Python], though it is harder to get the debug libraries from the latter one.
* Perl
* Tcl/Tk
* VB
* Java
Python is more OO then Perl and Tcl, the code is not a mess like in Perl and VB. Java isn't a script language in the first place and hard (or impossible) to embed. Python is well documented and easy to embed and extend. It is also well tested and has a strong back hold in the open source community.


<!--T:80-->
===== Credits =====
Python was chosen as the scripting language for FreeCAD for different reasons:
Goes to Guido van Rossum and a lot of people made Python such a success!
* It is more object oriented than Perl and Tcl.
* The code is more readable than Perl and Visual Basic.
* It is easier to embed in another application, unlike, say, Java.


<!--T:81-->
==== OpenCasCade ====
In summary, Python is well documented, and it's easy to embed and extend in a C++ application. It is also well tested and has strong support from the open source community. Read more about Python and browse the official documentation at [http://www.python.org Python.org].


=== Boost === <!--T:55-->
'''Version:''' 5.2 or higher


<!--T:56-->
'''License:''' OCTPL
'''Version:''' 1.33 or higher


<!--T:57-->
OCC is a full-featured CAD Kernel. Originally, it's developed by Matra Datavision in France for the Strim (Styler) and Euclid Quantum applications and later on made Open Source. It's a really huge library and makes a free CAD application possible in the first place, by providing some packages which would be hard or impossible to implement in an Open Source project:
'''License:''' Boost Software License - Version 1.0
* A complete STEP compliant geometry kernel
* A topological data model and all needed functions to work on (cut, fuse, extrude, and so on. . . )
* Standard Import- / Export processors like STEP, IGES, VRML
* 3D and 2D viewer with selection support
* A document and project data structure with support for save and restore, external linking of documents, recalculation of design history (parametric modeling) and a facility to load new data types as an extension package dynamically


<!--T:58-->
To learn more about OpenCasCade take a look at the OpenCasCade page or http://www.opencascade.org.
The Boost C++ libraries are collections of peer-reviewed, open source libraries that extend the functionality of C++. They are intended to be widely useful across a broad spectrum of applications, and to work well with the C++ Standard Library. The Boost license is designed to encourage their use in both open source and closed source projects.


<!--T:82-->
==== Qt ====
Due to their popularity and stability, many Boost libraries have been accepted for incorporation into the C++11 standard, and more are planned for inclusion in subsequent C++ standards.


<!--T:60-->
'''Version:''' 4.1.x or higher
In order to ensure efficiency and flexibility, Boost makes extensive use of templates. Boost has been a source of extensive work and research into generic programming and meta-programming in C++. Read more about Boost by visiting the [http://www.boost.org/ Boost homepage].


=== OpenCASCADE Technology === <!--T:12-->
'''License:''' GPL v2.0/v3.0 or Commercial (from version 4.5 on also LPGL v2.1)


<!--T:13-->
I don't think I need to tell a lot about Qt. It's one of the most often used GUI toolkits in Open Source projects. For me the most important point to use Qt is the Qt Designer and the possibility to load whole dialog boxes as a (XML) resource and incorporate specialized widgets. In a CAX application the user interaction and dialog boxes are by far the biggest part of the code and a good dialog designer is very important to easily extend FreeCAD with new functionality. Further information and a very good online documentation you'll find on http://www.qtsoftware.com.
'''Version:''' 6.7 or higher


<!--T:14-->
==== Coin3D ====
'''License:''' version 6.7.0 and later are governed by the [https://www.opencascade.com/content/licensing GNU Lesser General Public License (LGPL) version 2.1 with additional exception]. Earlier versions use the [https://www.opencascade.com/content/occt-public-license Open CASCADE Technology Public License].


<!--T:15-->
'''Version:''' 2.0 or higer
OpenCASCADE Technology (OCCT) is a full-featured, professional grade CAD kernel. It was developed in 1993 and originally called CAS.CADE, by Matra Datavision in France for the Strim (Styler) and Euclid Quantum applications. In 1999 it was released as open source software, and since then it's been called OpenCASCADE.


<!--T:83-->
'''License:''' GPL v2.0 or Commercial
OCCT is a big and complex set of C++ libraries that provide functionality required by a CAD application:
* A complete STEP compliant geometry kernel.
* A topological data model and needed functions to work with shapes (cut, fuse, extrude, and many others).
* Standard import and export processors for files like STEP, IGES, VRML.
* A 2D and 3D viewer with selection support.
* A document and project data structure with support for save and restore, external linking of documents, recalculation of design history (parametric modeling) and a facility to load new data types as an extension package dynamically.


<!--T:84-->
Coin is a high-level 3D graphics library with a C++ Application Programming Interface. Coin uses scenegraph data structures to render real-time graphics suitable for mostly all kinds of scientific and engineering visualization applications.
There are two main versions of OpenCASCADE in existence in different Linux distributions. One is distributed by the original developers; it is known as OCCT, and is packaged under the names {{incode|occ}} or {{incode|occt}}. The other version is the "community edition", abbreviated OCE, and is normally found with the {{incode|oce}} name. FreeCAD can compile against either version, however, since 2016 FreeCAD recommends compiling against the official OCCT libraries rather than the OCE ones. The reason is that the community edition lacks important bug fixes and functions that make using FreeCAD better.


<!--T:16-->
Coin is portable over a wide range of platforms: any UNIX / Linux / *BSD platform, all Microsoft Windows operating system, and Mac OS X.
To learn more visit the [http://www.opencascade.org OpenCASCADE website].


=== Qt === <!--T:17-->
Coin is built on the industry-standard OpenGL immediate mode rendering library, and adds abstractions for higher-level primitives, provides 3D interactivity, immensely increases programmer convenience and productivity, and contains many complex optimization features for fast rendering that are transparent for the application programmer.


<!--T:18-->
Coin is based on the SGI Open Inventor API. Open Inventor, for those who are not familiar with it, has long since become the de facto standard graphics library for 3D visualization and visual simulation software in the scientific and engineering community. It has proved it's worth over a period of more than 10 years, its maturity contributing to its success as a major building block in thousands of large-scale engineering applications around the world.
'''Version:''' 4.1 or higher


<!--T:19-->
We will use OpenInventor as 3D viewer in FreeCAD because the OpenCasCade viewer (AIS and Graphics3D) has serios limitations and performace bottlenecks, especially when it goes in large-scale engineering rendering. Other things like textures or volumetric rendering are not really supported, and so on ....
'''License:''' GPL v2.0/v3.0 or Commercial; from version 4.5 on also LPGL v2.1.


<!--T:20-->
Since Version 2.0 Coin uses a different licence model. It's not longer LGPL. They use GPL for open source and a commercial licence for closed source. That means if you want to sell your work based on FreeCAD (extension modules) you need to purchase a Coin licence!
Qt is one of the most popular graphical user interface (GUI) toolkits available in the open source world. FreeCAD uses this toolkit to draw the interface of the program. For this, the Qt Designer application is very useful as it allows developers to quickly draw the dialogs and windows, export them as XML resource files, and then load these interfaces at runtime.


<!--T:85-->
==== ODE (Open dynamic engine) ====
Further information about Qt libraries and their programming documentation are available at [https://doc.qt.io/?hsCtaTracking=f641fd1a-772b-4957-964b-dad954b8d702%7C46c97dac-f1f6-49b3-ae46-8070fc35ea13 Qt Documentation].


==== Shiboken2 and Pyside2 ==== <!--T:119-->
'''Version:''' 0.10.0 or higher


<!--T:70-->
'''License:''' LGPL v2.1 or later or BSD
Shiboken is the Python binding generator that Qt for Python uses to create the PySide module, in other words, it is the system that is used to expose the Qt C++ API to the Python language.


<!--T:71-->
ODE is an open source, high performance library for simulating rigid body dynamics. It is fully featured, stable, mature and platform independent with an easy to use C/C++ API. It has advanced joint types and integrated collision detection with friction. ODE is useful for simulating vehicles, objects in virtual reality environments and virtual creatures. It is currently used in many computer games, 3D authoring tools and simulation tools.
The original Shiboken and PySide packages were meant to be used with Python 2 and Qt4; since these two versions are considered obsolete in 2019, please use Shiboken2 and PySide2, which work with Python 3 and Qt5. New development of FreeCAD is done with Python 3 and Qt5, so compatibility with Python 2 and Qt4 is not guaranteed after FreeCAD 0.18.


<!--T:86-->
===== Credits =====
Read more about Shiboken and Pyside on [https://wiki.qt.io/Qt_for_Python/Shiboken Qt for Python].
Russell Smith is the primary author of ODE.


=== Coin3D === <!--T:21-->


<!--T:22-->
==== SoQt ====
'''Version:''' 3.0 or higher


<!--T:23-->
'''License:''' BSD 3-clause license

<!--T:24-->
Coin3D is a high-level 3D graphics library with a C++ application programming interface. It uses scenegraph data structures to render real-time graphics suitable for all kinds of scientific and engineering visualization applications.

<!--T:26-->
Coin3D is built on the industry-standard OpenGL immediate mode rendering library, and adds abstractions for higher-level primitives, provides 3D interactivity, and contains many complex optimization features for fast rendering that are transparent for the application programmer.

<!--T:27-->
Coin3D is compatible with SGI's Open Inventor 2.1 API. This API has become the de facto standard graphics interface for 3D visualization in the scientific and engineering community. It has proved its worth since the year 2000 as a major building block in thousands of engineering applications around the world.

<!--T:28-->
Coin3D (Open Inventor) is used as the 3D viewer in FreeCAD because the OpenCASCADE viewer (AIS and Graphics3D) has limitations and performance bottlenecks, especially with large-scale engineering rendering; other things like textures or volumetric rendering are not entirely supported by the OpenCASCADE viewer.

<!--T:25-->
Coin3D is portable over a wide range of platforms: UNIX, Linux, BSD, macOS, and Microsoft Windows operating systems. To read more about this library visit [https://github.com/coin3d/coin Coin3D homepage].

==== SoQt (deprecated) ==== <!--T:35-->

<!--T:36-->
'''Version:''' 1.2.0 or higher
'''Version:''' 1.2.0 or higher


<!--T:37-->
'''License:''' GPL v2.0 or Commercial
'''License:''' BSD 3-clause license


<!--T:38-->
SoQt is the Inventor binding to the Qt Gui Toolkit. Unfortunately, it's not longer LGPL so we have to remove it from the code base of FreeCAD and link it as a library. It has the same licence model like Coin. And you have to compile it with your version of Qt.
SoQt is the Coin3D (Open Inventor) binding to the Qt GUI toolkit.


<!--T:75-->
==== Xerces-C++ ====
SoQt is no longer used in FreeCAD, it was replaced by Quarter which is a more recent Qt binding.


==== Quarter ==== <!--T:120-->
'''Version:''' 2.3.0 or higher


<!--T:76-->
'''Version:''' 1.0 or higher

<!--T:87-->
'''License:''' BSD 3-clause license

<!--T:77-->
Quarter is a newer Coin3D binding to the Qt toolkit. A version of it is included in the source code of FreeCAD so it is compiled together with it.

==== Pivy ==== <!--T:107-->

<!--T:108-->
'''Version:''' 0.6.3 or higher

<!--T:109-->
'''License:''' BSD 3-clause license

<!--T:110-->
[[Pivy|Pivy]] is a library that wraps the Coin3d library for use in [[Python|Python]]. It is not needed to build FreeCAD or to start it, but it is needed as a runtime dependency by the [[Draft_Workbench|Draft Workbench]], and by other workbenches that use it internally, like [[Arch_Workbench|Arch]] and [[BIM_Workbench|BIM]].

<!--T:111-->
If you are not going to use these workbenches, you won't need Pivy.

=== Ply === <!--T:112-->

<!--T:113-->
'''Version:''' 3.11 or higher

<!--T:114-->
'''License:''' BSD 3-clause license

<!--T:115-->
Ply is the Python-Lex-Yacc parser. It is used as a runtime dependency by the [[OpenSCAD Workbench|OpenSCAD Workbench]]. If you don't use this workbench, you may not need this package.

<!--T:116-->
For more information see [https://www.dabeaz.com/ply/ Ply homepage]

=== Xerces-C++ === <!--T:39-->

<!--T:40-->
'''Version:''' 3.0 or higher

<!--T:41-->
'''License:''' Apache Software License Version 2.0
'''License:''' Apache Software License Version 2.0


<!--T:42-->
Xerces-C++ is a validating XML parser written in a portable subset of C++. Xerces-C++ makes it easy to give your application the ability to read and write XML data. A shared library is provided for parsing, generating, manipulating, and validating XML documents.
Xerces-C++ is a validating XML parser written in a portable subset of C++. Xerces-C++ makes it easy to give your application the ability to read and write XML data. A shared library is provided for parsing, generating, manipulating, and validating XML documents. Xerces-C++ is faithful to the XML 1.0 recommendation and associated standards.


<!--T:45-->
Xerces-C++ is faithful to the XML 1.0 recommendation and many associated standards (see Features below).
The parser is used for saving and restoring parameters in FreeCAD. For more information see [https://xerces.apache.org/xerces-c/ Xerces-C++ homepage].


=== Eigen3 === <!--T:88-->
The parser provides high performance, modularity, and scalability. Source code, samples and API documentation are provided with the parser. For portability, care has been taken to make minimal use of templates, no RTTI, and minimal use of #ifdefs.


<!--T:89-->
The parser is used for saving and restoring parameters in FreeCAD.
'''Version:''' 3.0 or higher


<!--T:90-->
'''License:''' Starting from the 3.1.1 version, it is licensed under the [http://www.mozilla.org/MPL/2.0 Mozilla Public License 2.0]. Earlier versions were licensed under the [https://www.gnu.org/licenses/lgpl-3.0.en.html GNU Lesser General Public License 3].


<!--T:91-->
==== GTS ====
Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms.


<!--T:92-->
'''Version:''' 0.7.x
If you just want to use Eigen, you can use the header files right away. There is no binary library to link to, and no configured header file. Eigen is a pure template library defined in the headers.


<!--T:93-->
'''License:''' LGPL v2.0 or later
Eigen is used in FreeCAD for many vector operations in 3D space. To learn more, visit [http://eigen.tuxfamily.org/index.php?title=Main_Page Eigen homepage].


=== Zipios++ === <!--T:94-->
GTS stands for the GNU Triangulated Surface Library. It is an Open Source Free Software Library intended to provide a set of useful functions to deal with 3D surfaces meshed with interconnected triangles. The source code is available free of charge under the Free Software LGPL license.


<!--T:95-->
Actually not needed to compile FreeCAD. You can switch on the usage with a proprocessor switch in FCConfig.h.
'''Version:''' 0.1.5 or higher


<!--T:96-->
==== Zlib ====
'''License:''' GNU Lesser General Public License 2.1


<!--T:97-->
'''Version:''' 1.x.x
Zipios++ is a C++ library for reading and writing {{incode|.zip}} files. Access to individual entries is provided through standard C++ iostreams. A simple read-only virtual file system that mounts regular directories and {{incode|.zip}} files is also provided. The structure and public interface of Zipios++ are loosely based on the {{incode|java.util.zip}} package of Java.


<!--T:98-->
'''License:''' zlib License
FreeCAD's native file format {{incode|.FCstd}} is in reality a {{incode|.zip}} file that stores and compresses other types of data within it, such as BREP and XML files. Therefore, Zipios++ is used to save and open compressed archives, including FreeCAD files.


<!--T:99-->
zlib is designed to be a free, general-purpose, legally unencumbered -- that is, not covered by any patents -- lossless data-compression library for use on virtually any computer hardware and operating system. The zlib data format is itself portable across platforms. Unlike the LZW compression method used in Unix compress(1) and in the GIF image format, the compression method currently used in zlib essentially never expands the data. (LZW can double or triple the file size in extreme cases.) zlib's memory footprint is also independent of the input data and can be reduced, if necessary, at some cost in compression.
A copy of Zipios++ is included in the source code of FreeCAD so it is compiled together with it. If you want to use an external Zipios++ library, provided by your operating system, you may set <code>-DFREECAD_USE_EXTERNAL_ZIPIOS=ON</code> with {{incode|cmake}}.


<!--T:100-->
Zipios++ uses the Zlib library to perform the actual decompression of files.


==== Zlib ==== <!--T:51-->


<!--T:52-->
==== Boost ====
'''Version:''' 1.0 or higher


<!--T:53-->
'''Version:''' 1.33.x
'''License:''' zlib license


<!--T:54-->
'''License:''' Boost Software License - Version 1.0
Zlib is designed to be a free, general-purpose, lossless data-compression library for use on any computer hardware and operating system. It implements the {{incode|DEFLATE}} compression algorithm commonly used in {{incode|.zip}} and {{incode|.gzip}} files.

<!--T:101-->
A copy of this library is included in the source code of FreeCAD so it is compiled together with it.

=== libarea === <!--T:66-->

<!--T:67-->
'''Version:''' 0.0.20140514-1 or higher

<!--T:68-->
'''License:''' BSD 3-clause license

<!--T:69-->
Libarea is a software library to compute profile and pocket operations which are used in computer aided manufacturing (CAM) software. It was created by Dan Heeks for his HeeksCNC project.

<!--T:102-->
A copy of the library is included with the source code of the [[CAM_Workbench|CAM Workbench]], so it is compiled together with it.

== LibPack == <!--T:121-->


<!--T:62-->
The Boost C++ libraries are a collection of peer-reviewed, open source libraries that extend the functionality of C++. The libraries are licensed under the Boost Software License, designed to allow Boost to be used with both open and closed source projects. Many of Boost's founders are on the C++ standard committee and several Boost libraries have been accepted for incorporation into the Technical Report 1 of C++0x.
LibPack is a convenient package with FreeCAD's build dependencies collected together. It is only needed if you are compiling FreeCAD on Windows with Visual Studio 2015 and above. You can find the latest LibPack on the [https://github.com/FreeCAD/FreeCAD/releases releases page].


<!--T:103-->
The libraries are aimed at a wide range of C++ users and application domains. They range from general-purpose libraries like SmartPtr, to OS Abstractions like FileSystem, to libraries primarily aimed at other library developers and advanced C++ users, like MPL.
If you're working under Linux, you don't need the LibPack, as you can get the dependencies from your distribution's repositories as mentioned in the [[Compile_on_Linux|compile on Linux]] page.


=== FreeCAD 12.1.2 === <!--T:104-->
In order to ensure efficiency and flexibility, Boost makes extensive use of templates. Boost has been a source of extensive work and research into generic programming and meta-programming in C++.


<!--T:105-->
See: http://www.boost.org/ for details.
See the announcement in the forum: [https://forum.freecadweb.org/viewtopic.php?f=4&t=35789 New libpacks for Windows with Qt5.12, OCC7.3 and Python 3.6 by apeltauer]


<!--T:106-->
=== LibPack ===
It includes among other things: Boost 1.67, Coin3D 4.0.0a, Eigen3, Open CASCADE Technology 7.3.0, Python 3.6.8, PySide2, Qt 5.12.1, Salome SMESH, Shiboken2, vtk7, Xerces-C, Zipios++, zlib 1.2.11


LibPack is a convenient package with all the above libraries packed together. It is currently available for the
Windows platform on the [[Download]] page!


<!--T:64-->
==== FreeCADLibs4 Changelog ====
{{Docnav
* we replaced the QT 3.2.1 non commercial edition with the QT 4.1.4 GPL Version.
|[[Compiling_(Speeding_up)|Compiling (Speeding up)]]
* STLport was removed (VC6 compiler is not longer supported.
|[[Third_Party_Tools|Third Party Tools]]
* Use Python 2.5
}}


</translate>
[[Category:Developer]]
{{Userdocnavi{{#translation:}}}}
[[Category:Developer Documentation{{#translation:}}]]
{{clear}}

Latest revision as of 16:49, 18 April 2024

Overview

These are libraries which FreeCAD uses as third party dependencies during compilation. They are usually dynamically linked libraries and have an extension .so in Linux/MacOS and .dll in Windows, and are accompanied by their header files .h or .hpp or similar. If a modified library is necessary, or a wrapper class is needed, the code of the modified library, or the wrapper, has to become part of the FreeCAD source code, and compiled together with it.

The dependencies need to be installed in the system before proceeding with compilation; see compile on Linux, compile on Windows, and compile on MacOS for more information.

If you are compiling using Windows, consider using the LibPack instead of trying to install the libraries individually.

Links

Library name Version needed Link to get it
Python >= 3.6 http://www.python.org/
Boost >= 1.33 http://www.boost.org/
OpenCASCADE >= 7.3 http://www.opencascade.org
Qt >= 5.4 https://www.qt.io/
Shiboken2 same as Qt https://wiki.qt.io/Qt_for_Python/Shiboken
PySide2 same as Qt https://wiki.qt.io/Qt_for_Python/Shiboken
Coin3D >= 3.x https://github.com/coin3d/coin
SoQt (deprecated) >= 1.2 https://github.com/coin3d/soqt
Quarter >= 1.0 https://github.com/coin3d/quarter
Pivy >= 0.6.5 https://github.com/coin3d/pivy/
FreeType >= XXX XXX
PyCXX >= XXX XXX
KDL >= XXX https://orocos.org/wiki/orocos/kdl-wiki.html
Point Cloud Library >= XXX XXX
Salome SMESH >= XXX XXX
VTK >= 6.0 XXX
Ply >= 3.11 https://www.dabeaz.com/ply/
Xerces-C++ >= 3.0 https://xerces.apache.org/xerces-c/
Eigen3 >= 3.0 http://eigen.tuxfamily.org/index.php?title=Main_Page
Zipios++ >= 0.1.5 https://snapwebsites.org/project/zipios, https://github.com/Zipios/Zipios
Zlib >= 1.0 http://www.zlib.net/, https://github.com/madler/zlib
libarea >= 0.0.20140514-1 https://github.com/danielfalck/libarea

Details

Python

Version: 3.3 or higher

License: Python 3.3 license

Python 2 became obsolete in 2019. Further development of FreeCAD will use exclusively Python 3; compatibility with Python 2 won't be tested, so old workbenches and macros that use this version will have to be updated or they may stop working. Please post on the FreeCAD forum if you encounter problems with Python 3.

Python is a popular all-purpose scripting language that is widely used in Linux and open source software. In FreeCAD, Python is used during compilation and also at runtime in different ways. It is used

  • to write test scripts to test for different conditions, such as memory leaks, to ensure functionality of the software after changes, for post build checks, and test coverage tests,
  • to write macros and macro recording,
  • to implement application logic for standard packages,
  • to implement auxiliary tools such as the Addon Manager,
  • to implement entire workbenches like Draft and Arch,
  • to dynamically load packages,
  • to implement rules for design (knowledge engineering),
  • to do fancy Internet interactions like work groups and PDM

On Linux, Python is usually already installed in your distribution. For Windows you can get a precompiled binary from Python.org or use ActiveState Python, though it is harder to get the debug libraries from the latter one.

Python was chosen as the scripting language for FreeCAD for different reasons:

  • It is more object oriented than Perl and Tcl.
  • The code is more readable than Perl and Visual Basic.
  • It is easier to embed in another application, unlike, say, Java.

In summary, Python is well documented, and it's easy to embed and extend in a C++ application. It is also well tested and has strong support from the open source community. Read more about Python and browse the official documentation at Python.org.

Boost

Version: 1.33 or higher

License: Boost Software License - Version 1.0

The Boost C++ libraries are collections of peer-reviewed, open source libraries that extend the functionality of C++. They are intended to be widely useful across a broad spectrum of applications, and to work well with the C++ Standard Library. The Boost license is designed to encourage their use in both open source and closed source projects.

Due to their popularity and stability, many Boost libraries have been accepted for incorporation into the C++11 standard, and more are planned for inclusion in subsequent C++ standards.

In order to ensure efficiency and flexibility, Boost makes extensive use of templates. Boost has been a source of extensive work and research into generic programming and meta-programming in C++. Read more about Boost by visiting the Boost homepage.

OpenCASCADE Technology

Version: 6.7 or higher

License: version 6.7.0 and later are governed by the GNU Lesser General Public License (LGPL) version 2.1 with additional exception. Earlier versions use the Open CASCADE Technology Public License.

OpenCASCADE Technology (OCCT) is a full-featured, professional grade CAD kernel. It was developed in 1993 and originally called CAS.CADE, by Matra Datavision in France for the Strim (Styler) and Euclid Quantum applications. In 1999 it was released as open source software, and since then it's been called OpenCASCADE.

OCCT is a big and complex set of C++ libraries that provide functionality required by a CAD application:

  • A complete STEP compliant geometry kernel.
  • A topological data model and needed functions to work with shapes (cut, fuse, extrude, and many others).
  • Standard import and export processors for files like STEP, IGES, VRML.
  • A 2D and 3D viewer with selection support.
  • A document and project data structure with support for save and restore, external linking of documents, recalculation of design history (parametric modeling) and a facility to load new data types as an extension package dynamically.

There are two main versions of OpenCASCADE in existence in different Linux distributions. One is distributed by the original developers; it is known as OCCT, and is packaged under the names occ or occt. The other version is the "community edition", abbreviated OCE, and is normally found with the oce name. FreeCAD can compile against either version, however, since 2016 FreeCAD recommends compiling against the official OCCT libraries rather than the OCE ones. The reason is that the community edition lacks important bug fixes and functions that make using FreeCAD better.

To learn more visit the OpenCASCADE website.

Qt

Version: 4.1 or higher

License: GPL v2.0/v3.0 or Commercial; from version 4.5 on also LPGL v2.1.

Qt is one of the most popular graphical user interface (GUI) toolkits available in the open source world. FreeCAD uses this toolkit to draw the interface of the program. For this, the Qt Designer application is very useful as it allows developers to quickly draw the dialogs and windows, export them as XML resource files, and then load these interfaces at runtime.

Further information about Qt libraries and their programming documentation are available at Qt Documentation.

Shiboken2 and Pyside2

Shiboken is the Python binding generator that Qt for Python uses to create the PySide module, in other words, it is the system that is used to expose the Qt C++ API to the Python language.

The original Shiboken and PySide packages were meant to be used with Python 2 and Qt4; since these two versions are considered obsolete in 2019, please use Shiboken2 and PySide2, which work with Python 3 and Qt5. New development of FreeCAD is done with Python 3 and Qt5, so compatibility with Python 2 and Qt4 is not guaranteed after FreeCAD 0.18.

Read more about Shiboken and Pyside on Qt for Python.

Coin3D

Version: 3.0 or higher

License: BSD 3-clause license

Coin3D is a high-level 3D graphics library with a C++ application programming interface. It uses scenegraph data structures to render real-time graphics suitable for all kinds of scientific and engineering visualization applications.

Coin3D is built on the industry-standard OpenGL immediate mode rendering library, and adds abstractions for higher-level primitives, provides 3D interactivity, and contains many complex optimization features for fast rendering that are transparent for the application programmer.

Coin3D is compatible with SGI's Open Inventor 2.1 API. This API has become the de facto standard graphics interface for 3D visualization in the scientific and engineering community. It has proved its worth since the year 2000 as a major building block in thousands of engineering applications around the world.

Coin3D (Open Inventor) is used as the 3D viewer in FreeCAD because the OpenCASCADE viewer (AIS and Graphics3D) has limitations and performance bottlenecks, especially with large-scale engineering rendering; other things like textures or volumetric rendering are not entirely supported by the OpenCASCADE viewer.

Coin3D is portable over a wide range of platforms: UNIX, Linux, BSD, macOS, and Microsoft Windows operating systems. To read more about this library visit Coin3D homepage.

SoQt (deprecated)

Version: 1.2.0 or higher

License: BSD 3-clause license

SoQt is the Coin3D (Open Inventor) binding to the Qt GUI toolkit.

SoQt is no longer used in FreeCAD, it was replaced by Quarter which is a more recent Qt binding.

Quarter

Version: 1.0 or higher

License: BSD 3-clause license

Quarter is a newer Coin3D binding to the Qt toolkit. A version of it is included in the source code of FreeCAD so it is compiled together with it.

Pivy

Version: 0.6.3 or higher

License: BSD 3-clause license

Pivy is a library that wraps the Coin3d library for use in Python. It is not needed to build FreeCAD or to start it, but it is needed as a runtime dependency by the Draft Workbench, and by other workbenches that use it internally, like Arch and BIM.

If you are not going to use these workbenches, you won't need Pivy.

Ply

Version: 3.11 or higher

License: BSD 3-clause license

Ply is the Python-Lex-Yacc parser. It is used as a runtime dependency by the OpenSCAD Workbench. If you don't use this workbench, you may not need this package.

For more information see Ply homepage

Xerces-C++

Version: 3.0 or higher

License: Apache Software License Version 2.0

Xerces-C++ is a validating XML parser written in a portable subset of C++. Xerces-C++ makes it easy to give your application the ability to read and write XML data. A shared library is provided for parsing, generating, manipulating, and validating XML documents. Xerces-C++ is faithful to the XML 1.0 recommendation and associated standards.

The parser is used for saving and restoring parameters in FreeCAD. For more information see Xerces-C++ homepage.

Eigen3

Version: 3.0 or higher

License: Starting from the 3.1.1 version, it is licensed under the Mozilla Public License 2.0. Earlier versions were licensed under the GNU Lesser General Public License 3.

Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms.

If you just want to use Eigen, you can use the header files right away. There is no binary library to link to, and no configured header file. Eigen is a pure template library defined in the headers.

Eigen is used in FreeCAD for many vector operations in 3D space. To learn more, visit Eigen homepage.

Zipios++

Version: 0.1.5 or higher

License: GNU Lesser General Public License 2.1

Zipios++ is a C++ library for reading and writing .zip files. Access to individual entries is provided through standard C++ iostreams. A simple read-only virtual file system that mounts regular directories and .zip files is also provided. The structure and public interface of Zipios++ are loosely based on the java.util.zip package of Java.

FreeCAD's native file format .FCstd is in reality a .zip file that stores and compresses other types of data within it, such as BREP and XML files. Therefore, Zipios++ is used to save and open compressed archives, including FreeCAD files.

A copy of Zipios++ is included in the source code of FreeCAD so it is compiled together with it. If you want to use an external Zipios++ library, provided by your operating system, you may set -DFREECAD_USE_EXTERNAL_ZIPIOS=ON with cmake.

Zipios++ uses the Zlib library to perform the actual decompression of files.

Zlib

Version: 1.0 or higher

License: zlib license

Zlib is designed to be a free, general-purpose, lossless data-compression library for use on any computer hardware and operating system. It implements the DEFLATE compression algorithm commonly used in .zip and .gzip files.

A copy of this library is included in the source code of FreeCAD so it is compiled together with it.

libarea

Version: 0.0.20140514-1 or higher

License: BSD 3-clause license

Libarea is a software library to compute profile and pocket operations which are used in computer aided manufacturing (CAM) software. It was created by Dan Heeks for his HeeksCNC project.

A copy of the library is included with the source code of the CAM Workbench, so it is compiled together with it.

LibPack

LibPack is a convenient package with FreeCAD's build dependencies collected together. It is only needed if you are compiling FreeCAD on Windows with Visual Studio 2015 and above. You can find the latest LibPack on the releases page.

If you're working under Linux, you don't need the LibPack, as you can get the dependencies from your distribution's repositories as mentioned in the compile on Linux page.

FreeCAD 12.1.2

See the announcement in the forum: New libpacks for Windows with Qt5.12, OCC7.3 and Python 3.6 by apeltauer

It includes among other things: Boost 1.67, Coin3D 4.0.0a, Eigen3, Open CASCADE Technology 7.3.0, Python 3.6.8, PySide2, Qt 5.12.1, Salome SMESH, Shiboken2, vtk7, Xerces-C, Zipios++, zlib 1.2.11