Std DependencyGraph/pt-br: Difference between revisions

From FreeCAD Documentation
(Created page with "Caso os binários do Graphviz estejam instalados em um local não padrão, tente encontrar o programa com o comando:")
(Created page with "Ele produzirá algo como:")
Line 67: Line 67:
}}
}}


Ele produzirá algo como:
It will output something like:


{{Code|lang=text|code=
{{Code|lang=text|code=

Revision as of 16:36, 21 June 2024

Std DependencyGraph

Menu location
None
Workbenches
{{{Workbenches}}}
Default shortcut
None
Introduced in version
-
See also
None

Descrição

O comando Std DependencyGraph exibe as dependências entre objetos no documento ativo em um 'gráfico de dependência'. Ao contrário do modo de Vista em árvore, os objetos são listados em ordem cronológica inversa, com o primeiro objeto criado na parte inferior.

le pode ser útil na análise de um documento FreeCAD e na localização de bifurcações em uma árvore. O layout do gráfico de dependência dependerá de qual bancada de trabalho foi usada para criar os objetos no documento. Por exemplo, um modelo feito exclusivamente na bancada de trabalho PartDesignpode exibir um gráfico de dependência linear com uma única ramificação vertical. Um modelo feito com operações da bancada Part terá muitas filiais, mas para uma única parte elas se juntarão no topo após as operações booleanasbooleanas. Se não o fizerem, significa que são objetos separados.

O gráfico de dependência é puramente uma ferramenta de visualização, portanto, não pode ser editado. Ele é atualizado automaticamente se forem feitas alterações no modelo.

Exemplo de um gráfico de dependência com um corpo PartDesign à esquerda e um objeto criado com operações Part à direita

Instalação

Para usar o comando, um software de terceiros chamado Graphvizprecisa ser instalado. Se você não o tiver pré-instalado ou se ele estiver instalado em um local não convencional, o FreeCAD exibirá a seguinte caixa de diálogo:

Windows

Baixe o instalador do graphviz-2.xx na página Download do Graphviz e inicie-o para instalá-lo. Algumas versões mais antigas parecem ter problemas para exibir o gráfico; A versão 2.38 e mais recente são conhecidas por serem confiáveis. Você pode encontrar todas as versões do graphviz no Gitlab.

macOS

Você pode instalar o Graphviz usando Homebrew se tiver o macOS Big Sur (11) (ou superior). Ao instalar o Homebrew, não fique nervoso, se o macOS pedir que você instale atualizações, por exemplo, para as ferramentas de linha de comando do Xcode. Essas atualizações são executadas posteriormente pelo processo de instalação.

brew install graphviz

Isso instala os binários do Graphviz em /usr/local/bin para macOS na Intel ou /opt/homebrew para macOS no Apple Silicon/ARM. O FreeCAD deve encontrar automaticamente esses locais. Se o programa Graphviz não for encontrado, você será solicitado a especificar um caminho. Infelizmente, não podemos navegar diretamente para o programa na caixa de diálogo de arquivo que surge de Ferramentas → gráfico de dependência.... Há duas opções: Você pode usar a combinação de teclas Cmd+Shift+. para mostrar itens ocultos. Ou você pode usar a combinação de teclas Cmd+Shift+G para obter um campo de entrada para o caminho. Insira um destes caminhos no Terminal:

/usr/local/bin

ou:

/opt/homebrew/bin

e confirme o campo de entrada e a caixa de diálogo de seleção de arquivo.

Caso os binários do Graphviz estejam instalados em um local não padrão, tente encontrar o programa com o comando:

type dot

Ele produzirá algo como:

dot is /usr/local/bin/dot

And you can tell FreeCAD to look in that directory.

If you don't have macOS Big Sur (11) (or higher) Homebrew might not work, but you can use MacPorts instead. Just download the appropriate version for your OS. Once the installation is complete, enter this command in the Terminal:

sudo port install graphviz

Enter your password and wait while the dependencies are downloaded and installed (it can take some time).

The Graphviz binaries may be under /usr/local/bin or /opt/local/bin/dot. FreeCAD may automatically find the Graphviz program with the file dialog that comes up from Tools → Dependency graph..., if not enter this command:

type dot

It will output something like:

dot is /opt/local/bin/dot

And you can tell FreeCAD to look in that directory as explained before.

It is also possible to make the opt directory visible with this command:

defaults write com.apple.finder AppleShowAllFiles YES;

then:

killall Finder /System/Library/CoreServices/Finder.app;

Therefore you can tell FreeCAD to follow this path. It has been successfully tested on macOS 10.13 (High Sierra).

Linux

On most Linux distributions (Debian/Ubuntu, Fedora, OpenSUSE), you just need to install the Graphviz package from the repositories. However, similar to the macOS, 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.

Utilização

  1. Select the Tools → Dependency graph... option from the menu.
  2. A new tab titled Dependency graph opens in the Main view area.
  3. Use the mouse scroll wheel to zoom in or out.
  4. Use the sliders at the bottom and at the right of the screen to pan the view. Alternatively hold down the left mouse button and move the mouse.

Save

You can save a dependency graph:

  1. Make sure the Dependency graph tab is in the foreground.
  2. Select the File → Save or File → Save As option from the menu.
  3. Enter a filename and select the file type (*.gv, *.png, *.bmp, *.gif, *.jpg, *.svg or *.pdf).
  4. Press the Save button.

Princípios gerais

  • The graph shows objects in reverse chronological order.
  • The direction of arrows showing dependencies should always point down, from the child object to the parent object. An arrow pointing up indicates a cyclic dependency, an issue that needs to be resolved.
  • A sketch that contains links to external geometry will have a number with an 'x' suffix besides the arrow linking it to its parent, showing the number of external geometries linked in the sketch.
  • Objects can have dependencies to multiple parents. For example, for a model built in PartDesign, a Pocket may be linked to its Sketch and to the Pad feature that came before it.
  • Disallowed dependencies (for example, between a Draft/Part operation and an element inside a PartDesign Body) will show with a red arrow. This type of link usually shows a 'Links go out of allowed scope' error in the Report view.
  • A Part container and PartDesign Body enclose their content inside a frame with a randomly colored background. Their Origin also encloses its content (standard planes and axes) in a frame.
  • A Groups is displayed as a single element linked to its content.

Limitações

  • The dependency graph cannot help with the topological naming problem. If a sketch switches faces of a feature after an edit, it is still linked to the feature. Even if some features are broken, the dependency graph will remain unchanged.