Hauptanwenderzentrum

From FreeCAD Documentation
Revision as of 21:35, 16 June 2019 by FuzzyBot (talk | contribs) (Updating to match new version of source page)
150
150

Diese Seite ist ein guter Startpunkt, um tief in FreeCAD einzusteigen. Hier kann man lernen, wie man FreeCAD für besondere Anforderungen anpasst.

Diese Seiten befinden sich im Aufbau. Falls du die Informationen, nach denen du suchst, nicht findest, oder aber irgendwo nützliche Informationen gefunden hast, die nicht verlinkt sind, hinterlasse doch bitte einen Kommentar im Forum oder füge das Material selbst hinzu!.

Einer der spannendsten Features von FreeCAD ist, dass man es in großem Umfang skripten oder erweitern kann, ohne dass es nötig ist etwas zu kompilieren oder den Quellcode zu modifizieren. Dazu wird die sehr einfache aber mächtige Programmiersprache Python eingesetzt. Mit einfachen Python Skripten hat man vollen Zugriff auf fast alle Teile von FreeCAD. Zum Beispiel kann man:

  • Geometrien erzeugen und modifizieren: Benötigst du eine besondere Art von Objekt, das nicht im Standardumfang von FreeCAD enthalten ist? Man kann sehr einfach einen neuen Objekttyp zu FreeCAD hinzufügen, entweder durch Anpassung eines bereits vorhandenen Typs, oder durch komplette Neuentwicklung.
  • Erstelle eigene Werkzeuge und Kommandos: FreeCAD hat bereits viele Funktionen, aber es gibt noch nicht so viele bequem nutzbare Werkzeuge und Kommandos für den Benutzer. Aber es ist nicht schwer, eigene Werkzeuge zu entwickeln.
  • Verändere die Benutzeroberfläche': Die Beutzeroberfläche von FreeCAD ist in vielerlei Hinsicht noch recht rudimentär, aber es sind alle Voraussetzungen dafür geschaffen, sie an bestimmte Anforderungen anzupassen. Man kann zum Beispiel eigene Werkzeugleisten für eigene Werkzeuge erstellen und vieles mehr.
  • Verändere die Anzeige der Szene: FreeCAD hat spezielle Prozesse für den Aufbau und Berechnung der Geometrie, und für die Anzeige derselben. Man hat volle Kontrolle über die Art und Weise, wie Inhalte auf dem Bildschirm dargestellt werden und kann diese Darstellung verändern, mit ihr interagieren oder beliebiges Verhalten und Widgets hinzufügen wie Informationen, Verschiebegriffe, Anker oder temporäre Entitäten.

FreeCAD anpassen

Scripting in FreeCAD

General

Modules

The functionality of FreeCAD is separated in Modules which deal with special data types and applications. FreeCAD has built-in modules and Extension Modules (plug-ins). Once plugin modules are installed, they become availible to you as easily as the built-in modules. The modules described below are the default modules, includeed in every FreeCAD installation.

  • The Builtin modules are the principal FreeCAD modules. They contain tools for manipulating general FreeCAD configurations, documents and their contents.
  • Workbench creation shows you how to create your own workbench

Working with Meshes

Working with Parts

Accessing the Coin scenegraph

Controlling the Qt interface

Working with parametric objects

Examples

  • Code snippets : A collection of pieces of FreeCAD Python code, to serve as ingredients in your scripts...
  • Line drawing function: How to build a simple tool to draw lines
  • Dialog creation: How to construct dialogs with Qt designer, and use them in FreeCAD
  • Embedding FreeCAD: How to import FreeCAD as a Python module in other applications
  • The Draft Module adds basic 2d drawing functions to freecad. It is written entirely in Python, so it can be a good example if you want to write your own modules.
  • FreeCAD vector math library : A couple of handy functions to manipulate FreeCAD vectors. This library is also included in the Draft module.

API Functions

The complete API documentation of FreeCAD is located at http://www.freecadweb.org/api/ . It contains both C++ and Python APIs, and is not totally well formatted yet, which can be confusing when looking for python-only code. An easier to browse version can be found here. Note that it can be incomplete, since it is updated manually. For more accurate information, browse the modules directly from FreeCAD's Python console.

Related: Exposing C++ to Python

Advanced modification

Python tutorials

These are good generic tutorials, not specific to FreeCAD, that might interest you if you are totally new to python.

Python

PySide - How to create and manage FreeCAD's Qt UI interface from python

The following two references are PyQt specific (not PySide) but may offer some information of use:

Pivy - How to interact with FreeCAD's 3D scenes

Community projects

On the Community portal, you can find other FreeCAD-based projects run by the FreeCAD users community. If you are starting a new FreeCAD project, be sure to list it there! We also have a page with things you can do if you would like to Help FreeCAD.