Grupo automático
|
Draft AutoGroup |
| Menu location |
|---|
| None |
| Workbenches |
| Draft, BIM |
| Default shortcut |
| None |
| Introduced in version |
| 0.17 |
| See also |
| Draft Layer, Std Group |
Descrição
The Draft AutoGroup command changes the active Draft Layer or, optionally, the active Std Group or group-like BIM object. New Draft and BIM objects are automatically placed in this active layer or group.
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 primarily focuses on layers.
The layer menu of the Draft Tray (image updated for version 1.1)
Utilização
- Optionally select the layer you want to make active in the Tree View.
- 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 line and face color of the layer. - If you have selected a layer: select the
Activate Layer option from the Tree View context menu.
- Press the
- 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
New Layer to create a new layer:
- The New Layer dialog box opens. introduced in 1.1
- Enter a Layer name.
- Press the OK button.
- The new layer is activated. introduced in 1.1
- Select
- If the active layer was changed the button in the Draft Tray is updated.
Notas
- 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.
Preferências
See also: Preferences Editor and Draft Preferences.
- This command can optionally also handle groups: Edit → Preferences → Draft → General → Include groups in layer list.
Scripting
See also: Autogenerated API documentation and FreeCAD Scripting Basics.
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()
- Drafting: Line, Polyline, Fillet, Arc, Arc From 3 Points, Circle, Ellipse, Rectangle, Polygon, B-Spline, Cubic Bézier Curve, Bézier Curve, Point, Facebinder, ShapeString, Hatch
- Annotation: Text, Dimension, Label, Annotation Styles, Annotation Scale
- Modification: Move, Rotate, Scale, Mirror, Offset, Trimex, Stretch, Clone, Array, Polar Array, Circular Array, Path Array, Path Link Array, Point Array, Point Link Array, Edit, Highlight Subelements, Join, Split, Upgrade, Downgrade, Convert Wire/B-Spline, Draft to Sketch, Set Slope, Flip Dimension, Shape 2D View
- Draft Tray: Working Plane, Set Style, Toggle Construction Mode, AutoGroup
- Snapping: Snap Lock, Snap Endpoint, Snap Midpoint, Snap Center, Snap Angle, Snap Intersection, Snap Perpendicular, Snap Extension, Snap Parallel, Snap Special, Snap Near, Snap Ortho, Snap Grid, Snap Working Plane, Snap Dimensions, Toggle Grid
- Miscellaneous: Apply Current Style, New Layer, Manage Layers, New Named Group, SelectGroup, Add to Layer, Add to Group, Add to Construction Group, Toggle Wireframe, Working Plane Proxy, Heal, Show Snap Toolbar
- Additional: Constraining, Pattern, Preferences, Import Export Preferences, DXF/DWG, SVG, OCA, DAT
- Context menu:
- Most objects: Edit
- Layer container: Add New Layer, Reassign Properties of All Layers, Merge Layer Duplicates
- Layer: Activate Layer, Reassign Properties of Layer, Select Layer Contents
- Text and label: Open Links
- Wire: Flatten
- Working plane proxy: Save Camera Position, Save Visibility of Objects
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Assembly, BIM, CAM, Draft, FEM, Inspection, Material, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework
- Hubs: User hub, Power users hub, Developer hub
