FreeCAD C++
Public Member Functions | Public Attributes | List of all members
Part::AttachExtension Class Reference

#include <Mod/Part/App/AttachExtension.h>

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.

Public Member Functions

virtual void setAttacher (Attacher::AttachEngine *attacher)
 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. More...
 
bool changeAttacherType (const char *typeName)
 changeAttacherType More...
 
virtual bool positionBySupport (void)
 
- Public Member Functions inherited from App::DocumentObjectExtension
virtual void onExtendedSettingDocument ()
 get called after setting the document
 
virtual void onExtendedSetupObject ()
 get called after a brand new object was created
 
virtual void onExtendedUnsetupObject ()
 get called when object is going to be removed from the document
 
virtual const char * getViewProviderExtensionName (void) const
 
- Public Member Functions inherited from App::Extension
virtual PropertyextensionGetPropertyByName (const char *name) const
 find a property by its name
 
virtual const char * extensionGetPropertyName (const Property *prop) const
 get the name of a property
 
virtual void extensionGetPropertyMap (std::map< std::string, Property * > &Map) const
 get all properties of the class (including properties of the parent)
 
virtual void extensionGetPropertyList (std::vector< Property * > &List) const
 get all properties of the class (including properties of the parent)
 
virtual short extensionGetPropertyType (const Property *prop) const
 get the Type of a Property
 
virtual short extensionGetPropertyType (const char *name) const
 get the Type of a named Property
 
virtual const char * extensionGetPropertyGroup (const Property *prop) const
 get the Group of a Property
 
virtual const char * extensionGetPropertyGroup (const char *name) const
 get the Group of a named Property
 
virtual const char * extensionGetPropertyDocumentation (const Property *prop) const
 get the Group of a Property
 
virtual const char * extensionGetPropertyDocumentation (const char *name) const
 get the Group of a named Property
 
virtual void extensionSave (Base::Writer &) const
 
virtual void extensionRestore (Base::XMLReader &)
 
bool extensionIsDerivedFrom (const Base::Type type) const
 

Public Attributes

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) )
 

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)
 

Member Function Documentation

◆ changeAttacherType()

bool Part::AttachExtension::changeAttacherType ( const char *  typeName)

changeAttacherType

Parameters
typeNameis 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.

◆ positionBySupport()

virtual bool Part::AttachExtension::positionBySupport ( void  )
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.

◆ setAttacher()

virtual void Part::AttachExtension::setAttacher ( Attacher::AttachEngine attacher)
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.