Std DependencyGraph: Difference between revisions

From FreeCAD Documentation
(Marked this version for translation)
m (Added more details to installation for linux. (Needed to edit the whole page since I added or removed a <translate> tag))
Line 20: Line 20:


==Installation== <!--T:9-->
==Installation== <!--T:9-->
To use the Dependency graph, a third-party software named [http://graphviz.org/ Graphviz] needs to be installed first. If you do not have it pre-installed or it is installed in an unconventional location, FreeCAD will display the following dialogue:
[[File:FreeCAD-0.17-missing-Graphviz-error-dialogue.png|center]]


To use the Dependency graph, a third-party software named [http://graphviz.org/ Graphviz] needs to be installed first.
===Windows=== <!--T:15-->
===Windows=== <!--T:15-->
Download the '''graphviz-2.xx.msi''' installer from the [http://graphviz.org/Download_windows.php Download page] and launch it to install it.
Download the '''graphviz-2.xx.msi''' installer from the [http://graphviz.org/Download_windows.php Download page] and launch it to install it.
Line 44: Line 45:


<!--T:21-->
<!--T:21-->
In case the Graphviz binaries are installed in some other place try to find the program with the command
In case the Graphviz binaries are installed in a non-standard location try to find the program with the command
</translate>
</translate>
{{Code|code=
{{Code|code=
Line 57: Line 58:
}}
}}
<translate>
<translate>
And therefore you can tell FreeCAD to look in that directory.


===Linux=== <!--T:10-->
===Linux=== <!--T:10-->
On most Linux distributions (Debian/Ubuntu, Fedora, OpenSUSE), you just need to install the graphviz package from the repositories.
On most Linux distributions (Debian/Ubuntu, Fedora, OpenSUSE), you just need to install the graphviz package from the repositories. However, similarly to MacOSX, in cases where the Graphviz binaries are installed in a non-standard location, try to find the program with the command:


{{Code|code=
$ type dot
}}

It may output something like
{{Code|code=
dot is /usr/local/bin/dot
}}

And therefore you can point FreeCAD to look in that directory.
==Configuration== <!--T:16-->
==Configuration== <!--T:16-->
You shouldn't need any configuration of FreeCAD preferences. If FreeCAD cannot find the utility "dot" (from the Graphviz package) then a dialog comes up and asks the user for its path: set the path to the folder that contains the "dot" executable, do not select the executable itself. FreeCAD then tries to start the utility again and in case it succeeds the value is written automatically to the user parameters.
You shouldn't need any configuration of FreeCAD preferences. If FreeCAD cannot find the utility "dot" (from the Graphviz package) then a dialog comes up and asks the user for its path: set the path to the folder that contains the "dot" executable, do not select the executable itself. FreeCAD then tries to start the utility again and in case it succeeds the value is written automatically to the user parameters.

Revision as of 16:21, 20 July 2017

Std DependencyGraph

Menu location
Tools → Dependency graph...
Workbenches
All
Default shortcut
None
Introduced in version
-
See also
None


Description

The Dependency graph displays the dependencies between objects in the active document as a graph. As opposed to the Model tree, objects are listed in reverse chronological order, with the first created object at the bottom.

It can be useful in analyzing a FreeCAD document and locating forks in a tree. The dependency graph layout will depend on which workbench was used to create the objects in the document. For example, in FreeCAD 0.16, a model exclusively made in the PartDesign workbench should display a linear dependency graph with a single vertical branch. A model made with Part operations will have many branches, but for a single part they will join up at the top after Boolean operations. If they don't, it means that they are separate objects.

The dependency graph is purely a visualization tool, therefore it cannot be edited; it automatically updates if changes are made to the model.

DependencyGraph1.png

Installation

To use the Dependency graph, a third-party software named Graphviz needs to be installed first. If you do not have it pre-installed or it is installed in an unconventional location, FreeCAD will display the following dialogue:

Windows

Download the graphviz-2.xx.msi installer from the Download page and launch it to install it.

Mac/OSX

You can install graphviz using Homebrew:

$ brew install graphviz

This installs the graphviz binaries under /usr/local/bin. Unfortunately we can't navigate directly there from the file dialog that comes up from FreeCAD->Tools->Dependency graph. When you get the file selection dialog use the keys Cmd+Shift+G to get an input field for the path. Enter

/usr/local/bin

and confirm the input field and the file selection dialog.

In case the Graphviz binaries are installed in a non-standard location try to find the program with the command

$ type dot

It will output something like

dot is /usr/local/bin/dot

And therefore you can tell FreeCAD to look in that directory.

Linux

On most Linux distributions (Debian/Ubuntu, Fedora, OpenSUSE), you just need to install the graphviz package from the repositories. However, similarly to MacOSX, in cases where the Graphviz binaries are installed in a non-standard location, try to find the program with the command:

$ type dot

It may output something like

dot is /usr/local/bin/dot

And therefore you can point FreeCAD to look in that directory.

Configuration

You shouldn't need any configuration of FreeCAD preferences. If FreeCAD cannot find the utility "dot" (from the Graphviz package) then a dialog comes up and asks the user for its path: set the path to the folder that contains the "dot" executable, do not select the executable itself. FreeCAD then tries to start the utility again and in case it succeeds the value is written automatically to the user parameters.

How to use

  1. Go to the Tools → Dependency graph... menu
  2. A new tab titled Dependency graph opens over the main area of the FreeCAD window.
  3. Use the mouse scroll wheel to zoom in / zoom out.
  4. Use the horizontal slider at the bottom of the screen to pan the view sideways.

Save/Export

You can save/export the displayed dependency graph as an image file. While the Dependency graph tab is in the foreground:

  • Just choose FileSave As to save the graph as a picture (PNG/BMP/GIF/JPG), a vector graphic (SVG) or as a pdf-file (PDF).
  • FileExport or ToolsSave picture will NOT work.