SHAPER  9.12.0
ConstructionAPI_Plane Class Reference

Interface for Plane feature. More...

Inheritance diagram for ConstructionAPI_Plane:
Inheritance graph

Public Member Functions

 ConstructionAPI_Plane (const std::shared_ptr< ModelAPI_Feature > &theFeature)
 Constructor without values. More...
 
 ConstructionAPI_Plane (const std::shared_ptr< ModelAPI_Feature > &theFeature, const ModelHighAPI_Selection &theFace, const ModelHighAPI_Double &theDistance, const bool theIsReverse, const ModelHighAPI_Integer &theNbCopy=ModelHighAPI_Integer(1))
 Constructor with values. More...
 
 ConstructionAPI_Plane (const std::shared_ptr< ModelAPI_Feature > &theFeature, const ModelHighAPI_Double &theA, const ModelHighAPI_Double &theB, const ModelHighAPI_Double &theC, const ModelHighAPI_Double &theD)
 Constructor with values. More...
 
 ConstructionAPI_Plane (const std::shared_ptr< ModelAPI_Feature > &theFeature, const ModelHighAPI_Selection &thePoint1, const ModelHighAPI_Selection &thePoint2, const ModelHighAPI_Selection &thePoint3)
 Constructor with values. More...
 
 ConstructionAPI_Plane (const std::shared_ptr< ModelAPI_Feature > &theFeature, const ModelHighAPI_Selection &theLine, const ModelHighAPI_Selection &thePoint, const bool theIsPerpendicular)
 Constructor with values. More...
 
 ConstructionAPI_Plane (const std::shared_ptr< ModelAPI_Feature > &theFeature, const ModelHighAPI_Selection &theObject1, const ModelHighAPI_Selection &theObject2)
 Constructor with values. More...
 
 ConstructionAPI_Plane (const std::shared_ptr< ModelAPI_Feature > &theFeature, const ModelHighAPI_Selection &thePlane, const ModelHighAPI_Selection &theAxis, const ModelHighAPI_Double &theAngle, const ModelHighAPI_Integer &theNbCopy=ModelHighAPI_Integer(1))
 Constructor with values. More...
 
virtual ~ConstructionAPI_Plane ()
 Destructor. More...
 
virtual std::string getID ()
 
virtual std::shared_ptr< ModelAPI_AttributeStringcreationMethod () const
 Creation method. More...
 
virtual std::shared_ptr< ModelAPI_AttributeDoubleA () const
 Parameter A for general equation. More...
 
virtual std::shared_ptr< ModelAPI_AttributeDoubleB () const
 Parameter B for general equation. More...
 
virtual std::shared_ptr< ModelAPI_AttributeDoubleC () const
 Parameter C for general equation. More...
 
virtual std::shared_ptr< ModelAPI_AttributeDoubleD () const
 Parameter D for general equation. More...
 
virtual std::shared_ptr< ModelAPI_AttributeSelectionpoint1 () const
 Point 1 for plane. More...
 
virtual std::shared_ptr< ModelAPI_AttributeSelectionpoint2 () const
 Point 2 for plane. More...
 
virtual std::shared_ptr< ModelAPI_AttributeSelectionpoint3 () const
 Point 3 for plane. More...
 
virtual std::shared_ptr< ModelAPI_AttributeSelectionline () const
 Line for plane. More...
 
virtual std::shared_ptr< ModelAPI_AttributeSelectionpoint () const
 Point for plane. More...
 
virtual std::shared_ptr< ModelAPI_AttributeBooleanperpendicular () const
 Perpendicular flag. More...
 
virtual std::shared_ptr< ModelAPI_AttributeStringcreationMethodByOtherPlane () const
 Creation method by other plane. More...
 
virtual std::shared_ptr< ModelAPI_AttributeSelectionplane () const
 Plane face. More...
 
virtual std::shared_ptr< ModelAPI_AttributeDoubledistance () const
 Distance. More...
 
virtual std::shared_ptr< ModelAPI_AttributeBooleanreverse () const
 Reverse flag. More...
 
virtual std::shared_ptr< ModelAPI_AttributeSelectioncoincidentPoint () const
 Coincident point. More...
 
virtual std::shared_ptr< ModelAPI_AttributeSelectionaxis () const
 Axis for rotation. More...
 
virtual std::shared_ptr< ModelAPI_AttributeDoubleangle () const
 Rotation angle. More...
 
virtual std::shared_ptr< ModelAPI_AttributeSelectionplane1 () const
 Plane 1. More...
 
virtual std::shared_ptr< ModelAPI_AttributeSelectionplane2 () const
 Plane 2. More...
 
virtual std::shared_ptr< ModelAPI_AttributeIntegernbcopy () const
 Number of copies. More...
 
void setByFaceAndDistance (const ModelHighAPI_Selection &theFace, const ModelHighAPI_Double &theDistance, const bool theIsReverse, const ModelHighAPI_Integer &theNbCopy=ModelHighAPI_Integer(1))
 Set face and distance. More...
 
void setByGeneralEquation (const ModelHighAPI_Double &theA, const ModelHighAPI_Double &theB, const ModelHighAPI_Double &theC, const ModelHighAPI_Double &theD)
 Set GeneralEquation parameters of the feature. More...
 
void setByThreePoints (const ModelHighAPI_Selection &thePoint1, const ModelHighAPI_Selection &thePoint2, const ModelHighAPI_Selection &thePoint3)
 Set by three points. More...
 
void setByLineAndPoint (const ModelHighAPI_Selection &theLine, const ModelHighAPI_Selection &thePoint, const bool theIsPerpendicular)
 Set by line and point. More...
 
void setByTwoParallelPlanes (const ModelHighAPI_Selection &thePlane1, const ModelHighAPI_Selection &thePlane2)
 Set by two parallel planes. More...
 
void setByCoincidentToPoint (const ModelHighAPI_Selection &thePlane, const ModelHighAPI_Selection &thePoint)
 Set by coincident to point. More...
 
void setByRotation (const ModelHighAPI_Selection &thePlane, const ModelHighAPI_Selection &theAxis, const ModelHighAPI_Double &theAngle, const ModelHighAPI_Integer &theNbCopy=ModelHighAPI_Integer(1))
 Set by rotation. 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_AttributeStringmycreationMethod
 
std::shared_ptr< ModelAPI_AttributeDoublemyA
 
std::shared_ptr< ModelAPI_AttributeDoublemyB
 
std::shared_ptr< ModelAPI_AttributeDoublemyC
 
std::shared_ptr< ModelAPI_AttributeDoublemyD
 
std::shared_ptr< ModelAPI_AttributeSelectionmypoint1
 
std::shared_ptr< ModelAPI_AttributeSelectionmypoint2
 
std::shared_ptr< ModelAPI_AttributeSelectionmypoint3
 
std::shared_ptr< ModelAPI_AttributeSelectionmyline
 
std::shared_ptr< ModelAPI_AttributeSelectionmypoint
 
std::shared_ptr< ModelAPI_AttributeBooleanmyperpendicular
 
std::shared_ptr< ModelAPI_AttributeStringmycreationMethodByOtherPlane
 
std::shared_ptr< ModelAPI_AttributeSelectionmyplane
 
std::shared_ptr< ModelAPI_AttributeDoublemydistance
 
std::shared_ptr< ModelAPI_AttributeBooleanmyreverse
 
std::shared_ptr< ModelAPI_AttributeSelectionmycoincidentPoint
 
std::shared_ptr< ModelAPI_AttributeSelectionmyaxis
 
std::shared_ptr< ModelAPI_AttributeDoublemyangle
 
std::shared_ptr< ModelAPI_AttributeSelectionmyplane1
 
std::shared_ptr< ModelAPI_AttributeSelectionmyplane2
 
std::shared_ptr< ModelAPI_AttributeIntegermynbcopy
 
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 Plane feature.

Constructor & Destructor Documentation

◆ ConstructionAPI_Plane() [1/7]

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

Constructor without values.

◆ ConstructionAPI_Plane() [2/7]

ConstructionAPI_Plane::ConstructionAPI_Plane ( const std::shared_ptr< ModelAPI_Feature > &  theFeature,
const ModelHighAPI_Selection theFace,
const ModelHighAPI_Double theDistance,
const bool  theIsReverse,
const ModelHighAPI_Integer theNbCopy = ModelHighAPI_Integer(1) 
)

Constructor with values.

◆ ConstructionAPI_Plane() [3/7]

ConstructionAPI_Plane::ConstructionAPI_Plane ( const std::shared_ptr< ModelAPI_Feature > &  theFeature,
const ModelHighAPI_Double theA,
const ModelHighAPI_Double theB,
const ModelHighAPI_Double theC,
const ModelHighAPI_Double theD 
)

Constructor with values.

◆ ConstructionAPI_Plane() [4/7]

ConstructionAPI_Plane::ConstructionAPI_Plane ( const std::shared_ptr< ModelAPI_Feature > &  theFeature,
const ModelHighAPI_Selection thePoint1,
const ModelHighAPI_Selection thePoint2,
const ModelHighAPI_Selection thePoint3 
)

Constructor with values.

◆ ConstructionAPI_Plane() [5/7]

ConstructionAPI_Plane::ConstructionAPI_Plane ( const std::shared_ptr< ModelAPI_Feature > &  theFeature,
const ModelHighAPI_Selection theLine,
const ModelHighAPI_Selection thePoint,
const bool  theIsPerpendicular 
)

Constructor with values.

◆ ConstructionAPI_Plane() [6/7]

ConstructionAPI_Plane::ConstructionAPI_Plane ( const std::shared_ptr< ModelAPI_Feature > &  theFeature,
const ModelHighAPI_Selection theObject1,
const ModelHighAPI_Selection theObject2 
)

Constructor with values.

◆ ConstructionAPI_Plane() [7/7]

ConstructionAPI_Plane::ConstructionAPI_Plane ( const std::shared_ptr< ModelAPI_Feature > &  theFeature,
const ModelHighAPI_Selection thePlane,
const ModelHighAPI_Selection theAxis,
const ModelHighAPI_Double theAngle,
const ModelHighAPI_Integer theNbCopy = ModelHighAPI_Integer(1) 
)

Constructor with values.

◆ ~ConstructionAPI_Plane()

ConstructionAPI_Plane::~ConstructionAPI_Plane ( )
virtual

Destructor.

Member Function Documentation

◆ creationMethod()

virtual std::shared_ptr< ModelAPI_AttributeString > ConstructionAPI_Plane::creationMethod ( ) const
inlinevirtual

Creation method.

◆ A()

virtual std::shared_ptr< ModelAPI_AttributeDouble > ConstructionAPI_Plane::A ( ) const
inlinevirtual

Parameter A for general equation.

◆ B()

virtual std::shared_ptr< ModelAPI_AttributeDouble > ConstructionAPI_Plane::B ( ) const
inlinevirtual

Parameter B for general equation.

◆ C()

virtual std::shared_ptr< ModelAPI_AttributeDouble > ConstructionAPI_Plane::C ( ) const
inlinevirtual

Parameter C for general equation.

◆ D()

virtual std::shared_ptr< ModelAPI_AttributeDouble > ConstructionAPI_Plane::D ( ) const
inlinevirtual

Parameter D for general equation.

◆ point1()

virtual std::shared_ptr< ModelAPI_AttributeSelection > ConstructionAPI_Plane::point1 ( ) const
inlinevirtual

Point 1 for plane.

◆ point2()

virtual std::shared_ptr< ModelAPI_AttributeSelection > ConstructionAPI_Plane::point2 ( ) const
inlinevirtual

Point 2 for plane.

◆ point3()

virtual std::shared_ptr< ModelAPI_AttributeSelection > ConstructionAPI_Plane::point3 ( ) const
inlinevirtual

Point 3 for plane.

◆ line()

virtual std::shared_ptr< ModelAPI_AttributeSelection > ConstructionAPI_Plane::line ( ) const
inlinevirtual

Line for plane.

◆ point()

virtual std::shared_ptr< ModelAPI_AttributeSelection > ConstructionAPI_Plane::point ( ) const
inlinevirtual

Point for plane.

◆ perpendicular()

virtual std::shared_ptr< ModelAPI_AttributeBoolean > ConstructionAPI_Plane::perpendicular ( ) const
inlinevirtual

Perpendicular flag.

◆ creationMethodByOtherPlane()

virtual std::shared_ptr< ModelAPI_AttributeString > ConstructionAPI_Plane::creationMethodByOtherPlane ( ) const
inlinevirtual

Creation method by other plane.

◆ plane()

virtual std::shared_ptr< ModelAPI_AttributeSelection > ConstructionAPI_Plane::plane ( ) const
inlinevirtual

Plane face.

◆ distance()

virtual std::shared_ptr< ModelAPI_AttributeDouble > ConstructionAPI_Plane::distance ( ) const
inlinevirtual

Distance.

◆ reverse()

virtual std::shared_ptr< ModelAPI_AttributeBoolean > ConstructionAPI_Plane::reverse ( ) const
inlinevirtual

Reverse flag.

◆ coincidentPoint()

virtual std::shared_ptr< ModelAPI_AttributeSelection > ConstructionAPI_Plane::coincidentPoint ( ) const
inlinevirtual

Coincident point.

◆ axis()

virtual std::shared_ptr< ModelAPI_AttributeSelection > ConstructionAPI_Plane::axis ( ) const
inlinevirtual

Axis for rotation.

◆ angle()

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

Rotation angle.

◆ plane1()

virtual std::shared_ptr< ModelAPI_AttributeSelection > ConstructionAPI_Plane::plane1 ( ) const
inlinevirtual

Plane 1.

◆ plane2()

virtual std::shared_ptr< ModelAPI_AttributeSelection > ConstructionAPI_Plane::plane2 ( ) const
inlinevirtual

Plane 2.

◆ nbcopy()

virtual std::shared_ptr< ModelAPI_AttributeInteger > ConstructionAPI_Plane::nbcopy ( ) const
inlinevirtual

Number of copies.

◆ setByFaceAndDistance()

void ConstructionAPI_Plane::setByFaceAndDistance ( const ModelHighAPI_Selection theFace,
const ModelHighAPI_Double theDistance,
const bool  theIsReverse,
const ModelHighAPI_Integer theNbCopy = ModelHighAPI_Integer(1) 
)

Set face and distance.

◆ setByGeneralEquation()

void ConstructionAPI_Plane::setByGeneralEquation ( const ModelHighAPI_Double theA,
const ModelHighAPI_Double theB,
const ModelHighAPI_Double theC,
const ModelHighAPI_Double theD 
)

Set GeneralEquation parameters of the feature.

◆ setByThreePoints()

void ConstructionAPI_Plane::setByThreePoints ( const ModelHighAPI_Selection thePoint1,
const ModelHighAPI_Selection thePoint2,
const ModelHighAPI_Selection thePoint3 
)

Set by three points.

◆ setByLineAndPoint()

void ConstructionAPI_Plane::setByLineAndPoint ( const ModelHighAPI_Selection theLine,
const ModelHighAPI_Selection thePoint,
const bool  theIsPerpendicular 
)

Set by line and point.

◆ setByTwoParallelPlanes()

void ConstructionAPI_Plane::setByTwoParallelPlanes ( const ModelHighAPI_Selection thePlane1,
const ModelHighAPI_Selection thePlane2 
)

Set by two parallel planes.

◆ setByCoincidentToPoint()

void ConstructionAPI_Plane::setByCoincidentToPoint ( const ModelHighAPI_Selection thePlane,
const ModelHighAPI_Selection thePoint 
)

Set by coincident to point.

◆ setByRotation()

void ConstructionAPI_Plane::setByRotation ( const ModelHighAPI_Selection thePlane,
const ModelHighAPI_Selection theAxis,
const ModelHighAPI_Double theAngle,
const ModelHighAPI_Integer theNbCopy = ModelHighAPI_Integer(1) 
)

Set by rotation.

◆ dump()

void ConstructionAPI_Plane::dump ( ModelHighAPI_Dumper theDumper) const
virtual

Dump wrapped feature.

Reimplemented from ModelHighAPI_Interface.

◆ 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