Std DependencyGraph/pt-br: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Created page with "Ele produzirá algo como:")
(23 intermediate revisions by the same user not shown)
Line 12: Line 12:
{{GuiCommand
{{GuiCommand
|Name=Std DependencyGraph
|Name=Std DependencyGraph
|Localização do menu=Ferramentas → Gráfico de dependência...
|MenuLocation=Tools → Dependency graph...
|Bancadas=Todo
|Workbenches=All
}}
}}


Line 19: Line 19:
== Descrição ==
== Descrição ==


The '''Std DependencyGraph''' command displays the dependencies between objects in the active document in a 'dependency graph'. As opposed to the [[Tree_view|Tree view]], objects are listed in reverse chronological order, with the first created object at the bottom.
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 [[Tree_view/pt-br|Vista em árvore]], os objetos são listados em ordem cronológica inversa, com o primeiro objeto criado na parte inferior.


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 a model made exclusively in the [[PartDesign_Workbench|PartDesign]] workbench can display a linear dependency graph with a single vertical branch. A model made with [[Part_Workbench|Part]] operations will have many branches, but for a single part they will join up at the top after [[Part_Boolean|Boolean]] operations. If they don't, it means that they are separate objects.
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 [[PartDesign_Workbench/pt-br|PartDesign]]pode exibir um gráfico de dependência linear com uma única ramificação vertical. Um modelo feito com operações da bancada [[Part_Workbench/pt-br|Part]] terá muitas filiais, mas para uma única parte elas se juntarão no topo após as operações [[Part_Boolean/pt-br|booleanas]]booleanas. 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.
The dependency graph is purely a visualization tool, therefore it cannot be edited. It automatically updates if changes are made to the model.


[[Image:Std_DependencyGraph_example.svg|400px]]
[[Image:Std_DependencyGraph_example.svg|400px]]
{{Caption|Example of a dependency graph with a PartDesign body on the left and an object created with Part operations on the right}}
{{Caption|Exemplo de um gráfico de dependência com um corpo PartDesign à esquerda e um objeto criado com operações Part à direita}}


==Installation==
<span id="Installation"></span>
==Instalação==


To use the command a third-party software named [http://graphviz.org/ Graphviz] needs to be installed. If you do not have it pre-installed or it is installed in an unconventional location, FreeCAD will display the following dialog:
Para usar o comando, um software de terceiros chamado [http://graphviz.org/ Graphviz]precisa 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:


[[File:FreeCAD-0.17-missing-Graphviz-error-dialogue.png]]
[[File:FreeCAD-0.17-missing-Graphviz-error-dialogue.png]]
Line 36: Line 37:
===Windows===
===Windows===


Download the '''graphviz-2.xx''' installer from the [https://graphviz.org/download/#windows Graphviz Download page] and launch it to install it. Some older versions seem to have issues displaying the graph; version 2.38 and newer are known to be reliable. You can find all graphviz releases on [https://gitlab.com/graphviz/graphviz/-/releases Gitlab].
Baixe o instalador do graphviz-2.xx na [https://graphviz.org/download/#windows 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 [https://gitlab.com/graphviz/graphviz/-/releases Gitlab].


===macOS===
===macOS===


You can install Graphviz using [https://brew.sh/ Homebrew] if you have macOS Big Sur (11) (or higher). While installing Homebrew, don't get nervous, if macOS asks you to install updates, e.g. for the Xcode commandline tools. These updates are performed later by the installation process.
Você pode instalar o Graphviz usando [https://brew.sh/ 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.


{{Code|lang=text|code=
{{Code|lang=text|code=
Line 46: Line 47:
}}
}}


This installs the Graphviz binaries under {{FileName|/usr/local/bin}} for macOS on Intel, or {{FileName|/opt/homebrew}} for macOS on Apple Silicon/ARM. FreeCAD should automatically find these locations. If the Graphviz program is not found you will be asked to specify a path. Unfortunately we can't navigate directly to the program in the file dialog that comes up from {{MenuCommand|ToolsDependency graph...}}. There are two options: You can use the key combination Cmd+Shift+. to show hidden items. Or you can use the key combination Cmd+Shift+G to get an input field for the path. Enter one of these paths in the [https://en.wikipedia.org/wiki/Terminal_(macOS) Terminal]:
Isso instala os binários do Graphviz em {{FileName|/usr/local/bin}} para macOS na Intel ou {{FileName|/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 {{MenuCommand|Ferramentasgráfico de dependência...}}. 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 [https://en.wikipedia.org/wiki/Terminal_(macOS) Terminal]:


{{Code|lang=text|code=
{{Code|lang=text|code=
Line 52: Line 53:
}}
}}


or:
ou:


{{Code|lang=text|code=
{{Code|lang=text|code=
Line 58: Line 59:
}}
}}


e confirme o campo de entrada e a caixa de diálogo de seleção de arquivo.
and confirm the input field and the file selection dialog.


Caso os binários do Graphviz estejam instalados em um local não padrão, tente encontrar o programa com o comando:
In case the Graphviz binaries are installed in a non-standard location try to find the program with the command:


{{Code|lang=text|code=
{{Code|lang=text|code=
Line 66: Line 67:
}}
}}


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


{{Code|lang=text|code=
{{Code|lang=text|code=
Line 72: Line 73:
}}
}}


E você pode dizer ao FreeCAD para olhar nesse diretório.
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 [https://www.macports.org/index.php MacPorts] instead. Just download the [https://www.macports.org/install.php appropriate version for your OS]. Once the installation is complete, enter this command in the [https://en.wikipedia.org/wiki/Terminal_(macOS) Terminal]:
Se você não tiver o macOS Big Sur (11) (ou superior) Homebrew pode não funcionar, mas você pode usar [https://www.macports.org/index.php MacPorts] em vez disso. Basta baixar a [https://www.macports.org/install.php versão apropriada para o seu sistema operacional]. Quando a instalação estiver concluída, digite este comando no [https://en.wikipedia.org/wiki/Terminal_(macOS) Terminal]:


{{Code|lang=text|code=
{{Code|lang=text|code=
Line 80: Line 81:
}}
}}


Digite sua senha e aguarde enquanto as dependências são baixadas e instaladas (pode levar algum tempo).
Enter your password and wait while the dependencies are downloaded and installed (it can take some time).


The Graphviz binaries may be under {{FileName|/usr/local/bin}} or {{FileName|/opt/local/bin/dot}}. FreeCAD may automatically find the Graphviz program with the file dialog that comes up from {{MenuCommand|ToolsDependency graph...}}, if not enter this command:
Os binários do Graphviz podem estar em {{FileName|/usr/local/bin}} ou {{FileName|/opt/local/bin/dot}}. FreeCAD pode encontrar automaticamente o programa Graphviz com a caixa de diálogo de arquivo que surge de {{MenuCommand|Ferramentasgráfico de dependência ...}}, se não digite este comando:


{{Code|lang=text|code=
{{Code|lang=text|code=
Line 88: Line 89:
}}
}}


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


{{Code|lang=text|code=
{{Code|lang=text|code=
Line 126: Line 127:
And therefore you can point FreeCAD to look in that directory.
And therefore you can point FreeCAD to look in that directory.


==Usage==
<span id="Usage"></span>
==Utilização==


# Select the {{MenuCommand|Tools → [[Image:Std_DependencyGraph.svg|16px]] Dependency graph...}} option from the menu.
# Select the {{MenuCommand|Tools → [[Image:Std_DependencyGraph.svg|16px]] Dependency graph...}} option from the menu.
Line 141: Line 143:
# Press the {{Button|Save}} button.
# Press the {{Button|Save}} button.


<span id="General_principles"></span>
==General principles==
==Princípios gerais==


* The graph shows objects in reverse chronological order.
* The graph shows objects in reverse chronological order.
Line 151: Line 154:
* A [[Std_Group|Groups]] is displayed as a single element linked to its content.
* A [[Std_Group|Groups]] is displayed as a single element linked to its content.


==Limitations==
<span id="Limitations"></span>
== Limitações ==


* The dependency graph cannot help with the [[Topological_naming_problem|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.
* The dependency graph cannot help with the [[Topological_naming_problem|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.

Revision as of 16:38, 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

E você pode dizer ao FreeCAD para olhar nesse diretório.

Se você não tiver o macOS Big Sur (11) (ou superior) Homebrew pode não funcionar, mas você pode usar MacPorts em vez disso. Basta baixar a versão apropriada para o seu sistema operacional. Quando a instalação estiver concluída, digite este comando no Terminal:

sudo port install graphviz

Digite sua senha e aguarde enquanto as dependências são baixadas e instaladas (pode levar algum tempo).

Os binários do Graphviz podem estar em /usr/local/bin ou /opt/local/bin/dot. FreeCAD pode encontrar automaticamente o programa Graphviz com a caixa de diálogo de arquivo que surge de Ferramentas → gráfico de dependência ..., se não digite este comando:

type dot

Ele produzirá algo como:

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.