The AttachableObject class is the thing to extend an object with that should be attachable. More...
#include <AttachExtension.h>
Public Member Functions | |
Attacher::AttachEngine & | attacher (void) const |
AttachExtension () | |
bool | changeAttacherType (const char *typeName) |
changeAttacherType More... | |
virtual App::DocumentObjectExecReturn * | extensionExecute (void) |
virtual short int | extensionMustExecute (void) |
virtual PyObject * | getExtensionPyObject (void) |
bool | isAttacherActive () const |
Return whether this attacher is active. More... | |
virtual bool | isTouched_Mapping () |
virtual void | onExtendedDocumentRestored () |
get called after a document has been fully restored More... | |
virtual bool | positionBySupport (void) |
calculate and update the Placement property based on the Support, and mode. More... | |
virtual void | setAttacher (Attacher::AttachEngine *attacher) |
setAttacher sets the AttachEngine object. More... | |
void | updateAttacherVals () |
virtual | ~AttachExtension () |
Public Member Functions inherited from App::DocumentObjectExtension | |
DocumentObjectExtension () | |
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 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 | 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 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 |
Public Attributes | |
App::PropertyString | AttacherType |
App::PropertyPlacement | AttachmentOffset |
App::PropertyEnumeration | MapMode |
App::PropertyFloat | MapPathParameter |
MapPathParameter is a parameter value for mmNormalToPath (the sketch will be mapped normal to a curve at point specified by parameter (from 0.0 to 1.0, from start to end) ) More... | |
App::PropertyBool | MapReversed |
App::PropertyLinkSubList | Support |
Protected Member Functions | |
virtual void | extensionOnChanged (const App::Property *) |
virtual void | extHandleChangedPropertyName (Base::XMLReader &reader, const char *TypeName, const char *PropName) |
App::PropertyPlacement & | getPlacement () const |
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=0) |
Protected Attributes inherited from App::Extension | |
bool | m_isPythonExtension = false |
Py::Object | ExtensionPythonObject |
Detailed Description
The AttachableObject class is the thing to extend an object with that should be attachable.
It includes the required properties, and shortcuts for accessing the attachment math class.
Constructor & Destructor Documentation
◆ AttachExtension()
AttachExtension::AttachExtension | ( | ) |
References Attacher::mmDeactivated, Attacher::mmDummy_NumberOfModes, and App::Prop_None.
◆ ~AttachExtension()
|
virtual |
Member Function Documentation
◆ attacher()
Attacher::AttachEngine& Part::AttachExtension::attacher | ( | void | ) | const |
Referenced by Part::AttachExtensionPy::getAttacher().
◆ changeAttacherType()
bool AttachExtension::changeAttacherType | ( | const char * | typeName | ) |
changeAttacherType
- Parameters
-
typeName is the typename of new attacher class. Must be derived from Attacher::AttachEngine.
- Returns
- true if attacher was changed. false if attacher is already of the type requested. Throws if invalid type is supplied.
References Base::Type::createInstanceByName(), and Base::Type::fromName().
Referenced by Part::AttachExtensionPy::changeAttacherType().
◆ extensionExecute()
|
virtual |
Reimplemented from App::DocumentObjectExtension.
References App::DocumentObjectExtension::extensionExecute().
◆ extensionMustExecute()
|
virtual |
Reimplemented from App::DocumentObjectExtension.
◆ extensionOnChanged()
|
protectedvirtual |
Reimplemented from App::Extension.
References Base::Console(), App::Error, Base::ConsoleSingleton::Error(), App::Extension::extensionOnChanged(), Attacher::mmConcentric, Attacher::mmFrenetNB, Attacher::mmFrenetTB, Attacher::mmFrenetTN, Attacher::mmNormalToPath, Attacher::mmRevolutionSection, and Attacher::mmTranslate.
◆ extHandleChangedPropertyName()
|
protectedvirtual |
◆ getExtensionPyObject()
|
virtual |
Reimplemented from App::DocumentObjectExtension.
◆ getPlacement()
|
protected |
◆ isAttacherActive()
bool AttachExtension::isAttacherActive | ( | ) | const |
Return whether this attacher is active.
◆ isTouched_Mapping()
|
virtual |
◆ onExtendedDocumentRestored()
|
virtual |
get called after a document has been fully restored
Reimplemented from App::DocumentObjectExtension.
References Attacher::mmConcentric, Attacher::mmFrenetNB, Attacher::mmFrenetTB, Attacher::mmFrenetTN, Attacher::mmNormalToPath, Attacher::mmRevolutionSection, and Attacher::mmTranslate.
◆ positionBySupport()
|
virtual |
calculate and update the Placement property based on the Support, and mode.
Can throw FreeCAD and OCC exceptions. Returns true if attached, false if not, throws if attachment failed.
References Attacher::mmDeactivated.
Referenced by Part::AttachExtensionPy::positionBySupport(), and Part::Part2DObject::transformPlacement().
◆ setAttacher()
|
virtual |
setAttacher sets the AttachEngine object.
The class takes the ownership of the pointer, it will be deleted when the class is destroyed, or when a new attacher is set. The default attacher is AttachEngine3D.
- Parameters
-
attacher. AttachableObject takes ownership and will delete it eventually.
References Base::Type::getName(), and Base::BaseClass::getTypeId().
◆ updateAttacherVals()
void AttachExtension::updateAttacherVals | ( | ) |
Member Data Documentation
◆ AttacherType
App::PropertyString Part::AttachExtension::AttacherType |
◆ AttachmentOffset
App::PropertyPlacement Part::AttachExtension::AttachmentOffset |
◆ MapMode
App::PropertyEnumeration Part::AttachExtension::MapMode |
Referenced by PartGui::TaskDlgAttacher::accept(), PartDesign::ProfileBased::getSupportFace(), Part::Part2DObject::handleChangedPropertyType(), PartDesignGui::TaskFeaturePick::makeCopy(), Attacher::AttachEnginePy::readParametersFromFeature(), PartGui::TaskAttacher::TaskAttacher(), and Attacher::AttachEnginePy::writeParametersToFeature().
◆ MapPathParameter
App::PropertyFloat Part::AttachExtension::MapPathParameter |
MapPathParameter is a parameter value for mmNormalToPath (the sketch will be mapped normal to a curve at point specified by parameter (from 0.0 to 1.0, from start to end) )
Referenced by PartGui::TaskDlgAttacher::accept(), Attacher::AttachEnginePy::readParametersFromFeature(), and Attacher::AttachEnginePy::writeParametersToFeature().
◆ MapReversed
App::PropertyBool Part::AttachExtension::MapReversed |
◆ Support
App::PropertyLinkSubList Part::AttachExtension::Support |
Referenced by PartDesignGui::TaskDlgDatumParameters::accept(), PartGui::TaskDlgAttacher::accept(), PartDesignGui::fixSketchSupport(), PartDesign::ProfileBased::getBaseObject(), PartDesign::ProfileBased::getSupportFace(), PartDesignGui::TaskFeaturePick::makeCopy(), PartDesign::ProfileBased::positionByPrevious(), Attacher::AttachEnginePy::readParametersFromFeature(), SketcherGui::SketchSelection::setUp(), PartGui::TaskAttacher::TaskAttacher(), Part::Part2DObject::transformPlacement(), and Attacher::AttachEnginePy::writeParametersToFeature().
The documentation for this class was generated from the following files:
- src/Mod/Part/App/AttachExtension.h
- src/Mod/Part/App/AttachExtension.cpp