Represents an abstract placeable group of objects with an associated Origin. More...
#include <OriginGroupExtension.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 short | extensionMustExecute () override |
| Returns true on changing OriginFeature set. More... | |
| virtual void | extensionOnChanged (const Property *p) override |
| App::Origin * | getOrigin () const |
| Returns the origin link or throws an exception. More... | |
| virtual const char * | getViewProviderName () const |
| returns the type name of the ViewProvider More... | |
| virtual bool | hasObject (const DocumentObject *obj, bool recursive=false) const override |
| Checks whether the object obj is part of this group. More... | |
| OriginGroupExtension () | |
| void | relinkToOrigin (App::DocumentObject *obj) |
| virtual | ~OriginGroupExtension () |
Public Member Functions inherited from App::GeoFeatureGroupExtension | |
| 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 () |
Public Member Functions inherited from App::GroupExtension | |
| 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... | |
| 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 |
| std::vector< DocumentObject * > | getAllChildren () const |
| void | getAllChildren (std::vector< DocumentObject * > &, std::set< DocumentObject * > &) const |
Public Member Functions inherited from App::DocumentObjectExtension | |
| DocumentObjectExtension () | |
| virtual App::DocumentObjectExecReturn * | extensionExecute () |
| virtual bool | extensionGetLinkedObject (DocumentObject *&ret, bool recursive, Base::Matrix4D *mat, bool transform, int depth) const |
| Get the linked object. More... | |
| virtual bool | extensionGetSubObject (DocumentObject *&ret, const char *subname, PyObject **pyObj, Base::Matrix4D *mat, bool transform, int depth) const |
| Get the sub object by name. More... | |
| virtual bool | extensionGetSubObjects (std::vector< std::string > &ret, int reason) const |
| Get name references of all sub objects. More... | |
| virtual bool | extensionHasChildElement () const |
| virtual int | extensionIsElementVisible (const char *) |
| virtual short | extensionMustExecute () |
| virtual int | extensionSetElementVisible (const char *, bool) |
| App::DocumentObject * | getExtendedObject () |
| const App::DocumentObject * | getExtendedObject () const |
| virtual PyObject * | getExtensionPyObject () override |
| virtual const char * | getViewProviderExtensionName () 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 () |
Public Member Functions inherited from App::Extension | |
| Extension () | |
| App::ExtensionContainer * | getExtendedContainer () |
| const App::ExtensionContainer * | getExtendedContainer () const |
| virtual PyObject * | getExtensionPyObject () |
| virtual void | initExtension (App::ExtensionContainer *obj) |
| 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 DocumentObject * | getGroupOfObject (const DocumentObject *obj) |
| Returns the origin group which contains this object. More... | |
Static Public Member Functions inherited from App::GeoFeatureGroupExtension | |
| 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 Public Member Functions inherited from App::GroupExtension | |
| static DocumentObject * | getGroupOfObject (const DocumentObject *obj) |
| Returns the object group of the document which the given object obj is part of. More... | |
Public Attributes | |
| PropertyLink | Origin |
| Origin linked to the group. More... | |
Public Attributes inherited from App::GroupExtension | |
| PropertyLinkList | Group |
| Properties. More... | |
Protected Member Functions | |
| virtual App::DocumentObjectExecReturn * | extensionExecute () override |
| Checks integrity of the Origin. More... | |
| virtual void | onExtendedSetupObject () override |
| Creates the corresponding Origin object. More... | |
| virtual void | onExtendedUnsetupObject () override |
| Removes all planes and axis if they are still linked to the document. More... | |
Protected Member Functions inherited from App::Extension | |
| void | initExtensionType (Base::Type type) |
Additional Inherited Members | |
Static Protected Member Functions inherited from App::Extension | |
| static void | initExtensionSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Base::Type::instantiationMethod method=nullptr) |
Protected Attributes inherited from App::Extension | |
| bool | m_isPythonExtension = false |
| Py::SmartPtr | ExtensionPythonObject |
Represents an abstract placeable group of objects with an associated Origin.
| OriginGroupExtension::OriginGroupExtension | ( | ) |
References App::Prop_Hidden.
|
virtual |
|
overridevirtual |
Reimplemented from App::GeoFeatureGroupExtension.
References App::GeoFeatureGroupExtension::addObjects(), and relinkToOrigin().
|
overrideprotectedvirtual |
Checks integrity of the Origin.
Reimplemented from App::GroupExtension.
References App::GroupExtension::extensionExecute(), getOrigin(), and Base::Exception::what().
|
overridevirtual |
Get the sub object by name.
ret Reimplemented from App::GeoFeatureGroupExtension.
References App::GeoFeatureGroupExtension::extensionGetSubObject(), App::DocumentObject::getNameInDocument(), App::DocumentObject::getSubObject(), App::PropertyPlacement::getValue(), App::PropertyString::getValue(), App::DocumentObject::Label, App::GeoFeatureGroupExtension::placement(), and Base::Placement::toMatrix().
|
overridevirtual |
Returns true on changing OriginFeature set.
Reimplemented from App::DocumentObjectExtension.
References App::DocumentObjectExtension::extensionMustExecute(), and App::DocumentObject::isTouched().
|
overridevirtual |
Reimplemented from App::GeoFeatureGroupExtension.
References App::Document::addObject(), App::GeoFeatureGroupExtension::extensionOnChanged(), App::DocumentObject::getDocument(), App::DocumentObjectExtension::getExtendedObject(), App::DocumentObject::getFullName(), App::DocumentObject::getInList(), App::Document::Importing, App::Document::Restoring, and App::Document::testStatus().
|
static |
Returns the origin group which contains this object.
In case this object is not part of any geoFeatureGroup, 0 is returned.
| obj | the object to search for |
References Base::Persistence::getClassTypeId(), getGroupOfObject(), and Base::BaseClass::isDerivedFrom().
Referenced by App::GeoFeatureGroupExtension::getGroupOfObject(), and getGroupOfObject().
| App::Origin * OriginGroupExtension::getOrigin | ( | ) | const |
Returns the origin link or throws an exception.
References Base::Persistence::getClassTypeId(), App::DocumentObjectExtension::getExtendedObject(), App::DocumentObject::getFullName(), Base::Type::getName(), Base::Persistence::getTypeId(), and Base::BaseClass::isDerivedFrom().
Referenced by extensionExecute(), PartDesignGui::TaskRevolutionParameters::fillAxisCombo(), PartDesignGui::TaskTransformedParameters::fillAxisCombo(), PartDesignGui::TaskTransformedParameters::fillPlanesCombo(), PartDesignGui::fixSketchSupport(), hasObject(), PartDesignGui::relinkToOrigin(), relinkToOrigin(), PartDesignGui::TaskBoxPrimitives::TaskBoxPrimitives(), PartDesignGui::TaskRevolutionParameters::TaskRevolutionParameters(), PartDesignGui::ViewProviderBody::updateOriginDatumSize(), PartDesignGui::TaskBoxPrimitives::~TaskBoxPrimitives(), PartDesignGui::TaskHelixParameters::~TaskHelixParameters(), PartDesignGui::TaskLinearPatternParameters::~TaskLinearPatternParameters(), PartDesignGui::TaskMirroredParameters::~TaskMirroredParameters(), PartDesignGui::TaskPolarPatternParameters::~TaskPolarPatternParameters(), and PartDesignGui::TaskRevolutionParameters::~TaskRevolutionParameters().
|
virtual |
returns the type name of the ViewProvider
Reimplemented in App::Part, and PartDesign::Body.
|
overridevirtual |
Checks whether the object obj is part of this group.
| obj | the object to check for. |
| recursive | if true check also if the obj is child of some sub group (default is false). |
Reimplemented from App::GroupExtension.
References getOrigin(), App::GroupExtension::hasObject(), and hasObject().
Referenced by Part::BodyBase::findBodyOf(), PartDesignGui::getBodyFor(), PartDesign::Feature::getFeatureBody(), PartDesign::Body::getNextSolidFeature(), PartDesign::Body::getPrevSolidFeature(), hasObject(), PartDesign::Body::insertObject(), Part::BodyBase::isAfter(), PartDesignGui::Workbench::setupContextMenu(), PartDesignGui::ViewProviderBody::slotChangedObjectApp(), and PartDesignGui::ViewProviderBody::slotChangedObjectGui().
|
overrideprotectedvirtual |
Creates the corresponding Origin object.
Reimplemented from App::DocumentObjectExtension.
References Base::Persistence::getClassTypeId(), App::DocumentObject::getDocument(), App::DocumentObjectExtension::getExtendedObject(), Base::BaseClass::isDerivedFrom(), and App::DocumentObjectExtension::onExtendedSetupObject().
|
overrideprotectedvirtual |
Removes all planes and axis if they are still linked to the document.
Reimplemented from App::DocumentObjectExtension.
References App::DocumentObject::getDocument(), App::DocumentObject::getNameInDocument(), App::DocumentObject::isRemoving(), App::DocumentObjectExtension::onExtendedUnsetupObject(), and App::Document::removeObject().
| void OriginGroupExtension::relinkToOrigin | ( | App::DocumentObject * | obj | ) |
References Base::Persistence::getClassTypeId(), getOrigin(), App::Origin::getOriginFeature(), App::PropertyLinkSub::getSubValues(), App::PropertyString::getValue(), App::OriginFeature::Role, App::PropertyLink::setValue(), and draftgeoutils.general::vec().
Referenced by addObjects(), and PartDesign::Body::insertObject().
| PropertyLink App::OriginGroupExtension::Origin |
Origin linked to the group.