SHAPER  9.12.0
SketchAPI_MacroArc Class Reference

Interface for Arc feature. More...

Inheritance diagram for SketchAPI_MacroArc:
Inheritance graph

Public Member Functions

 SketchAPI_MacroArc (const std::shared_ptr< ModelAPI_Feature > &theFeature)
 Constructor without values. More...
 
 SketchAPI_MacroArc (const std::shared_ptr< ModelAPI_Feature > &theFeature, double theCenterX, double theCenterY, double theStartX, double theStartY, double theEndX, double theEndY, bool theInversed)
 Constructor with values. More...
 
 SketchAPI_MacroArc (const std::shared_ptr< ModelAPI_Feature > &theFeature, const std::shared_ptr< GeomAPI_Pnt2d > &theCenter, const std::shared_ptr< GeomAPI_Pnt2d > &theStart, const std::shared_ptr< GeomAPI_Pnt2d > &theEnd, bool theInversed)
 Constructor with values. More...
 
 SketchAPI_MacroArc (const std::shared_ptr< ModelAPI_Feature > &theFeature, double theStartX, double theStartY, double theEndX, double theEndY, double thePassedX, double thePassedY)
 Constructor with values. More...
 
 SketchAPI_MacroArc (const std::shared_ptr< ModelAPI_Feature > &theFeature, const std::shared_ptr< GeomAPI_Pnt2d > &theStart, const std::shared_ptr< GeomAPI_Pnt2d > &theEnd, const std::shared_ptr< GeomAPI_Pnt2d > &thePassed)
 Constructor with values. More...
 
 SketchAPI_MacroArc (const std::shared_ptr< ModelAPI_Feature > &theFeature, const ModelHighAPI_RefAttr &theTangentPoint, double theEndX, double theEndY, bool theInversed)
 Constructor with values. More...
 
 SketchAPI_MacroArc (const std::shared_ptr< ModelAPI_Feature > &theFeature, const ModelHighAPI_RefAttr &theTangentPoint, const std::shared_ptr< GeomAPI_Pnt2d > &theEnd, bool theInversed)
 Constructor with values. More...
 
virtual ~SketchAPI_MacroArc ()
 Destructor. More...
 
virtual std::string getID ()
 
virtual std::shared_ptr< ModelAPI_AttributeStringarcType () const
 Arc type. More...
 
virtual std::shared_ptr< GeomDataAPI_Point2Dcenter () const
 Center point. More...
 
virtual std::shared_ptr< GeomDataAPI_Point2DstartPoint1 () const
 Start point. More...
 
virtual std::shared_ptr< GeomDataAPI_Point2DendPoint1 () const
 End point. More...
 
virtual std::shared_ptr< GeomDataAPI_Point2DstartPoint2 () const
 Start point. More...
 
virtual std::shared_ptr< GeomDataAPI_Point2DendPoint2 () const
 End point. More...
 
virtual std::shared_ptr< GeomDataAPI_Point2DpassedPoint () const
 Passed point. More...
 
virtual std::shared_ptr< ModelAPI_AttributeRefAttrtangentPoint () const
 Tangent point. More...
 
virtual std::shared_ptr< GeomDataAPI_Point2DendPoint3 () const
 End point. More...
 
virtual std::shared_ptr< ModelAPI_AttributeRefAttrtransversalPoint () const
 Transversal point. More...
 
virtual std::shared_ptr< GeomDataAPI_Point2DendPoint4 () const
 End point. More...
 
virtual std::shared_ptr< ModelAPI_AttributeBooleanreversed () const
 Reversed flag. More...
 
virtual std::shared_ptr< ModelAPI_AttributeDoubleradius () const
 Radius. More...
 
virtual std::shared_ptr< ModelAPI_AttributeDoubleangle () const
 Angle. More...
 
void setByCenterStartEnd (double theCenterX, double theCenterY, double theStartX, double theStartY, double theEndX, double theEndY, bool theInversed)
 Set by center and start, end point. More...
 
void setByCenterStartEnd (const std::shared_ptr< GeomAPI_Pnt2d > &theCenter, const std::shared_ptr< GeomAPI_Pnt2d > &theStart, const std::shared_ptr< GeomAPI_Pnt2d > &theEnd, bool theInversed)
 Set by center and start, end point. More...
 
void setByStartEndPassed (double theStartX, double theStartY, double theEndX, double theEndY, double thePassedX, double thePassedY)
 Set by start, end and passed points. More...
 
void setByStartEndPassed (const std::shared_ptr< GeomAPI_Pnt2d > &theStart, const std::shared_ptr< GeomAPI_Pnt2d > &theEnd, const std::shared_ptr< GeomAPI_Pnt2d > &thePassed)
 Set by start, end and passed points. More...
 
void setByTangent (const ModelHighAPI_RefAttr &theTangentPoint, double theEndX, double theEndY, bool theInversed)
 Set by tangent and end point. More...
 
void setByTangent (const ModelHighAPI_RefAttr &theTangentPoint, const std::shared_ptr< GeomAPI_Pnt2d > &theEnd, bool theInversed)
 Set by tangent and end point. More...
 
void setByTransversal (const ModelHighAPI_RefAttr &theTransversalPoint, double theEndX, double theEndY, bool theInversed)
 Set by tangent and end point. More...
 
void setByTransversal (const ModelHighAPI_RefAttr &theTransversalPoint, const std::shared_ptr< GeomAPI_Pnt2d > &theEnd, bool theInversed)
 Set by tangent and end point. More...
 
std::shared_ptr< ModelAPI_AttributeBooleanauxiliary () const
 Auxiliary. More...
 
void setAuxiliary (bool theAuxiliary)
 Set auxiliary. 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 ()
 
static std::list< std::shared_ptr< SketchAPI_SketchEntity > > wrap (const std::list< std::shared_ptr< ModelAPI_Feature > > &theFeatures)
 Convert list of features to list of appropriate wrappers. More...
 

Protected Member Functions

bool initialize ()
 
bool isCopy () const
 Check the entity is a copy of another feature. More...
 

Protected Attributes

std::shared_ptr< ModelAPI_AttributeStringmyarcType
 
std::shared_ptr< GeomDataAPI_Point2Dmycenter
 
std::shared_ptr< GeomDataAPI_Point2DmystartPoint1
 
std::shared_ptr< GeomDataAPI_Point2DmyendPoint1
 
std::shared_ptr< GeomDataAPI_Point2DmystartPoint2
 
std::shared_ptr< GeomDataAPI_Point2DmyendPoint2
 
std::shared_ptr< GeomDataAPI_Point2DmypassedPoint
 
std::shared_ptr< ModelAPI_AttributeRefAttrmytangentPoint
 
std::shared_ptr< GeomDataAPI_Point2DmyendPoint3
 
std::shared_ptr< ModelAPI_AttributeRefAttrmytransversalPoint
 
std::shared_ptr< GeomDataAPI_Point2DmyendPoint4
 
std::shared_ptr< ModelAPI_AttributeBooleanmyreversed
 
std::shared_ptr< ModelAPI_AttributeDoublemyradius
 
std::shared_ptr< ModelAPI_AttributeDoublemyangle
 
std::shared_ptr< ModelAPI_AttributeBooleanmyAuxiliary
 
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 Arc feature.

Constructor & Destructor Documentation

◆ SketchAPI_MacroArc() [1/7]

SketchAPI_MacroArc::SketchAPI_MacroArc ( const std::shared_ptr< ModelAPI_Feature > &  theFeature)
explicit

Constructor without values.

◆ SketchAPI_MacroArc() [2/7]

SketchAPI_MacroArc::SketchAPI_MacroArc ( const std::shared_ptr< ModelAPI_Feature > &  theFeature,
double  theCenterX,
double  theCenterY,
double  theStartX,
double  theStartY,
double  theEndX,
double  theEndY,
bool  theInversed 
)

Constructor with values.

◆ SketchAPI_MacroArc() [3/7]

SketchAPI_MacroArc::SketchAPI_MacroArc ( const std::shared_ptr< ModelAPI_Feature > &  theFeature,
const std::shared_ptr< GeomAPI_Pnt2d > &  theCenter,
const std::shared_ptr< GeomAPI_Pnt2d > &  theStart,
const std::shared_ptr< GeomAPI_Pnt2d > &  theEnd,
bool  theInversed 
)

Constructor with values.

◆ SketchAPI_MacroArc() [4/7]

SketchAPI_MacroArc::SketchAPI_MacroArc ( const std::shared_ptr< ModelAPI_Feature > &  theFeature,
double  theStartX,
double  theStartY,
double  theEndX,
double  theEndY,
double  thePassedX,
double  thePassedY 
)

Constructor with values.

◆ SketchAPI_MacroArc() [5/7]

SketchAPI_MacroArc::SketchAPI_MacroArc ( const std::shared_ptr< ModelAPI_Feature > &  theFeature,
const std::shared_ptr< GeomAPI_Pnt2d > &  theStart,
const std::shared_ptr< GeomAPI_Pnt2d > &  theEnd,
const std::shared_ptr< GeomAPI_Pnt2d > &  thePassed 
)

Constructor with values.

◆ SketchAPI_MacroArc() [6/7]

SketchAPI_MacroArc::SketchAPI_MacroArc ( const std::shared_ptr< ModelAPI_Feature > &  theFeature,
const ModelHighAPI_RefAttr theTangentPoint,
double  theEndX,
double  theEndY,
bool  theInversed 
)

Constructor with values.

◆ SketchAPI_MacroArc() [7/7]

SketchAPI_MacroArc::SketchAPI_MacroArc ( const std::shared_ptr< ModelAPI_Feature > &  theFeature,
const ModelHighAPI_RefAttr theTangentPoint,
const std::shared_ptr< GeomAPI_Pnt2d > &  theEnd,
bool  theInversed 
)

Constructor with values.

◆ ~SketchAPI_MacroArc()

SketchAPI_MacroArc::~SketchAPI_MacroArc ( )
virtual

Destructor.

Member Function Documentation

◆ arcType()

virtual std::shared_ptr< ModelAPI_AttributeString > SketchAPI_MacroArc::arcType ( ) const
inlinevirtual

Arc type.

◆ center()

virtual std::shared_ptr< GeomDataAPI_Point2D > SketchAPI_MacroArc::center ( ) const
inlinevirtual

Center point.

◆ startPoint1()

virtual std::shared_ptr< GeomDataAPI_Point2D > SketchAPI_MacroArc::startPoint1 ( ) const
inlinevirtual

Start point.

◆ endPoint1()

virtual std::shared_ptr< GeomDataAPI_Point2D > SketchAPI_MacroArc::endPoint1 ( ) const
inlinevirtual

End point.

◆ startPoint2()

virtual std::shared_ptr< GeomDataAPI_Point2D > SketchAPI_MacroArc::startPoint2 ( ) const
inlinevirtual

Start point.

◆ endPoint2()

virtual std::shared_ptr< GeomDataAPI_Point2D > SketchAPI_MacroArc::endPoint2 ( ) const
inlinevirtual

End point.

◆ passedPoint()

virtual std::shared_ptr< GeomDataAPI_Point2D > SketchAPI_MacroArc::passedPoint ( ) const
inlinevirtual

Passed point.

◆ tangentPoint()

virtual std::shared_ptr< ModelAPI_AttributeRefAttr > SketchAPI_MacroArc::tangentPoint ( ) const
inlinevirtual

Tangent point.

◆ endPoint3()

virtual std::shared_ptr< GeomDataAPI_Point2D > SketchAPI_MacroArc::endPoint3 ( ) const
inlinevirtual

End point.

◆ transversalPoint()

virtual std::shared_ptr< ModelAPI_AttributeRefAttr > SketchAPI_MacroArc::transversalPoint ( ) const
inlinevirtual

Transversal point.

◆ endPoint4()

virtual std::shared_ptr< GeomDataAPI_Point2D > SketchAPI_MacroArc::endPoint4 ( ) const
inlinevirtual

End point.

◆ reversed()

virtual std::shared_ptr< ModelAPI_AttributeBoolean > SketchAPI_MacroArc::reversed ( ) const
inlinevirtual

Reversed flag.

◆ radius()

virtual std::shared_ptr< ModelAPI_AttributeDouble > SketchAPI_MacroArc::radius ( ) const
inlinevirtual

Radius.

◆ angle()

virtual std::shared_ptr< ModelAPI_AttributeDouble > SketchAPI_MacroArc::angle ( ) const
inlinevirtual

Angle.

◆ setByCenterStartEnd() [1/2]

void SketchAPI_MacroArc::setByCenterStartEnd ( double  theCenterX,
double  theCenterY,
double  theStartX,
double  theStartY,
double  theEndX,
double  theEndY,
bool  theInversed 
)

Set by center and start, end point.

◆ setByCenterStartEnd() [2/2]

void SketchAPI_MacroArc::setByCenterStartEnd ( const std::shared_ptr< GeomAPI_Pnt2d > &  theCenter,
const std::shared_ptr< GeomAPI_Pnt2d > &  theStart,
const std::shared_ptr< GeomAPI_Pnt2d > &  theEnd,
bool  theInversed 
)

Set by center and start, end point.

◆ setByStartEndPassed() [1/2]

void SketchAPI_MacroArc::setByStartEndPassed ( double  theStartX,
double  theStartY,
double  theEndX,
double  theEndY,
double  thePassedX,
double  thePassedY 
)

Set by start, end and passed points.

◆ setByStartEndPassed() [2/2]

void SketchAPI_MacroArc::setByStartEndPassed ( const std::shared_ptr< GeomAPI_Pnt2d > &  theStart,
const std::shared_ptr< GeomAPI_Pnt2d > &  theEnd,
const std::shared_ptr< GeomAPI_Pnt2d > &  thePassed 
)

Set by start, end and passed points.

◆ setByTangent() [1/2]

void SketchAPI_MacroArc::setByTangent ( const ModelHighAPI_RefAttr theTangentPoint,
double  theEndX,
double  theEndY,
bool  theInversed 
)

Set by tangent and end point.

◆ setByTangent() [2/2]

void SketchAPI_MacroArc::setByTangent ( const ModelHighAPI_RefAttr theTangentPoint,
const std::shared_ptr< GeomAPI_Pnt2d > &  theEnd,
bool  theInversed 
)

Set by tangent and end point.

◆ setByTransversal() [1/2]

void SketchAPI_MacroArc::setByTransversal ( const ModelHighAPI_RefAttr theTransversalPoint,
double  theEndX,
double  theEndY,
bool  theInversed 
)

Set by tangent and end point.

◆ setByTransversal() [2/2]

void SketchAPI_MacroArc::setByTransversal ( const ModelHighAPI_RefAttr theTransversalPoint,
const std::shared_ptr< GeomAPI_Pnt2d > &  theEnd,
bool  theInversed 
)

Set by tangent and end point.

◆ auxiliary()

std::shared_ptr< ModelAPI_AttributeBoolean > SketchAPI_SketchEntity::auxiliary ( ) const
inherited

Auxiliary.

◆ setAuxiliary()

void SketchAPI_SketchEntity::setAuxiliary ( bool  theAuxiliary)
inherited

Set auxiliary.

◆ dump()

void SketchAPI_SketchEntity::dump ( ModelHighAPI_Dumper theDumper) const
virtualinherited

◆ wrap()

std::list< std::shared_ptr< SketchAPI_SketchEntity > > SketchAPI_SketchEntity::wrap ( const std::list< std::shared_ptr< ModelAPI_Feature > > &  theFeatures)
staticinherited

Convert list of features to list of appropriate wrappers.

◆ isCopy()

bool SketchAPI_SketchEntity::isCopy ( ) const
protectedinherited

Check the entity is a copy of another feature.

◆ feature()

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

◆ subFeature()

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

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
inherited

Shortcut for feature()->getKind()

◆ execute()

void ModelHighAPI_Interface::execute ( bool  isForce = false)
inherited

Shortcut for feature()->execute()

Parameters
isForcestart execution of feature instead of sending events

◆ setName()

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

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

◆ name()

std::wstring ModelHighAPI_Interface::name ( ) const
inherited

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

◆ result()

ModelHighAPI_Selection ModelHighAPI_Interface::result ( ) const
virtualinherited

Return firts object of the feature.

◆ results()

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

Return all objects of the feature.

◆ defaultResult()

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

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

◆ throwException()

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

Throw exception to event loop.

◆ attributeGetter()

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

Return name of getter for specified attribute.

Field Documentation

◆ myFeature

std::shared_ptr<ModelAPI_Feature> ModelHighAPI_Interface::myFeature
protectedinherited

feature of this interface

◆ myAttrGetter

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

names of attributes and their getters