The base class for placeable group of DocumentObjects. More...
#include <GeoFeatureGroupExtension.h>
Public Member Functions | |
virtual std::vector< DocumentObject * > addObjects (std::vector< DocumentObject * > obj) override | |
virtual bool extensionGetSubObject (DocumentObject *&ret, const char *subname, PyObject **pyObj, Base::Matrix4D *mat, bool transform, int depth) const override | |
Get the sub object by name. More... | |
virtual bool extensionGetSubObjects (std::vector< std::string > &ret, int reason) const override | |
Get name references of all sub objects. More... | |
virtual void extensionOnChanged (const Property *p) override | |
GeoFeatureGroupExtension (void) | |
Constructor. More... | |
Base::Placement globalGroupPlacement () | |
Calculates the global placement of this group. More... | |
virtual void initExtension (ExtensionContainer *obj) override | |
PropertyPlacement & placement () | |
virtual std::vector< DocumentObject * > removeObjects (std::vector< DocumentObject * > obj) override | |
Removes objects from this group. More... | |
virtual void transformPlacement (const Base::Placement &transform) | |
transformPlacement applies transform to placement of this shape. More... | |
virtual ~GeoFeatureGroupExtension () | |
![]() | |
GroupExtension (void) | |
Constructor. More... | |
virtual ~GroupExtension () | |
virtual DocumentObject * addObject (const char *sType, const char *pObjectName) | |
Adds an object of sType with pObjectName to the document this group belongs to and append it to this group as well. More... | |
virtual std::vector< DocumentObject * > addObject (DocumentObject *obj) | |
virtual std::vector< DocumentObject * > setObjects (std::vector< DocumentObject * > obj) | |
virtual bool allowObject (DocumentObject *) | |
virtual std::vector< DocumentObject * > removeObject (DocumentObject *obj) | |
Removes an object from this group. More... | |
virtual void removeObjectsFromDocument () | |
Removes all children objects from this group and the document. More... | |
DocumentObject * getObject (const char *Name) const | |
Returns the object of this group with Name. More... | |
virtual bool hasObject (const DocumentObject *obj, bool recursive=false) const | |
Checks whether the object obj is part of this group. More... | |
bool isChildOf (const GroupExtension *group, bool recursive=true) const | |
Checks whether this group object is a child (or sub-child if enabled) of the given group object. More... | |
const std::vector< DocumentObject * > & getObjects () const | |
Returns a list of all objects this group does have. More... | |
std::vector< DocumentObject * > getObjectsOfType (const Base::Type &typeId) const | |
Returns a list of all objects of typeId this group does have. More... | |
int countObjectsOfType (const Base::Type &typeId) const | |
Returns the number of objects of typeId this group does have. More... | |
virtual PyObject * getExtensionPyObject (void) override | |
virtual App::DocumentObjectExecReturn * extensionExecute (void) override | |
std::vector< DocumentObject * > getAllChildren () const | |
void getAllChildren (std::vector< DocumentObject * > &, std::set< DocumentObject * > &) const | |
![]() | |
DocumentObjectExtension () | |
virtual bool extensionGetLinkedObject (DocumentObject *&ret, bool recursive, Base::Matrix4D *mat, bool transform, int depth) const | |
Get the linked object. More... | |
virtual bool extensionHasChildElement () const | |
virtual int extensionIsElementVisible (const char *) | |
virtual short extensionMustExecute (void) | |
virtual int extensionSetElementVisible (const char *, bool) | |
App::DocumentObject * getExtendedObject () | |
const App::DocumentObject * getExtendedObject () const | |
virtual const char * getViewProviderExtensionName (void) const | |
returns the type name of the ViewProviderExtension which is automatically attached to the viewprovider object when it is initiated More... | |
virtual void onExtendedDocumentRestored () | |
get called after a document has been fully restored More... | |
virtual void onExtendedSettingDocument () | |
get called after setting the document More... | |
virtual void onExtendedSetupObject () | |
get called after a brand new object was created More... | |
virtual void onExtendedUnsetupObject () | |
get called when object is going to be removed from the document More... | |
virtual ~DocumentObjectExtension () | |
![]() | |
Extension () | |
App::ExtensionContainer * getExtendedContainer () | |
const App::ExtensionContainer * getExtendedContainer () const | |
bool isPythonExtension () | |
std::string name () const | |
virtual ~Extension () | |
virtual Property * extensionGetPropertyByName (const char *name) const | |
find a property by its name More... | |
virtual const char * extensionGetPropertyName (const Property *prop) const | |
get the name of a property More... | |
virtual void extensionGetPropertyMap (std::map< std::string, Property * > &Map) const | |
get all properties of the class (including properties of the parent) More... | |
virtual void extensionGetPropertyList (std::vector< Property * > &List) const | |
get all properties of the class (including properties of the parent) More... | |
virtual short extensionGetPropertyType (const Property *prop) const | |
get the Type of a Property More... | |
virtual short extensionGetPropertyType (const char *name) const | |
get the Type of a named Property More... | |
virtual const char * extensionGetPropertyGroup (const Property *prop) const | |
get the Group of a Property More... | |
virtual const char * extensionGetPropertyGroup (const char *name) const | |
get the Group of a named Property More... | |
virtual const char * extensionGetPropertyDocumentation (const Property *prop) const | |
get the Group of a Property More... | |
virtual const char * extensionGetPropertyDocumentation (const char *name) const | |
get the Group of a named Property More... | |
virtual void extensionSave (Base::Writer &) const | |
virtual void extensionRestore (Base::XMLReader &) | |
bool extensionIsDerivedFrom (const Base::Type type) const | |
Static Public Member Functions | |
static bool areLinksValid (const App::DocumentObject *obj) | |
Checks if the links of the given object comply with all GeoFeatureGroup requirements, that means if normal links are only within the parent GeoFeatureGroup. More... | |
static std::vector< App::DocumentObject * > getCSRelevantLinks (const App::DocumentObject *obj) | |
Collects all links that are relevant for the coordinate system, meaning all recursive links to obj and from obj excluding expressions and stopping the recursion at other geofeaturegroups. More... | |
static DocumentObject * getGroupOfObject (const DocumentObject *obj) | |
Returns the geo feature group which contains this object. More... | |
static void getInvalidLinkObjects (const App::DocumentObject *obj, std::vector< App::DocumentObject * > &vec) | |
static bool isLinkValid (App::Property *link) | |
Checks if the given link complies with all GeoFeatureGroup requirements, that means if normal links are only within the parent GeoFeatureGroup. More... | |
static bool isNonGeoGroup (const DocumentObject *obj) | |
Returns true if the given DocumentObject is DocumentObjectGroup but not GeoFeatureGroup. More... | |
![]() | |
static DocumentObject * getGroupOfObject (const DocumentObject *obj) | |
Returns the object group of the document which the given object obj is part of. More... | |
Additional Inherited Members | |
![]() | |
PropertyLinkList Group | |
Properties. More... | |
![]() | |
void initExtensionType (Base::Type type) | |
![]() | |
static void initExtensionSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Base::Type::instantiationMethod method=0) | |
![]() | |
bool m_isPythonExtension = false | |
Py::Object ExtensionPythonObject | |
Detailed Description
The base class for placeable group of DocumentObjects.
It represents a local coordnate system
This class is the FreeCAD way of representing local coordinate systems. It groups its children beneath it and transforms them all with the GeoFeatureGroup placement. A few important properties:
- Every child that belongs to the CS must be in the Group property. Even if a sketch is part of a pad, it must be in the Group property of the same GeoFeatureGroup as pad. This also holds for normal GroupExtensions. They can be added to a GeoFeatureGroup, but all objects that the group holds must also be added to the GeoFeatureGroup
- Objects can be only in a single GeoFeatureGroup. It is not allowed to have a document object in multiple GeoFeatureGroups
- PropertyLinks between different GeoFeatureGroups are forbidden. There are special link properties that allow such cross-CS links.
- Expressions can cross GeoFeatureGroup borders
Constructor & Destructor Documentation
◆ GeoFeatureGroupExtension()
GeoFeatureGroupExtension::GeoFeatureGroupExtension | ( | void | ) |
Constructor.
References App::Child.
◆ ~GeoFeatureGroupExtension()
|
virtual |
Member Function Documentation
◆ addObjects()
|
overridevirtual |
Reimplemented from App::GroupExtension.
Reimplemented in App::OriginGroupExtension.
References App::GroupExtension::allowObject(), getCSRelevantLinks(), App::DocumentObjectExtension::getExtendedObject(), getGroupOfObject(), App::PropertyListsT< T, ListT, ParentT >::getValues(), App::GroupExtension::Group, App::GroupExtension::hasObject(), App::GroupExtension::removeObject(), and App::PropertyLinkList::setValues().
Referenced by App::OriginGroupExtension::addObjects(), and PartDesignGui::TaskBooleanParameters::onSelectionChanged().
◆ areLinksValid()
|
static |
Checks if the links of the given object comply with all GeoFeatureGroup requirements, that means if normal links are only within the parent GeoFeatureGroup.
References isLinkValid().
◆ extensionGetSubObject()
|
overridevirtual |
Get the sub object by name.
- See also
- DocumentObject::getSubObject()
- Returns
- Return turn if handled, the sub object is returned in
ret
Reimplemented from App::GroupExtension.
Reimplemented in App::OriginGroupExtension.
References App::PropertyLinkList::find(), App::Extension::getExtendedContainer(), App::DocumentObject::getSubObject(), App::PropertyPlacement::getValue(), App::PropertyListsT< T, ListT, ParentT >::getValues(), App::GroupExtension::Group, App::ExtensionContainer::hasExtension(), placement(), and Base::Placement::toMatrix().
Referenced by App::OriginGroupExtension::extensionGetSubObject().
◆ extensionGetSubObjects()
|
overridevirtual |
Get name references of all sub objects.
- See also
- DocumentObject::getSubObjects()
- Returns
- Return turn if handled, the sub object is returned in
ret
Reimplemented from App::GroupExtension.
References App::PropertyListsT< T, ListT, ParentT >::getValues(), and App::GroupExtension::Group.
◆ extensionOnChanged()
|
overridevirtual |
Reimplemented from App::GroupExtension.
References App::GroupExtension::extensionOnChanged(), App::DocumentObjectExtension::getExtendedObject(), App::PropertyListsT< T, ListT, ParentT >::getValues(), App::GroupExtension::Group, App::PropertyLinkList::setValues(), App::Property::testStatus(), and App::Property::User3.
◆ getCSRelevantLinks()
|
static |
Collects all links that are relevant for the coordinate system, meaning all recursive links to obj and from obj excluding expressions and stopping the recursion at other geofeaturegroups.
The result is the combination of CSOutList and CSInList.
Referenced by addObjects(), and removeObjects().
◆ getGroupOfObject()
|
static |
Returns the geo feature group which contains this object.
In case this object is not part of any geoFeatureGroup 0 is returned. Unlike DocumentObjectGroup::getGroupOfObject serches only for GeoFeatureGroups
- Parameters
-
obj the object to search for
References Base::Persistence::getClassTypeId(), and App::OriginGroupExtension::getGroupOfObject().
Referenced by App::GroupExtension::addObjects(), addObjects(), Gui::View3DInventorViewer::checkGroupOnTop(), Gui::TreeWidget::dropEvent(), App::Document::exportGraphviz(), getInvalidLinkObjects(), App::DocumentObjectPy::getParentGeoFeatureGroup(), App::GeoFeature::globalPlacement(), and isLinkValid().
◆ getInvalidLinkObjects()
|
static |
References App::Child, getGroupOfObject(), and App::Local.
Referenced by App::Document::exportGraphviz().
◆ globalGroupPlacement()
Base::Placement GeoFeatureGroupExtension::globalGroupPlacement | ( | ) |
Calculates the global placement of this group.
The returned placement describes the transformation from the global reference coordinate system to the local coordinate system of this geo feature group. If this group has a no parent GeoFeatureGroup the returned placement is the one of this group. For multiple stacked GeoFeatureGroups the returned Placement is the combination of all parent placements including the one of this group.
- Returns
- Base::Placement The transformation from global reference system to the groups local system
References App::DocumentObjectExtension::getExtendedObject().
◆ initExtension()
|
overridevirtual |
Reimplemented from App::Extension.
References Base::Persistence::getClassTypeId(), and App::Extension::initExtension().
Referenced by PartDesign::Boolean::Boolean().
◆ isLinkValid()
|
static |
Checks if the given link complies with all GeoFeatureGroup requirements, that means if normal links are only within the parent GeoFeatureGroup.
References App::Child, Base::Persistence::getClassTypeId(), App::Property::getContainer(), getGroupOfObject(), Base::BaseClass::isDerivedFrom(), and App::Local.
Referenced by areLinksValid().
◆ isNonGeoGroup()
|
static |
Returns true if the given DocumentObject is DocumentObjectGroup but not GeoFeatureGroup.
◆ placement()
PropertyPlacement & GeoFeatureGroupExtension::placement | ( | ) |
References App::Extension::getExtendedContainer().
Referenced by App::OriginGroupExtension::extensionGetSubObject(), extensionGetSubObject(), and transformPlacement().
◆ removeObjects()
|
overridevirtual |
Removes objects from this group.
Returns all objects that have been removed.
Reimplemented from App::GroupExtension.
References getCSRelevantLinks(), App::PropertyListsT< T, ListT, ParentT >::getValues(), App::GroupExtension::Group, and App::PropertyLinkList::setValues().
◆ transformPlacement()
|
virtual |
transformPlacement applies transform to placement of this shape.
Override this function to propagate the change of placement to base features.
- Parameters
-
transform (input).
References App::PropertyPlacement::getValue(), placement(), and App::PropertyPlacement::setValue().
The documentation for this class was generated from the following files:
- src/App/GeoFeatureGroupExtension.h
- src/App/GeoFeatureGroupExtension.cpp