Metodi di selezione

From FreeCAD Documentation
Revision as of 20:18, 1 May 2020 by Renatorivo (talk | contribs)

Presentazione

I metodi di selezione in FreeCAD consentono di selezionare gli oggetti nell'interfaccia di FreeCAD: ad esempio nella vista 3D, nella struttura ad albero, nella vista selezione, e tramite altri dialoghi. Alcuni metodi di selezione sono specifici di un particolare ambiente e sono documentati nella documentazione specifica di tale ambiente.

Vista 3D

Nella Vista 3D ci sono vari modi per selezionare gli oggetti usando il puntatore del mouse.

Selezione semplice

La selezione semplice con il mouse (per impostazione predefinita clic sinistro) e la preselezione (passaggio del mouse) sono descritte nella pagina navigazione del mouse.

Clic ripetuti

Il primo clic seleziona un sottoelemento (vertice, bordo o faccia) dell'oggetto sotto il mouse. Un secondo clic seleziona l'intero oggetto. disponibile dalla versione 0.18

Il terzo clic estende la selezione al suo oggetto contenitore (Corpo di PartDesign, Std Part e altri). Ulteriori clic espandono la selezione nella catena del contenitore. disponibile dalla versione 0.19

Comandi di selezione

La selezione tramite il trascinamento del mouse per selezionare più oggetti o sotto-elementi (vertici o facce) è disponibile usando i comandi Seleziona tutto, Box di selezione, Box di selezione di Part e Seleziona elementi.

The Box selection modes revert to the default Std SelectAll, after any selection. (What does this mean??)

Vista selezione

La vista selezione mostra i nomi degli oggetti selezionati, incluso il loro nome completo all'interno di un oggetto, ad esempio, Unnamed#Body.Box001.Face17.

Permette anche di eseguire alcune azioni come visualizzare la selezione, e di inviare l'oggetto alla console Python.

Object export

This should be in the selection view page.

Select any complex object, for example, a PartDesign Body or Std Part, then in the selection view select again the object, and then press Ctrl + C in the keyboard to open the Object selection dialog. This allows copying the selected object together with all or only some of that object's dependency objects. For example, for a Std Part the possible objects to select include the Std Part itself, but also its Origin, its three base axes (XYZ), and its three base planes (XY, YZ, XZ).

After pressing OK, the selected objects are copied into memory, and then can be pasted in the document to duplicate these objects only.

Object selection dialog that is launched from the selection view.

Tree view

In the tree view items can be selected, or deselected, one at a time, by holding the Ctrl key and clicking with the mouse.

A range of items can be selected by clicking on the first item, holding Shift, and clicking on the last item.

Selecting a single item will also show its properties in the property editor.

Double clicking will open any associated task panel containing actions. Make sure to close this task panel before executing another command or switching to any other workbench.

More methods are available by opening the context menu (right-click), depending on the object selected or the active workbench; see the information in tree view.

Scripting

Selecting objects is inherently a graphical task and therefore it is only available when the graphical user interface is loaded.

These commands can be used in macros or from the Python console.

import FreeCADGui as Gui

Gui.Selection.addSelection
Gui.Selection.addSelectionGate
Gui.Selection.Filter

The command addSelectionGate restricts the user from selecting objects not specified in the selection string. A symbol appears when the pointer is over an item not in the specified group.

Gui.Selection.addSelectionGate("SELECT Part::Feature SUBELEMENT Edge")

See the Source documentation and Std PythonHelp for more help on using these tools.