Widok drzewa

From FreeCAD Documentation
Revision as of 08:50, 8 December 2019 by Kaktus (talk | contribs) (Created page with "Po utworzeniu nowego dokumentu aktywne stają się następujące elementy: *{{MenuCommand|Expression actions}}: Kopiuj aktywny dokument, Std_Expressions|...")

Wprowadzenie

widok drzewa pojawia się w zakładce Model w widoku połączonym; pokazuje wszystkie obiekty zdefiniowane przez użytkownika, które są częścią dokumentu FreeCAD. Widok drzewa jest reprezentacją struktury dokumentu i wskazuje, jakie informacje są zapisane na dysku.

Obiekty te niekoniecznie muszą być kształtami geometrycznymi widocznymi w oknie widoku 3D, ale mogą również zawierać obiekty danych utworzone za pomocą dowolnego Środowiska pracy.

Widok drzewa pokazujący różne elementy w dokumencie.

Praca z widokiem drzewa

Domyślnie, zawsze gdy tworzony jest nowy obiekt, jest on dodawany na końcu listy w widoku drzewa. Widok drzewa umożliwia zarządzanie obiektami w celu utrzymania ich w zorganizowanym szyku.
Pozwala na tworzenie group, przesuwanie obiektów wewnątrz grup, przesuwanie grup wewnątrz innych grup, zmianę nazwy obiektów, kopiowanie obiektów, usuwanie obiektów i inne operacje w menu kontekstowym, które również zależą od aktualnie aktywnego Środowiska pracy.

Wiele operacji tworzy obiekty, które są zależne od wcześniej utworzonego obiektu. W tym przypadku widok drzewa pokazuje tę zależność poprzez pochłanianie starszego obiektu wewnątrz nowego obiektu. Rozwijanie i zwijanie obiektów w widoku drzewa pokazuje parametryczną historię tego obiektu. Obiekty głębiej położone wewnątrz innych są starsze, natomiast obiekty znajdujące się na zewnątrz są nowsze i pochodzą od obiektów starszych. Modyfikując obiekty wewnętrzne, operacje parametryczne rozprzestrzeniają się aż do góry, generując nowy wynik.

Najwyższy z obiektów jest tworzony przez wykonywanie operacji parametrycznych na obiektach, które same zostały utworzone przez poprzednie operacje. Rozwinięcie drzewa na wielu poziomach ujawnia oryginalne elementy, które zostały użyte do utworzenia brył cząstkowych.

Działania

Note: wyrażenia i akcje związane z linkami zostały dodane w wersji 0.19.

Ponieważ widok drzewa zawiera listę obiektów, które mogą być widoczne w oknie widoku 3D, wiele z tych działań jest takich samych jak te, które mogą być wykonane bezpośrednio z widoku 3D.

Po uruchomieniu aplikacji domyślnym Środowiskiem pracy jest Start jest aktywny i nie stworzono żadnego dokumentu, a kliknięcie prawym przyciskiem myszy na widok drzewa pokazuje tylko jedno polecenie:

Po utworzeniu nowego dokumentu aktywne stają się następujące elementy:

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 WIDOKSelectable 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 WIDOKShape 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