Draft AutoGroup/de: Difference between revisions

From FreeCAD Documentation
(Created page with "{{GuiCommand |Name=Draft AutoGroup |MenuLocation=Draft → Utilities → AutoGroup |Workbenches=Draft, Arch |SeeAlso=Std Group,...")
No edit summary
 
(28 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<languages/>
<languages/>

{{Docnav
{{Docnav/de
|[[Draft Slope|Hang]]
|[[Draft_ToggleConstructionMode/de|KonstruktionsmodusUmschalten]]
|[[Draft SetWorkingPlaneProxy|Arbeitsebenen-Proxy festlegen]]
|[[Draft_Snap_Lock/de|EinrastenSperren]]
|[[Draft_Module|Entwurf]]
|[[Draft_Workbench/de|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.svg
}}
}}


{{GuiCommand
{{GuiCommand/de
|Name=Draft AutoGroup
|Name=Draft AutoGroup
|Name/de=Draft AutoGruppieren
|MenuLocation=Draft → Utilities → AutoGroup
|Empty=1
|Workbenches=[[Draft Module|Draft]], [[Arch Module|Arch]]
|Workbenches=[[Draft_Workbench/de|Draft]], [[Arch_Workbench/de|Arch]]
|SeeAlso=[[Std Group|Std Group]], [[Draft VisGroup|Entwurf VisGroup]]
|Version=0.17
|Version=0.17
|SeeAlso=[[Draft_Layer/de|Draft Layer]], [[Std_Group/de|Std Gruppe]]
}}
}}


<span id="Description"></span>
== Beschreibung ==
== Beschreibung ==


Der Befehl '''Draft AutoGruppieren''' ändert den aktiven [[Draft_Layer/de|Draft-Layer]] oder [[#Einstellungen|wahlweise]] die aktive [[Std_Group/de|Std Gruppe]] bzw. gruppenartige [[Arch_Workbench/de|Arch]]-Objekte. Neue [[Draft_Workbench/de|Draft-]] und [[Arch_Workbench/de|Arch]]-Objekte werden automatisch auf diesem Layer bzw. in dieser Gruppe eingefügt.
Das Werkzeug "Autogruppe" legt eine ausgewählte [[Std Group|Std Gruppe]] oder ein verwandtes Element wie [[Draft VisGroup|Entwurf VisGruppe]], [[Arch Site|Archbauwerk]], [[Arch Building|Archbau]] oder [[Arch BuildingPart|Archbauteil]] als aktive Autogruppe fest. Wenn eine Autogruppe festgelegt ist, werden neue Objekte beim Erstellen automatisch in die angegebene Gruppe verschoben.


Dieser Befehl war ursprünglich für Gruppen gedacht, daher sein Name, wurde aber in FreeCAD-Version 0.19 überarbeitet als ein Layer-System eingeführt wurde. Da der Umgang mit Layern jetzt die Standardaufgabe des Befehls ist, liegt der Fokus dieser Seite im folgenden haupfsächlich auf Layern.
Die automatische Gruppierung funktioniert mit Elementen, die mit der [[Draft Workbench|Entwurf]] und [[Arch Workbench|Arch Arbeitsbereiche]] erstellt wurden.


[[Image:Draft_AutoGroup_example.png]]
[[Image:Draft_tray_menu.png]]
{{Caption|Das Layer-Menü im Draft-Tray}}
{{Caption|Entwurfskassette, die die aktive Autogruppe durch Klicken auf das Ordnersymbol und Auswahl einer Gruppe einstellt}}


<span id="Usage"></span>
==Anwendung==
==Anwendung==


# Optionally select the layer you want to make active in the [[Tree_view|Tree view]].
# Select a {{Button|[[Image:Group.svg|16px]] [[Std Group|Std Group]]}}, {{Button|[[Image:Group.svg|16px]] [[Draft_ToggleConstructionMode|Construction group]]}}, or {{Button|[[Image:Draft_VisGroup.svg|16px]] [[Draft VisGroup|Draft VisGroup]]}} in the tree view.
# There are several ways to invoke the command:
# Press the {{Button|[[Image:Draft AutoGroup_off.svg|16px]] None}} button, or go to the menu {{MenuCommand|Draft → Utilities → [[Image:Draft AutoGroup.svg|16px]] [[Draft AutoGroup|AutoGroup]]}}. If no group is selected, a drop-down menu will display eligible groups to use, or "None".
#* Press the [[Image:Draft_tray_button_layer.png]] button in the [[Draft_Tray|Draft Tray]]. This button can look different. If there is an active layer it will show the name of the layer and a layer icon with the {{PropertyView|Line Color}} and {{PropertyView|Shape Color}} of the layer.
# The button will change with the name of the active auto-group, for example, {{Button|[[Image:Draft AutoGroup_on.svg|16px]] Group}}.
#* If you have selected a layer: select the {{MenuCommand|[[Image:button_right.svg|16px]] Activate this layer}} option from the [[Tree_view|Tree view]] context menu.
# If you have not yet selected a layer the layer menu opens. Do one of the following:
#* Select {{MenuCommand|None}} to work without an active layer.
#* Select an existing layer to make active.
#* Select {{MenuCommand|Add new Layer}} to create a new layer. Selecting this option will not change the active layer.
# If the active layer was changed the button in the [[Draft_Tray|Draft Tray]] is updated.


Notes:
==Notes==
* The {{Button|[[Image:Draft AutoGroup.svg|16px]] [[Draft AutoGroup|AutoGroup]]}} button is present in the [[Draft Tray|Draft Tray]] toolbar, which only appears in the [[Draft Workbench|Draft]] and [[Arch Workbench|Arch Workbench]]es.
* At least one of {{Button|[[Image:Group.svg|16px]] [[Std Group|Std Group]]}}, {{Button|[[Image:Group.svg|16px]] [[Draft_ToggleConstructionMode|Construction group]]}}, or {{Button|[[Image:Draft_VisGroup.svg|16px]] [[Draft VisGroup|Draft VisGroup]]}} must exist before using this tool.
* To change the auto-group, select another group in the tree view and click {{Button|[[Image:Draft AutoGroup_on.svg|16px]] Group}}. If no group is selected you have the option of choosing "None" to turn off auto-grouping.
* When auto-grouping is active, new [[Draft Workbench|Draft]] and [[Arch Workbench|Arch]] objects will be placed in that group except when {{Button|[[Image:Draft Construction.svg|16px]] [[Draft_ToggleConstructionMode|Construction mode]]}} is on, in which case the new geometry will be placed in the Construction group.
* Auto-grouping only works for objects created from the graphical user interface; objects created programmatically by [[macros|macros]] or the [[Python|Python]] console aren't automatically placed in groups. The user always has the possibility of programmatically doing the grouping, regardless of the auto-grouping settings.


* A new [[Draft_Layer|layer]] can also be created by right-clicking the layer container in the [[Tree_view|Tree view]] and selecting the {{MenuCommand|[[Image:Draft_NewLayer.svg|16px]] Add new layer}} option from the context menu.
* If [[Draft_ToggleConstructionMode|Draft construction mode]] is switched on the active [[Draft_Layer|layer]] is ignored.

<span id="Preferences"></span>
==Einstellungen==

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>
== Skripten ==
== Skripten ==


Siehe auch: [https://freecad.github.io/SourceDoc/ Autogenerierte API-Dokumentation] und [[FreeCAD_Scripting_Basics/de|FreeCAD Grundlagen Skripten]].
{{Emphasis|See also:}} [[Draft API|Draft API]] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]].


If the [[Draft_Workbench|Draft Workbench]] is active the FreeCADGui application object has a {{incode|draftToolBar}} property. This {{incode|draftToolBar}} object has an {{incode|autogroup}} property, which contains the name of the active autogroup, or is {{incode|None}} if no autogroup is active. To change the active autogroup use the {{incode|setAutoGroup}} method of the {{incode|draftToolBar}} object. To put objects in the active autogroup use the {{incode|autogroup}} method of the Draft module.
Adding objects to the active auto-group can be done in [[macros|macros]] and from the [[Python|Python]] console by using the following function:
{{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.


Beispiel:
{{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/de
|[[Draft Slope|Slope]]
|[[Draft_ToggleConstructionMode/de|KonstruktionsmodusUmschalten]]
|[[Draft SetWorkingPlaneProxy|Set Working Plane Proxy]]
|[[Draft_Snap_Lock/de|EinrastenSperren]]
|[[Draft_Module|Draft]]
|[[Draft_Workbench/de|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.svg
}}
}}


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

Latest revision as of 12:39, 22 December 2023

Draft AutoGruppieren

Menüeintrag
Keiner
Arbeitsbereich
Draft, Arch
Standardtastenkürzel
Keiner
Eingeführt in Version
0.17
Siehe auch
Draft Layer, Std Gruppe

Beschreibung

Der Befehl Draft AutoGruppieren ändert den aktiven Draft-Layer oder wahlweise die aktive Std Gruppe bzw. gruppenartige Arch-Objekte. Neue Draft- und Arch-Objekte werden automatisch auf diesem Layer bzw. in dieser Gruppe eingefügt.

Dieser Befehl war ursprünglich für Gruppen gedacht, daher sein Name, wurde aber in FreeCAD-Version 0.19 überarbeitet als ein Layer-System eingeführt wurde. Da der Umgang mit Layern jetzt die Standardaufgabe des Befehls ist, liegt der Fokus dieser Seite im folgenden haupfsächlich auf Layern.

Das Layer-Menü im Draft-Tray

Anwendung

  1. Optionally select the layer you want to make active in the Tree view.
  2. There are several ways to invoke the command:
    • Press the button in the Draft Tray. This button can look different. If there is an active layer it will show the name of the layer and a layer icon with the AnsichtLine Color and AnsichtShape Color of the layer.
    • If you have selected a layer: select the Activate this layer option from the Tree view context menu.
  3. If you have not yet selected a layer the layer menu opens. Do one of the following:
    • Select None to work without an active layer.
    • Select an existing layer to make active.
    • Select Add new Layer to create a new layer. Selecting this option will not change the active layer.
  4. If the active layer was changed the button in the Draft Tray is updated.

Notes

  • A new layer can also be created by right-clicking the layer container in the Tree view and selecting the Add new layer option from the context menu.
  • If Draft construction mode is switched on the active layer is ignored.

Einstellungen

See also: Preferences Editor and Draft Preferences.

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

Skripten

Siehe auch: Autogenerierte API-Dokumentation und FreeCAD Grundlagen Skripten.

If the Draft Workbench is active the FreeCADGui application object has a draftToolBar property. This draftToolBar object has an autogroup property, which contains the name of the active autogroup, or is None if no autogroup is active. To change the active autogroup use the setAutoGroup method of the draftToolBar object. To put objects in the active autogroup use the autogroup method of the Draft module.

# 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()