FreeCAD Docker CLI Modus
This documentation is not finished. Please help and contribute documentation.
GuiCommand model explains how commands should be documented. Browse Category:UnfinishedDocu to see more incomplete pages like this one. See Category:Command Reference for all commands.
See WikiPages to learn about editing the wiki pages, and go to Help FreeCAD to learn about other ways in which you can contribute.
Übersicht
Docker Abbild von FreeCAD ohne GUI kompiliert. Dieses Docker Abbild ist speziell für Entwickler gedacht, die FreeCAD nur in der Kommandozeilen Schnittstelle (CLI) verwenden wollen.
Nutzen
All of FreeCAD's dependencies are already installed, compatible with each other, and configured appropriately, allowing you to get started developing very quickly.
- Easy to use and lightweight.
- It gives better performance in terms of speed.
- No need to add FreeCAD paths to import it into Python.
Docker Repositorien
- Docker Anlaufstelle: https://hub.docker.com/r/amrit3701/freecad-cli
- Github Repo: https://github.com/amrit3701/docker-freecad-cli
Voraussetzungen
- 3 GB freier Speicherplatz
- Docker
Einrichtung
- Ziehe das Docker Abbild auf.
docker pull amrit3701/freecad-cli:latest
- Wenn du das Docker Abbild erfolgreich aufgezogen hast, kannst du jetzt das Abbild ausführen.
docker run -it amrit3701/freecad-cli:lastest bash
Zusätzliche Informationen
Erweitern docker Abbild
Du kannst diese Docker Abbilder auch erweitern, um zusätzliche Abhängigkeiten für dein Projekt hinzuzufügen. Für z.B.
# Dockerfile
FROM amrit3701/freecad-cli:lastest
# Add additional dependencies
# pip3.8 install <some_package>
Importieren FreeCAD in Python
Nachdem ausführen des docker Abbilds, führe einfach Python
aus.
$ docker run -it amrit3701/freecad-cli:lastest bash
root@f0ec904cf9b9:/# python3.8
Python 3.8.5 (default, Jul 20 2020, 19:48:14)
[GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import FreeCAD
>>> import Part
>>> import Draft
>>> import Arch
FreeCADCmd Starten
Um FreeCAD im Bild des Andockers zu starten, führe einfach den Befehl FreeCADCmd
aus.
Diskussion
FreeCAD Forumsbeitrag: https://forum.freecadweb.org/viewtopic.php?f=8&t=45877