Quellendokumentation
Der FreeCAD-Quellcode ist kommentiert, um eine automatische HTML-Dokumentation-Generierung mit Doxygen zu ermöglichen. Dies gilt sowohl für die C++- als auch die Python-Teile des FreeCAD-Quellcodes.
Die (englischsprachige) Sourcecode-Dokumentation ist online unter api zu finden.
Compiling the API documentation follows the same general steps as compiling the FreeCAD executable, as indicated in the compile on Unix page.
General workflow to compile FreeCAD's programming documentation. The Doxygen and Graphviz packages must be in the system, as well as the FreeCAD source code itself. CMake configures the system so that with a single make instruction the documentation for the the entire project is compiled into many HTML files with diagrams.
Die Source-Code-Dokumentation erzeugen
Wenn Sie Doxygen installiert haben, ist die Erzeugung der Dokumentation sehr einfach. Wechseln Sie in das build-Verzeichnis, konfigurieren Sie den Quellcode mit CMake, und tippen Sie
sudo apt install doxygen graphviz
Then follow the same steps you would do to compile FreeCAD, as described on the compile on Unix page, and summarized here for convenience.
- Get the source code of FreeCAD and place it in its own directory
freecad-source
. - Create another directory
freecad-build
in which you will compile FreeCAD and its documentation. - Configure the sources with
cmake
, making sure you indicate the source directory, and specify the required options for your build. - Trigger the creation of the documentation using
make
.
git clone https://github.com/FreeCAD/FreeCAD.git freecad-source
mkdir freecad-build
cd freecad-build
cmake -DBUILD_QT5=ON -DPYTHON_EXECUTABLE=/usr/bin/python3 ../freecad-source
While you are inside the build directory issue the following instruction to create only the documentation.
make -j$(nproc --ignore=2) DevDoc
und konsultieren Sie die erzeuten HTML-Dateien, indem Sie mit Doc/SourceDocu/html/index.html starten.
freecad-build/doc/SourceDocu/html/
The point of entrance to the documentation is the index.html
file, which you can open with a web browser:
xdg-open freecad-build/doc/SourceDocu/html/index.html
Wenn graphviz auf Ihrem System installiert ist, wird make DevDoc mehr als 2Gb Daten erzeugen. Eine alternative, kleinere Version (~500Mb) - das ist die auf api benutzte Version - kann stattdessen erzeugt werden durch
An alternative, smaller version of the documentation which takes only around 600 MB can be generated with a different target. This is the version displayed on the FreeCAD API website.
make -j$(nproc --ignore=2) WebDoc
Alternativ wird die Dokumentation von Zeit zu Zeit generiert und auf Sourceforge hier zur Verfügung gestellt.
FreeCAD 0.16 development documentation built by qingfeng.xia.
Hier gibt es eine weitere FreeCAD-Doxygen Dokumentation generiert von qingfeng.xia.
Die Coin3D-Dokumentation integrieren
Auf Unix-Systemen ist es möglich, die Coin3D-Quellcode-Dokumentation mit der von FreeCAD zu verbinden. Es erlaubt einfachere Navigation und komplette Vererbungsdiagramme für Coin-abgeleitete Klassen.
- Auf Debian und davon abgeleiteten Systemen:
- - installieren Sie das Package libcoin60-doc
- - entpacken Sie die Datei /usr/share/doc/libcoin60-doc/html/coin.tag.gz
- - Regenerieren Sie die Quellcode-Dokumentation
- Sie sind bereit für das Offline-betrachten.
- Wenn Sie das Coin-Doc-Package nicht installieren wollen oder können, werden Links generiert, um die Coin-Dokumentation online auf doc.coin3D.org zu erreichen, wenn die doxygen-Tag-Datei (per wget) während der Ausführung von configure heruntergeladen werden kann.
Wie doxygen in den FreeCAD-Quellcode integriert werden kann
Beispiel einer kompletten doxygen-Seite: (eines anderen Projekts)
See the Doxygen page for an extensive explanation on how to comment C++ and Python source code so that it can be processed by Doxygen to automatically create the documentation.
Essentially, a comment block, starting with /**
or ///
for C++, or ##
for Python, needs to appear before every class or function definition, so that it is picked up by Doxygen. Many special commands, which start with \
or @
, can be used to define parts of the code and format the output. Markdown syntax is also understood within the comment block, which makes it convenient to emphasize certain parts of the documentation.
/**
* Returns the name of the workbench object.
*/
std::string name() const;
/**
* Set the name to the workbench object.
*/
void setName(const std::string&);
/// remove the added TaskWatcher
void removeTaskWatcher(void);
- Erste Schritte
- Installation: Herunterladen, Windows, Linux, Mac, Zusätzlicher Komponenten, Docker, AppImage, Ubuntu Snap
- Grundlagen: Über FreeCAD, Graphische Oberfläche, Mausbedienung, Auswahlmethoden, Objektname, Programmeinstellungen, Arbeitsbereiche, Dokumentstruktur, Objekteigenschaften, Hilf FreeCAD, Spende
- Hilfe: Tutorien, Video Tutorien
- Arbeitsbereiche: Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Start, Surface, TechDraw, Test Framework, Web