SHAPER  9.12.0
ModelHighAPI_Selection Class Reference

Class for filling ModelAPI_AttributeSelection. More...

Inheritance diagram for ModelHighAPI_Selection:
Inheritance graph

Public Types

enum  VariantType {
  VT_Empty , VT_ResultSubShapePair , VT_TypeSubShapeNamePair , VT_TypeInnerPointPair ,
  VT_WeakNamingPair , VT_Filtering
}
 

Public Member Functions

 ModelHighAPI_Selection ()
 Default constructor with empty selection. More...
 
 ModelHighAPI_Selection (const std::shared_ptr< ModelAPI_Result > &theContext, const std::shared_ptr< GeomAPI_Shape > &theSubShape=std::shared_ptr< GeomAPI_Shape >())
 Constructor for result and sub-shape. More...
 
 ModelHighAPI_Selection (const std::string &theType, const std::wstring &theSubShapeName)
 Constructor for sub-shape by the textual Name. More...
 
 ModelHighAPI_Selection (const std::string &theType, const std::shared_ptr< GeomAPI_Pnt > &theSubShapeInnerPoint)
 Constructor for sub-shape by inner point coordinates. More...
 
 ModelHighAPI_Selection (const std::string &theType, const std::list< double > &theSubShapeInnerPoint)
 Constructor for sub-shape by inner point coordinates given by a tuple. More...
 
 ModelHighAPI_Selection (const std::string &theType, const std::wstring &theContextName, const int theIndex)
 Constructor for sub-shape by weak naming identifier. More...
 
virtual ~ModelHighAPI_Selection ()
 Destructor. More...
 
virtual void fillAttribute (const std::shared_ptr< ModelAPI_AttributeSelection > &theAttribute) const
 Fill attribute values. More...
 
virtual void appendToList (const std::shared_ptr< ModelAPI_AttributeSelectionList > &theAttribute) const
 Append to list attribute. More...
 
virtual VariantType variantType () const
 
virtual ResultSubShapePair resultSubShapePair () const
 
virtual TypeSubShapeNamePair typeSubShapeNamePair () const
 
virtual TypeInnerPointPair typeInnerPointPair () const
 
virtual TypeWeakNamingPair typeWeakNamingPair () const
 
virtual std::string shapeType () const
 
void setName (const std::wstring &theName)
 Shortcut for result()->data()->setName() More...
 
std::wstring name () const
 Shortcut for result()->data()->name() More...
 
void setColor (int theRed=0, int theGreen=0, int theBlue=0, bool random=false)
 Change result's color. More...
 
void setDeflection (double theValue)
 Change result's deflection. More...
 
void setTransparency (double theValue)
 Change result's transparency. More...
 
int numberOfSubs () const
 Returns the number of sub-elements. More...
 
ModelHighAPI_Selection subResult (int theIndex) const
 Returns the sub-result by zero-base index. More...
 

Protected Attributes

VariantType myVariantType
 
ResultSubShapePair myResultSubShapePair
 
TypeSubShapeNamePair myTypeSubShapeNamePair
 
TypeInnerPointPair myTypeInnerPointPair
 
TypeWeakNamingPair myWeakNamingPair
 
std::shared_ptr< ModelAPI_FiltersFeaturemyFilterFeature
 

Detailed Description

Class for filling ModelAPI_AttributeSelection.

Constructor & Destructor Documentation

◆ ModelHighAPI_Selection() [1/6]

ModelHighAPI_Selection::ModelHighAPI_Selection ( )

Default constructor with empty selection.

◆ ModelHighAPI_Selection() [2/6]

ModelHighAPI_Selection::ModelHighAPI_Selection ( const std::shared_ptr< ModelAPI_Result > &  theContext,
const std::shared_ptr< GeomAPI_Shape > &  theSubShape = std::shared_ptr<GeomAPI_Shape>() 
)

Constructor for result and sub-shape.

◆ ModelHighAPI_Selection() [3/6]

ModelHighAPI_Selection::ModelHighAPI_Selection ( const std::string &  theType,
const std::wstring &  theSubShapeName 
)

Constructor for sub-shape by the textual Name.

◆ ModelHighAPI_Selection() [4/6]

ModelHighAPI_Selection::ModelHighAPI_Selection ( const std::string &  theType,
const std::shared_ptr< GeomAPI_Pnt > &  theSubShapeInnerPoint 
)

Constructor for sub-shape by inner point coordinates.

◆ ModelHighAPI_Selection() [5/6]

ModelHighAPI_Selection::ModelHighAPI_Selection ( const std::string &  theType,
const std::list< double > &  theSubShapeInnerPoint 
)

Constructor for sub-shape by inner point coordinates given by a tuple.

◆ ModelHighAPI_Selection() [6/6]

ModelHighAPI_Selection::ModelHighAPI_Selection ( const std::string &  theType,
const std::wstring &  theContextName,
const int  theIndex 
)

Constructor for sub-shape by weak naming identifier.

◆ ~ModelHighAPI_Selection()

ModelHighAPI_Selection::~ModelHighAPI_Selection ( )
virtual

Destructor.

Member Function Documentation

◆ fillAttribute()

void ModelHighAPI_Selection::fillAttribute ( const std::shared_ptr< ModelAPI_AttributeSelection > &  theAttribute) const
virtual

Fill attribute values.

◆ appendToList()

void ModelHighAPI_Selection::appendToList ( const std::shared_ptr< ModelAPI_AttributeSelectionList > &  theAttribute) const
virtual

Append to list attribute.

◆ variantType()

ModelHighAPI_Selection::VariantType ModelHighAPI_Selection::variantType ( ) const
virtual
Returns
variant type.

◆ resultSubShapePair()

ResultSubShapePair ModelHighAPI_Selection::resultSubShapePair ( ) const
virtual
Returns
pair of result and sub-shape.

◆ typeSubShapeNamePair()

TypeSubShapeNamePair ModelHighAPI_Selection::typeSubShapeNamePair ( ) const
virtual
Returns
pair of sub-shape type and name.

◆ typeInnerPointPair()

TypeInnerPointPair ModelHighAPI_Selection::typeInnerPointPair ( ) const
virtual
Returns
pair of sub-shape type and inner point to identify sub-shape.

◆ typeWeakNamingPair()

TypeWeakNamingPair ModelHighAPI_Selection::typeWeakNamingPair ( ) const
virtual
Returns
pair of sub-shape type and pair of context name and sub-shape index.

◆ shapeType()

std::string ModelHighAPI_Selection::shapeType ( ) const
virtual
Returns
shape type.

◆ setName()

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

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

◆ name()

std::wstring ModelHighAPI_Selection::name ( ) const

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

◆ setColor()

void ModelHighAPI_Selection::setColor ( int  theRed = 0,
int  theGreen = 0,
int  theBlue = 0,
bool  random = false 
)

Change result's color.

◆ setDeflection()

void ModelHighAPI_Selection::setDeflection ( double  theValue)

Change result's deflection.

◆ setTransparency()

void ModelHighAPI_Selection::setTransparency ( double  theValue)

Change result's transparency.

◆ numberOfSubs()

int ModelHighAPI_Selection::numberOfSubs ( ) const

Returns the number of sub-elements.

◆ subResult()

ModelHighAPI_Selection ModelHighAPI_Selection::subResult ( int  theIndex) const

Returns the sub-result by zero-base index.