FreeCAD kopflos

From FreeCAD Documentation
Revision as of 19:37, 20 October 2023 by FBXL5 (talk | contribs) (Created page with "Diese Wiki-Seite dokumentiert verschiedene Aspkte des Betriebs von FreeCAD in der Konsole, ohne die Benutzerschnittstelle (GUI) zu aktivieren, was auch 'kopflos' (headless) genannt wird.")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Other languages:

Einleitung

Diese Wiki-Seite dokumentiert verschiedene Aspkte des Betriebs von FreeCAD in der Konsole, ohne die Benutzerschnittstelle (GUI) zu aktivieren, was auch 'kopflos' (headless) genannt wird.

Scenegraph Representation

As it's not possible to create or access the view provider in headless mode. What's possible is to load FreeCADGui in headless mode but there is no way to access the GUI document because it won't be created and consequently there exist no view providers.

However, what's possible is to create a scenegraph representation of an object:

import FreeCADGui as Gui
from pivy import coin

Gui.setupWithoutGUI()
doc = App.newDocument()
obj = doc.addObject("Part::Box","Box")
doc.recompute()
view = Gui.subgraphFromObject(obj)

See: forum thread.

Examples

Searching FreeCAD Modules

  1. Open the terminal and type:
    $ /path/to/FreeCAD -c
    or
    $ /path/to/FreeCADCmd
  2. A python shell will start with a prompt. Type help().
  3. A help text is displayed.
  4. Type modules freecad.

Related