|
|
| Ubicación en el Menú |
|---|
| Tree View → Right click on the document name |
| Entornos de trabajo |
| All |
| Atajo de teclado por defecto |
| Ninguno |
| Introducido en versión |
| - |
| Ver también |
| Draft SelectGroup, Draft AddToGroup |
Description
Std Group (llamado internamente App DocumentObjectGroup) es un contenedor de propósito general que permite agrupar diferentes tipos de objetos en el Tree View, sin tener en cuenta sus tipo de datos. Se usa como una carpeta para categorizar y organizar los objetos de tu modelo, para mantener una estructura lógica. Grupos Standard puedes ser anidados dentro de otros grupos standard.
La herramienta de Grupos Standard no esta definida para un workbench particular,sino en la base del sistema, por lo que se encuentra en laStructure toolbar que esta disponible en todos workbenches.
Para agrupar 3d Objets como una sola unidad con la intención de crear ensamblajes , usar Std Part.
Various elements inside Std Groups in the Tree View.
Usage
- Do one of the following:
- An empty Group is created.
- To add objects to the Group, select them in Tree View, and drag and drop them onto the Group.
- To remove objects from the Group, drag them out of the Group, and onto the document label at the top of the Tree View.
- Objects can also be added and removed by editing the DatosGroup property of the Group.
Properties
The Std Group, internally called App DocumentObjectGroup (App::DocumentObjectGroup class), is derived from the basic App DocumentObject (App::DocumentObject class) and inherits all its properties.
The Std Group has the same properties as the App FeaturePython, which is the most basic instance of an App DocumentObject. It also has the following additional properties in the Property View. Hidden properties can be shown by using the Show hidden command in the context menu of the Property View.
See Part Feature for an explanation of some of the properties listed below.
Data
Base
- DatosGroup (
LinkList): a list of referenced objects. By default, it is empty[]. - Datos (Hidden)_ Group Touched (
Bool): whether the group is touched or not.
View
Display Options
- VistaDisplay Mode (
Enumeration) - VistaShow In Tree (
Bool) - VistaVisibility (
Bool)
Selection
- VistaOn Top When Selected (
Enumeration) - VistaSelection Style (
Enumeration)
Scripting
See also: FreeCAD Scripting Basics and scripted objects.
See Part Feature for the general information on adding objects to the document.
A Std Group (App DocumentObjectGroup) is created with the addObject() method of the document. Once a Group exists, other objects can be added to it with the addObject() or addObjects() methods.
import FreeCAD as App
doc = App.newDocument()
group = App.ActiveDocument.addObject("App::DocumentObjectGroup", "Group")
obj1 = App.ActiveDocument.addObject("PartDesign::Body", "Body")
obj2 = App.ActiveDocument.addObject("Part::Box", "Box")
group.addObjects([obj1, obj2])
App.ActiveDocument.recompute()
This basic App::DocumentObjectGroup doesn't have a Proxy object so it can't be fully used for sub-classing.
For Python subclassing you should create a App::DocumentObjectGroupPython object.
import FreeCAD as App
doc = App.newDocument()
obj = App.ActiveDocument.addObject("App::DocumentObjectGroupPython", "Name")
obj.Label = "Custom label"
For example, a FEM Analysis is an App::DocumentObjectGroupPython object with a custom icon and additional properties.
Links
Esta página ha sido recuperada de https://wiki.freecad.org/Std_Group