Std Group/es

Std Group

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

  1. Do one of the following:
    • Press the New Group button.
    • Right-click the document in the Tree View and select the Create Group option from the context menu.
  2. An empty Group is created.
  3. To add objects to the Group, select them in Tree View, and drag and drop them onto the Group.
  4. To remove objects from the Group, drag them out of the Group, and onto the document label at the top of the Tree View.
  5. 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

View

Display Options

Selection

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