Draft AutoGroup/ro: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages/>
<languages/>

{{Docnav
{{Docnav
|[[Draft_ToggleConstructionMode|ToggleConstructionMode]]
|[[Draft Slope|Slope]]
|[[Draft_Snap_Lock|Snap Lock]]
|[[Draft SetWorkingPlaneProxy|Set Working Plane Proxy]]
|[[Draft_Module|Draft]]
|[[Draft_Workbench|Draft]]
|IconL=Draft_Slope.svg
|IconL=Draft_ToggleConstructionMode.svg
|IconR=Draft_Snap_Lock.svg
|IconC=Workbench_Draft.svg
|IconC=Workbench_Draft.svg
|IconR=Draft_SetWorkingPlaneProxy.png
}}
}}


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
{{GuiCommand|Name=Draft AutoGroup|Workbenches=[[Draft Module|Draft]], [[Arch Module|Arch]]|MenuLocation=Draft → Utilities → AutoGroup|SeeAlso=}}
{{GuiCommand|Name=Draft AutoGroup|Workbenches=[[Draft Workbench|Draft]], [[Arch Workbench|Arch]]|MenuLocation=Draft → Utilities → AutoGroup|SeeAlso=}}
</div>
</div>


Line 17: Line 18:
<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
== Descriere ==
== Descriere ==
Acest instrument permite setarea unui grup sau derivat ca [[Proiect VisGroup | Proiect VisGroup]], [[Arch Site]], [[Arch Building]] sau [[Floor Arch | Arch Floor]] , ca grup activ automat. Când este setat un grup auto, toate obiectele noi create în [[Draft Workbench | Draft Workbench]] sau [[Arch Workbench | Arch Workbench]] vor fi plasate în acel grup.
Acest instrument permite setarea unui grup sau derivat ca [[Draft_Layer/ro | Proiect VisGroup]], [[Arch Site]], [[Arch Building]] sau [[Arch Floor | Arch Floor]] , ca grup activ automat. Când este setat un grup auto, toate obiectele noi create în [[Draft Workbench | Draft Workbench]] sau [[Arch Workbench | Arch Workbench]] vor fi plasate în acel grup.
</div>
</div>


This command was originally intended for groups, hence its name, but was redesigned in FreeCAD version 0.19 when a layer system was introduced. Because handling layers is now the default for the command the rest of this page will primarily focus on layers.
Auto-grouping works with elements created with the [[Draft Workbench|Draft]] and [[Arch Workbench|Arch Workbenches]].


[[Image:Draft_AutoGroup_example.png]]
[[Image:Draft_tray_menu.png]]
{{Caption|The layer menu of the Draft Tray}}
{{Caption|Draft Tray which sets the active auto-group by clicking on the folder icon and choosing a group}}


==Usage==
==Usage==


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 32: Line 33:
# Alegeți grupul dorit din caseta drop-down contextuală
# Alegeți grupul dorit din caseta drop-down contextuală
</div>
</div>

==Notes==


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 39: Line 42:
</div>
</div>


==Preferences==

See also: [[Preferences_Editor|Preferences Editor]] and [[Draft_Preferences|Draft Preferences]].

* This command can optionally also handle groups: {{MenuCommand|Edit → Preferences... → Draft → General → Include groups in layer list}}.

<span id="Scripting"></span>
== Scrip-Programare ==
== Scrip-Programare ==


{{Emphasis|See also:}} [[Draft API|Draft API]] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]].
See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
În script-urile python, folosirea Draft de auto-grupare se face pur și simplu cu comanda de mai jos:
În script-urile python, folosirea Draft de auto-grupare se face pur și simplu cu comanda de mai jos:
</div>
</div>
{{Code|code=
autogroup(obj)
}}
* Puts the {{incode|obj}} element in the current auto-group.
* If auto-grouping is disabled (the group is {{incode|None}}), or if [[Draft_ToggleConstructionMode|Construction mode]] is active, or if {{incode|obj}} is already in the auto-group, the function doesn't do anything.
* The function will fail if {{incode|obj}} is already in another group that is different from the auto-group.
* The function only does something if the graphical interface is active, as the auto-group can only be chosen from the graphical interface.


Example:
{{Code|code=
{{Code|code=
# This code only works if the Draft Workbench is active!
import FreeCAD, Draft


import FreeCAD as App
Polygon1 = Draft.makePolygon(3, 500)
import FreeCADGui as Gui
Polygon2 = Draft.makePolygon(3, 1000)
import Draft
Polygon3 = Draft.makePolygon(5, 1500)


doc = App.newDocument()
FreeCAD.ActiveDocument.addObject("App::DocumentObjectGroup", "Group")


polygon1 = Draft.make_polygon(5, radius=1000)
# Use the graphical interface to set "Group" for auto-grouping
polygon2 = Draft.make_polygon(3, radius=500)
polygon3 = Draft.make_polygon(6, radius=220)


Draft.autogroup(Polygon1)
layer = Draft.make_layer()
Gui.draftToolBar.setAutoGroup(layer.Name)
Draft.autogroup(Polygon2)

Draft.autogroup(Polygon3)
Draft.autogroup(polygon1)
Draft.autogroup(polygon2)
Draft.autogroup(polygon3)

doc.recompute()
}}
}}



{{Docnav
{{Docnav
|[[Draft_ToggleConstructionMode|ToggleConstructionMode]]
|[[Draft Slope|Slope]]
|[[Draft_Snap_Lock|Snap Lock]]
|[[Draft SetWorkingPlaneProxy|Set Working Plane Proxy]]
|[[Draft_Module|Draft]]
|[[Draft_Workbench|Draft]]
|IconL=Draft_Slope.svg
|IconL=Draft_ToggleConstructionMode.svg
|IconR=Draft_Snap_Lock.svg
|IconC=Workbench_Draft.svg
|IconC=Workbench_Draft.svg
|IconR=Draft_SetWorkingPlaneProxy.png
}}
}}


{{Draft Tools navi{{#translation:}}}}
{{Draft Tools navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{clear}}

Latest revision as of 19:58, 7 December 2023

Draft AutoGroup

Menu location
Draft → Utilities → AutoGroup
Workbenches
Draft, Arch
Default shortcut
None
Introduced in version
-
See also
None

Description

Descriere

Acest instrument permite setarea unui grup sau derivat ca Proiect VisGroup, Arch Site, Arch Building sau Arch Floor , ca grup activ automat. Când este setat un grup auto, toate obiectele noi create în Draft Workbench sau Arch Workbench vor fi plasate în acel grup.

This command was originally intended for groups, hence its name, but was redesigned in FreeCAD version 0.19 when a layer system was introduced. Because handling layers is now the default for the command the rest of this page will primarily focus on layers.

The layer menu of the Draft Tray

Usage

Cum se folosește

  1. Selectați meniul Schiță → Utilități → AutoGroup sau faceți clic pe butonul de autogrupare din bara de instrumente sau faceți clic cu butonul din dreapta pe un obiect Group în vizualizarea arborescentă → Utilitare → AutoGroup
  2. Alegeți grupul dorit din caseta drop-down contextuală

Notes

  • Când setarea AutoGroup este setată, butonul devine verde, înseamnă că este activată gruparea automată. Puteți să faceți clic pe acesta pentru a schimba grupul sau a dezactiva.
  • Când gruparea automată este activă, orice nou obiect Draft sau Arch creat va fi plasat în acel grup (cu excepția cazului în care Modul de construcție a proiectului este activat, caz în care acesta merge la grupul de construcție).
  • Aceasta funcționează numai atunci când creați obiecte de tip Proiect sau Arch din butoanele GUI. Nu când le folosiți din Python. Acest lucru este posibil, astfel încât scripturile Python să poată face gruparea pe care o doresc, indiferent de ce autogrupează.

Preferences

See also: Preferences Editor and Draft Preferences.

  • This command can optionally also handle groups: Edit → Preferences... → Draft → General → Include groups in layer list.

Scrip-Programare

See also: Autogenerated API documentation and FreeCAD Scripting Basics.

În script-urile python, folosirea Draft de auto-grupare se face pur și simplu cu comanda de mai jos:

# This code only works if the Draft Workbench is active!

import FreeCAD as App
import FreeCADGui as Gui
import Draft

doc = App.newDocument()

polygon1 = Draft.make_polygon(5, radius=1000)
polygon2 = Draft.make_polygon(3, radius=500)
polygon3 = Draft.make_polygon(6, radius=220)

layer = Draft.make_layer()
Gui.draftToolBar.setAutoGroup(layer.Name)

Draft.autogroup(polygon1)
Draft.autogroup(polygon2)
Draft.autogroup(polygon3)

doc.recompute()