Tree view/fr: Difference between revisions

From FreeCAD Documentation
(Created page with "Tree view")
 
(Updating to match new version of source page)
Line 13: Line 13:
== Working with the tree view ==
== Working with the tree view ==


By default, whenever a new object is created, it is added to the end of the list in the tree view. Then, the tree view allows managing the objects to keep them organized; it permits creating [[Std Group|groups]], moving objects inside groups, moving groups inside other groups, renaming objects, copying objects, deleting objects, and other operations in the contextual menu which also depends on the currently active workbench.
By default, whenever a new object is created, it is added to the end of the list in the tree view. The tree view allows managing the objects to keep them organized; it permits creating [[Std Group|groups]], moving objects inside groups, moving groups inside other groups, renaming objects, copying objects, deleting objects, and other operations in the contextual menu which also depends on the currently active workbench.


Many operations create objects that are dependent on a previously existing object. In this case, the tree view shows this relationship by absorbing the older object inside the new object. Expanding and collapsing the objects in the tree view shows the parametric history of that object. Objects that are deeper inside others are older, while objects that are outside are newer, and are derived from the older objects. By modifying the interior objects, the parametric operations propagate all the way to the top, generating a new result.
Many operations create objects that are dependent on a previously existing object. In this case, the tree view shows this relationship by absorbing the older object inside the new object. Expanding and collapsing the objects in the tree view shows the parametric history of that object. Objects that are deeper inside others are older, while objects that are outside are newer, and are derived from the older objects. By modifying the interior objects, the parametric operations propagate all the way to the top, generating a new result.
Line 25: Line 25:
== Actions ==
== Actions ==


{{Emphasis|Note:}} expressions and link actions were added in version 0.19.
Right clicking on the [[tree view|tree view]] shows commands:


Since the tree view lists objects that may be visible in the [[3D view|3D view]], many of the actions are the same to those that can be executed from the [[3D view|3D view]].

When the application starts, the default [[Start Workbench|Start Workbench]] is active, and no document has been created, right clicking on the [[tree view|tree view]] shows only one command:
* {{MenuCommand|Expression actions}}: [[Std_Expressions|Copy selected]], [[Std_Expressions|Copy active document]], [[Std_Expressions|Copy all documents]], Paste. These allow working with various documents, but are disabled if no document is present.

Once a new document has been created the following become active:
* {{MenuCommand|Expression actions}}: [[Std_Expressions|Copy active document]], [[Std_Expressions|Copy all documents]].

In addition, [[Std LinkMake|Link]] actions are available.
* {{MenuCommand|Link actions}}: [[Std LinkMake|Make Link]].
** {{MenuCommand|Make Link group}}: [[Std_LinkMakeGroup|Simple group]], [[Std_LinkMakeGroup|Group with links]], [[Std_LinkMakeGroup|Group with transform links]].

=== Selecting the document ===

If you select the active document and right click, in addition to {{MenuCommand|Expression actions}} and {{MenuCommand|Link actions}}, the following commands appear:
* {{MenuCommand|Show hidden items}}: if active, the tree view will show hidden items.
* {{MenuCommand|Search}}: shows an input field to search objects inside the selected document.
* {{MenuCommand|Close document}}: closes the selected document by calling the application's {{incode|closeDocument()}} method.
* {{MenuCommand|Skip recomputes}}: if active, the document's objects will not [[recompute|recompute]] automatically.
** {{MenuCommand|Allow partial recomputes}}: if active, the document will allow [[recompute|recompute]] of only some objects.
* {{MenuCommand|Mark to recompute}}: marks all objects of the document as touched, and ready for [[recompute|recompute]].
* {{MenuCommand|[[Std_Group|Create group]]}}: creates a [[Std_Group|group]] in the selected document by using the document's {{incode|addObject()}} method.

=== Selecting objects ===

Once objects are added to the document then in addition to the previous actions, right clicking on an empty part of the tree view will show additional commands; these depend on the type of object and the active workbench.

For example, with the [[Draft Workbench|Draft Workbench]] active, first select an object, then right click on an empty place in the tree view:
* {{MenuCommand|[[Std_ToggleVisibility|Toggle visibility]]}}: makes the object visible or invisible in the [[3D view|3D view]].
* {{MenuCommand|[[Std_ShowSelection|Show selection]]}}: makes the selected objects visible.
* {{MenuCommand|[[Std_HideSelection|Hide selection]]}}: makes the selected objects invisible.
* {{MenuCommand|[[Std_ToggleSelectability|Toggle selectability]]}}: makes the object no longer selectable in the [[3D view|3D view]]; use again this command to cancel its effect. It sets the object's {{incode|Selectable}} attribute to {{TRUE}} or {{FALSE}}. Change the property by toggling {{PropertyView|Selectable}} in the [[property editor|property editor]].
* {{MenuCommand|[[Std_TreeSelectAllInstances|Select all instances]]}}: selects all instances of this object in the tree view.
* {{MenuCommand|[[Std_SetAppearance|Appearance]]}}: launches the dialog to change color and sizes of lines and vertices, and color of faces.
* {{MenuCommand|[[Std_RandomColor|Random color]]}}: assigns a random color to the object. It sets the object's {{incode|ShapeColor}} attribute to a tuple {{incode|(r,g,b)}} with tree random floats between 0 and 1. Change the property by modifying {{PropertyView|Shape Color}} in the [[property editor|property editor]].
* {{MenuCommand|[[Std_Cut|Cut]]}}: disabled if the right-click is not on the object.
* {{MenuCommand|[[Std_Copy|Copy]]}}: copies an object into memory.
* {{MenuCommand|[[Std_Paste|Paste]]}}: pastes the copied object into the document; the copy is added to the end of the tree view.
* {{MenuCommand|[[Std_Delete|Delete]]}}: removes the object from the document, and from the tree view, by calling the document's {{incode|removeObject()}} method.
* {{MenuCommand|Utilities}}: {{Emphasis|(optional)}} additional contextual commands provided by the [[Draft Workbench|Draft Workbench]].

If an object is selected, for example, a [[Draft Line|Draft Line]], and a right click is made in the same object additional commands may be available:
* {{MenuCommand|Transform}}: launches the transform widget to move or rotate the object.
* {{MenuCommand|Set colors}}: sets the colors of the object.
* {{MenuCommand|Flatten this wire}}: {{Emphasis|(Draft)}} specific command for a [[Draft Line|Draft Line]].
* {{MenuCommand|Hide item}}: if active, the selected object will be set as hidden.
* {{MenuCommand|Mark to recompute}}: marks the selected object as touched, and ready for [[recompute|recompute]].
* {{MenuCommand|Recompute}}: recomputes the selected object.
* {{MenuCommand|Rename}}: starts editing the name of the selected object. This allows changing the {{incode|Label}} attribute, but not the {{incode|Name}} attribute, as the latter is read-only.


{{Interface}}
{{Interface}}

Revision as of 10:30, 27 September 2019

Introduction

The tree view appears in the Model tab of the combo view; it shows all user defined objects that are part of a FreeCAD document. The tree view is a representation of the document's structure, and indicates what information is saved to disk.

These objects don't necessarily have to be geometrical shapes visible in the 3D view, but can also be supporting data objects created with any of the workbenches.

The tree view showing various elements in the document.

Working with the tree view

By default, whenever a new object is created, it is added to the end of the list in the tree view. The tree view allows managing the objects to keep them organized; it permits creating groups, moving objects inside groups, moving groups inside other groups, renaming objects, copying objects, deleting objects, and other operations in the contextual menu which also depends on the currently active workbench.

Many operations create objects that are dependent on a previously existing object. In this case, the tree view shows this relationship by absorbing the older object inside the new object. Expanding and collapsing the objects in the tree view shows the parametric history of that object. Objects that are deeper inside others are older, while objects that are outside are newer, and are derived from the older objects. By modifying the interior objects, the parametric operations propagate all the way to the top, generating a new result.

The topmost object is created by doing parametric operations on objects which themselves were created by previous operations. Expanding the tree many levels reveals the original elements that were used to create the partial solids.

Actions

Note: expressions and link actions were added in version 0.19.

Since the tree view lists objects that may be visible in the 3D view, many of the actions are the same to those that can be executed from the 3D view.

When the application starts, the default Start Workbench is active, and no document has been created, right clicking on the tree view shows only one command:

Once a new document has been created the following become active:

In addition, Link actions are available.

Selecting the document

If you select the active document and right click, in addition to Expression actions and Link actions, the following commands appear:

  • Show hidden items: if active, the tree view will show hidden items.
  • Search: shows an input field to search objects inside the selected document.
  • Close document: closes the selected document by calling the application's closeDocument() method.
  • Skip recomputes: if active, the document's objects will not recompute automatically.
    • Allow partial recomputes: if active, the document will allow recompute of only some objects.
  • Mark to recompute: marks all objects of the document as touched, and ready for recompute.
  • Create group: creates a group in the selected document by using the document's addObject() method.

Selecting objects

Once objects are added to the document then in addition to the previous actions, right clicking on an empty part of the tree view will show additional commands; these depend on the type of object and the active workbench.

For example, with the Draft Workbench active, first select an object, then right click on an empty place in the tree view:

  • Toggle visibility: makes the object visible or invisible in the 3D view.
  • Show selection: makes the selected objects visible.
  • Hide selection: makes the selected objects invisible.
  • Toggle selectability: makes the object no longer selectable in the 3D view; use again this command to cancel its effect. It sets the object's Selectable attribute to true or false. Change the property by toggling VueSelectable in the property editor.
  • Select all instances: selects all instances of this object in the tree view.
  • Appearance: launches the dialog to change color and sizes of lines and vertices, and color of faces.
  • Random color: assigns a random color to the object. It sets the object's ShapeColor attribute to a tuple (r,g,b) with tree random floats between 0 and 1. Change the property by modifying VueShape Color in the property editor.
  • Cut: disabled if the right-click is not on the object.
  • Copy: copies an object into memory.
  • Paste: pastes the copied object into the document; the copy is added to the end of the tree view.
  • Delete: removes the object from the document, and from the tree view, by calling the document's removeObject() method.
  • Utilities: (optional) additional contextual commands provided by the Draft Workbench.

If an object is selected, for example, a Draft Line, and a right click is made in the same object additional commands may be available:

  • Transform: launches the transform widget to move or rotate the object.
  • Set colors: sets the colors of the object.
  • Flatten this wire: (Draft) specific command for a Draft Line.
  • Hide item: if active, the selected object will be set as hidden.
  • Mark to recompute: marks the selected object as touched, and ready for recompute.
  • Recompute: recomputes the selected object.
  • Rename: starts editing the name of the selected object. This allows changing the Label attribute, but not the Name attribute, as the latter is read-only.

Template:Interface