Third Party Libraries: Difference between revisions

From FreeCAD Documentation
(SoQt is the Open Inventor binding to the Qt GUI toolkit.)
m (Updated versions for qt, python and occt. Reference: https://wiki.freecadweb.org/0.20_Development_Cycle)
(43 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
<translate>
<translate>

<!--T:72-->
<!--T:72-->
{{Docnav
{{docnav|Compiling (Speeding up)|Third Party Tools}}
|[[Compiling_(Speeding_up)|Compiling (Speeding up)]]
|[[Third_Party_Tools|Third Party Tools]]
}}

</translate>
{{TOCright}}
<translate>


== Overview == <!--T:1-->
== Overview == <!--T:1-->
These are libraries which FreeCAD uses as unmodified dependencies, that is, as [https://en.wikipedia.org/wiki/Dynamic_loading dynamically linked libraries]; they are files with an extension {{incode|.so}} in Linux/MacOS and {{incode|.dll}} in Windows. 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.
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/Unix|compile on Linux/Unix]], [[Compile_on_Windows|compile on Windows]], and [[Compile_on_MacOS|compile on MacOS]] for more information.


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


== Links == <!--T:3-->
== Links == <!--T:3-->
Line 15: Line 26:
{| class="wikitable" style="text-align:left"
{| class="wikitable" style="text-align:left"
|-
|-
! Library 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 || https://www.qt.io/
| OpenCASCADE || >= 7.3 || http://www.opencascade.org
|-
|-
| Coin3D || >= 2.x || https://bitbucket.org/Coin3D/coin/wiki/Home
| Qt || >= 5.4 || https://www.qt.io/
|-
|-
| SoQt (deprecated) || >= 1.2 || https://bitbucket.org/Coin3D/soqt/src/default/
| Shiboken2 || {{Emphasis|same as Qt}} || https://wiki.qt.io/Qt_for_Python/Shiboken
|-
| PySide2 || {{Emphasis|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 || XXX
|-
| 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
|-
|-
| Quarter || >= 1.0.0 || https://bitbucket.org/Coin3D/quarter/src/default/
| Zlib || >= 1.0 || http://www.zlib.net/, https://github.com/madler/zlib
|-
| Xerces-C++ || >= 2.7.x < 3.0 || http://xml.apache.org/xerces-c/
|-
| Zlib || >= 1.x.x || http://www.zlib.net/
|-
| Boost || >= 1.33.x || http://www.boost.org/
|-
| Eigen3 || >= 3.0.1 || http://eigen.tuxfamily.org/index.php?title=Main_Page
|-
| Shiboken || >= 1.1.2 || http://shiboken.readthedocs.org/en/latest/
|-
|-
| libarea || N/A || https://github.com/danielfalck/libarea
| libarea || >= 0.0.20140514-1 || https://github.com/danielfalck/libarea
|-
|-
|}
|}
Line 54: Line 85:
{{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.}}
{{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.}}


<!--T:79-->
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
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 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,
Line 59: Line 91:
* to implement application logic for standard packages,
* to implement application logic for standard packages,
* to implement auxiliary tools such as the [[Addon Manager|Addon Manager]],
* to implement auxiliary tools such as the [[Addon Manager|Addon Manager]],
* to implement entire workbenches like [[Arch Workbench|Draft]] and [[Arch Workbench|Arch]],
* to implement entire workbenches like [[Draft Workbench|Draft]] and [[Arch Workbench|Arch]],
* to dynamically load packages,
* to dynamically load packages,
* to implement rules for design (knowledge engineering),
* to implement rules for design (knowledge engineering),
Line 67: Line 99:
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.
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.


<!--T:80-->
Python was chosen as the scripting language for FreeCAD for different reasons:
Python was chosen as the scripting language for FreeCAD for different reasons:
* It is more object oriented than Perl and Tcl.
* It is more object oriented than Perl and Tcl.
Line 72: Line 105:
* It is easier to embed in another application, unlike, say, Java.
* It is easier to embed in another application, unlike, say, Java.


<!--T:81-->
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].
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-->

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

<!--T:57-->
'''License:''' Boost Software License - Version 1.0

<!--T:58-->
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-->
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-->
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-->
=== OpenCASCADE Technology === <!--T:12-->
Line 85: Line 136:
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.
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-->
OCCT is a big and complex set of C++ libraries that provide functionality required by a CAD application:
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 complete STEP compliant geometry kernel.
Line 92: Line 144:
* 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.
* 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-->
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.
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.


Line 100: Line 153:


<!--T:18-->
<!--T:18-->
'''Version:''' 4.1.x or higher
'''Version:''' 4.1 or higher


<!--T:19-->
<!--T:19-->
Line 108: Line 161:
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.
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-->
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].
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:70-->
==== Shiboken2 and Pyside2 ==== <!--T:70-->
Shiboken (''Shi bō ken'', 死某剣) 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.
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-->
<!--T:71-->
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.
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-->
Read more about Shiboken and Pyside on [https://wiki.qt.io/Qt_for_Python/Shiboken Qt for Python].
Read more about Shiboken and Pyside on [https://wiki.qt.io/Qt_for_Python/Shiboken Qt for Python].


Line 139: Line 194:


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


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


<!--T:36-->
<!--T:36-->
Line 150: Line 205:


<!--T:38-->
<!--T:38-->
SoQt is the Open 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-->
<!--T:75-->
SoQt is no longer used in FreeCAD, it was replaced by Quarter which is a more recent Qt binding.
SoQt is no longer used in FreeCAD, it was replaced by Quarter which is a more recent Qt binding.


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

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


<!--T:77-->
<!--T:77-->
Quarter is a new Coin3d binding to the Qt toolkit. A version of it is included in the source code of FreeCAD.
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-->
=== Xerces-C++ === <!--T:39-->


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


<!--T:41-->
<!--T:41-->
Line 170: Line 256:


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


<!--T:44-->
=== 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:45-->
<!--T:89-->
'''Version:''' 3.0 or higher
The parser is used for saving and restoring parameters in FreeCAD.


=== Zlib === <!--T:51-->
<!--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:52-->
<!--T:91-->
Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms.
'''Version:''' 1.x.x


<!--T:53-->
<!--T:92-->
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.
'''License:''' zlib License


<!--T:54-->
<!--T:93-->
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].
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.


=== Boost === <!--T:55-->
=== Zipios++ === <!--T:94-->


<!--T:56-->
<!--T:95-->
'''Version:''' 1.33.x
'''Version:''' 0.1.5 or higher


<!--T:57-->
<!--T:96-->
'''License:''' Boost Software License - Version 1.0
'''License:''' GNU Lesser General Public License 2.1


<!--T:58-->
<!--T:97-->
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.
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.


<!--T:59-->
<!--T:98-->
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.
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.


<!--T:60-->
<!--T:99-->
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}}.
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:61-->
<!--T:100-->
Zipios++ uses the Zlib library to perform the actual decompression of files.
See: http://www.boost.org/ for details.

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

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

<!--T:53-->
'''License:''' zlib license

<!--T:54-->
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-->
=== libarea === <!--T:66-->


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


<!--T:68-->
<!--T:68-->
'''License:''' New BSD (BSD 3-Clause)
'''License:''' BSD 3-clause license


<!--T:69-->
<!--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.
Area is a piece of software created by Dan Heeks for HeeksCNC. It is employed as a library for generation of CAM related operations in the Path Workbench.

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


== LibPack == <!--T:62-->
== LibPack == <!--T:62-->
LibPack is a convenient package with all the above libraries packed together. It is only needed if you are building on the Windows Platform and you can find it at https://github.com/FreeCAD/FreeCAD-ports-cache/releases. If you're working under Linux you have to use the package repositories of your Linux distribution, i.e. no libPack needed and offered for Linux.
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-->
=== FreeCADLibs7.x Changelog === <!--T:63-->
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/Unix|compile on Unix]] page.
* Using QT 4.5.x and Coin 3.1.x
* Eigen template lib for Robot added
* SMESH experimental


=== FreeCAD 12.1.2 === <!--T:104-->


<!--T:64-->
<!--T:105-->
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]
{{docnav|Compiling (Speeding up)|Third Party Tools}}


<!--T:73-->
<!--T:106-->
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
{{Userdocnavi}}



<!--T:65-->
<!--T:64-->
[[Category:Developer Documentation]]
{{Docnav
|[[Compiling_(Speeding_up)|Compiling (Speeding up)]]
|[[Third_Party_Tools|Third Party Tools]]
}}


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

Revision as of 20:17, 1 April 2021

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/Unix, 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 XXX
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 X, 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 Path 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 Unix 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