SHAPER  9.12.0
SketchAPI_Offset Class Reference

Interface for Offset feature. More...

Inheritance diagram for SketchAPI_Offset:
Inheritance graph

Public Member Functions

 SketchAPI_Offset (const std::shared_ptr< ModelAPI_Feature > &theFeature)
 Constructor without values. More...
 SketchAPI_Offset (const std::shared_ptr< ModelAPI_Feature > &theFeature, const std::list< std::shared_ptr< ModelAPI_Object > > &theObjects, const ModelHighAPI_Double &theOffsetValue, const bool theIsReversed=false, const std::string &theJointType=SketchPlugin_Offset::JOINT_KEEP_DISTANCE(), const bool theIsApprox=false)
 Constructor with values. More...
virtual ~SketchAPI_Offset ()
 Destructor. More...
virtual std::string getID ()
virtual std::shared_ptr< ModelAPI_AttributeRefListedgesList () const
 Offset edges list. More...
virtual std::shared_ptr< ModelAPI_AttributeDoublevalue () const
 Value. More...
virtual std::shared_ptr< ModelAPI_AttributeBooleanreversed () const
 Negative value. More...
virtual std::shared_ptr< ModelAPI_AttributeStringjoint () const
 Joint type. More...
virtual std::shared_ptr< ModelAPI_AttributeBooleanapprox () const
 Negative value. More...
std::list< std::shared_ptr< SketchAPI_SketchEntity > > offset () const
 List of created objects. More...
virtual void dump (ModelHighAPI_Dumper &theDumper) const
 Dump wrapped feature. More...
std::shared_ptr< ModelAPI_Featurefeature () const
 Return ModelAPI_Feature. More...
std::shared_ptr< ModelHighAPI_InterfacesubFeature (const int theIndex) const
 If feature is composite return intefrace for sub-feature by zero-based index, or empty pointer if feature not composite or does not have sub-feature with such index. More...
const std::string & getKind () const
 Shortcut for feature()->getKind() More...
void execute (bool isForce=false)
 Shortcut for feature()->execute() More...
void setName (const std::wstring &theName)
 Shortcut for feature()->data()->setName() More...
std::wstring name () const
 Shortcut for feature()->data()->name() More...
virtual ModelHighAPI_Selection result () const
 Return firts object of the feature. More...
virtual std::list< ModelHighAPI_Selectionresults () const
 Return all objects of the feature. More...
virtual std::shared_ptr< ModelAPI_ResultdefaultResult () const
 Return default result. Default implementation feature()->lastResult() More...
void throwException (const std::string &theDescription)
 Throw exception to event loop. More...
const std::string & attributeGetter (const std::string &theAttrName)
 Return name of getter for specified attribute. More...

Static Public Member Functions

static std::string ID ()

Protected Member Functions

bool initialize ()

Protected Attributes

std::shared_ptr< ModelAPI_AttributeRefListmyedgesList
std::shared_ptr< ModelAPI_AttributeDoublemyvalue
std::shared_ptr< ModelAPI_AttributeBooleanmyreversed
std::shared_ptr< ModelAPI_AttributeStringmyjoint
std::shared_ptr< ModelAPI_AttributeBooleanmyapprox
std::shared_ptr< ModelAPI_FeaturemyFeature
 feature of this interface More...
std::map< std::string, std::string > myAttrGetter
 names of attributes and their getters More...

Detailed Description

Interface for Offset feature.

Constructor & Destructor Documentation

◆ SketchAPI_Offset() [1/2]

SketchAPI_Offset::SketchAPI_Offset ( const std::shared_ptr< ModelAPI_Feature > &  theFeature)

Constructor without values.

◆ SketchAPI_Offset() [2/2]

SketchAPI_Offset::SketchAPI_Offset ( const std::shared_ptr< ModelAPI_Feature > &  theFeature,
const std::list< std::shared_ptr< ModelAPI_Object > > &  theObjects,
const ModelHighAPI_Double theOffsetValue,
const bool  theIsReversed = false,
const std::string &  theJointType = SketchPlugin_Offset::JOINT_KEEP_DISTANCE(),
const bool  theIsApprox = false 

Constructor with values.

◆ ~SketchAPI_Offset()

SketchAPI_Offset::~SketchAPI_Offset ( )


Member Function Documentation

◆ edgesList()

virtual std::shared_ptr< ModelAPI_AttributeRefList > SketchAPI_Offset::edgesList ( ) const

Offset edges list.

◆ value()

virtual std::shared_ptr< ModelAPI_AttributeDouble > SketchAPI_Offset::value ( ) const


◆ reversed()

virtual std::shared_ptr< ModelAPI_AttributeBoolean > SketchAPI_Offset::reversed ( ) const

Negative value.

◆ joint()

virtual std::shared_ptr< ModelAPI_AttributeString > SketchAPI_Offset::joint ( ) const

Joint type.

◆ approx()

virtual std::shared_ptr< ModelAPI_AttributeBoolean > SketchAPI_Offset::approx ( ) const

Negative value.

◆ offset()

std::list< std::shared_ptr< SketchAPI_SketchEntity > > SketchAPI_Offset::offset ( ) const

List of created objects.

◆ dump()

void SketchAPI_Offset::dump ( ModelHighAPI_Dumper theDumper) const

Dump wrapped feature.

Reimplemented from ModelHighAPI_Interface.

◆ feature()

std::shared_ptr< ModelAPI_Feature > ModelHighAPI_Interface::feature ( ) const

◆ subFeature()

std::shared_ptr< ModelHighAPI_Interface > ModelHighAPI_Interface::subFeature ( const int  theIndex) const

If feature is composite return intefrace for sub-feature by zero-based index, or empty pointer if feature not composite or does not have sub-feature with such index.

◆ getKind()

const std::string & ModelHighAPI_Interface::getKind ( ) const

Shortcut for feature()->getKind()

◆ execute()

void ModelHighAPI_Interface::execute ( bool  isForce = false)

Shortcut for feature()->execute()

isForcestart execution of feature instead of sending events

◆ setName()

void ModelHighAPI_Interface::setName ( const std::wstring &  theName)

Shortcut for feature()->data()->setName()

◆ name()

std::wstring ModelHighAPI_Interface::name ( ) const

Shortcut for feature()->data()->name()

◆ result()

ModelHighAPI_Selection ModelHighAPI_Interface::result ( ) const

Return firts object of the feature.

◆ results()

std::list< ModelHighAPI_Selection > ModelHighAPI_Interface::results ( ) const

Return all objects of the feature.

◆ defaultResult()

std::shared_ptr< ModelAPI_Result > ModelHighAPI_Interface::defaultResult ( ) const

Return default result. Default implementation feature()->lastResult()

◆ throwException()

void ModelHighAPI_Interface::throwException ( const std::string &  theDescription)

Throw exception to event loop.

◆ attributeGetter()

const std::string & ModelHighAPI_Interface::attributeGetter ( const std::string &  theAttrName)

Return name of getter for specified attribute.

Field Documentation

◆ myFeature

std::shared_ptr<ModelAPI_Feature> ModelHighAPI_Interface::myFeature

feature of this interface

◆ myAttrGetter

std::map<std::string, std::string> ModelHighAPI_Interface::myAttrGetter

names of attributes and their getters