20 #ifndef SRC_MODELHIGHAPI_MODELHIGHAPI_SELECTION_H_
21 #define SRC_MODELHIGHAPI_MODELHIGHAPI_SELECTION_H_
24 #include "ModelHighAPI.h"
38 typedef std::pair<std::shared_ptr<ModelAPI_Result>, std::shared_ptr<GeomAPI_Shape> >
40 typedef std::pair<std::string, std::wstring> TypeSubShapeNamePair;
41 typedef std::pair<std::string, std::shared_ptr<GeomAPI_Pnt> > TypeInnerPointPair;
42 typedef std::pair<std::string, std::pair<std::wstring, int> > TypeWeakNamingPair;
53 VT_ResultSubShapePair,
54 VT_TypeSubShapeNamePair,
55 VT_TypeInnerPointPair,
68 const std::shared_ptr<GeomAPI_Shape>& theSubShape =
69 std::shared_ptr<GeomAPI_Shape>());
73 const std::wstring& theSubShapeName);
78 const std::shared_ptr<GeomAPI_Pnt>& theSubShapeInnerPoint);
83 const std::list<double>& theSubShapeInnerPoint);
89 const std::wstring& theContextName,
const int theIndex);
96 MODELHIGHAPI_EXPORT
virtual
97 void fillAttribute(
const std::shared_ptr<ModelAPI_AttributeSelection> & theAttribute)
const;
100 MODELHIGHAPI_EXPORT
virtual
101 void appendToList(
const std::shared_ptr<ModelAPI_AttributeSelectionList> & theAttribute)
const;
129 void setName(
const std::wstring& theName);
133 std::wstring
name()
const;
137 void setColor(
int theRed = 0,
int theGreen = 0,
int theBlue = 0,
bool random =
false);
156 VariantType myVariantType;
157 ResultSubShapePair myResultSubShapePair;
158 TypeSubShapeNamePair myTypeSubShapeNamePair;
159 TypeInnerPointPair myTypeInnerPointPair;
160 TypeWeakNamingPair myWeakNamingPair;
161 std::shared_ptr<ModelAPI_FiltersFeature> myFilterFeature;
3D point defined by three coordinates
Definition: GeomAPI_Pnt.h:38
Interface to the topological shape object.
Definition: GeomAPI_Shape.h:43
Attribute that contains list of references to the sub-shapes with possibility to manage them.
Definition: ModelAPI_AttributeSelectionList.h:37
Attribute that contains reference to the sub-shape of some result, the selected shape.
Definition: ModelAPI_AttributeSelection.h:35
An interface for working with filters in the feature.
Definition: ModelAPI_FiltersFeature.h:33
The result of a feature.
Definition: ModelAPI_Result.h:35
Class for filling ModelAPI_AttributeSelection.
Definition: ModelHighAPI_Selection.h:49
void setName(const std::wstring &theName)
Shortcut for result()->data()->setName()
Definition: ModelHighAPI_Selection.cpp:191
int numberOfSubs() const
Returns the number of sub-elements.
Definition: ModelHighAPI_Selection.cpp:260
ModelHighAPI_Selection subResult(int theIndex) const
Returns the sub-result by zero-base index.
Definition: ModelHighAPI_Selection.cpp:272
virtual VariantType variantType() const
Definition: ModelHighAPI_Selection.cpp:145
std::wstring name() const
Shortcut for result()->data()->name()
Definition: ModelHighAPI_Selection.cpp:202
virtual ~ModelHighAPI_Selection()
Destructor.
Definition: ModelHighAPI_Selection.cpp:82
virtual TypeInnerPointPair typeInnerPointPair() const
Definition: ModelHighAPI_Selection.cpp:163
virtual TypeSubShapeNamePair typeSubShapeNamePair() const
Definition: ModelHighAPI_Selection.cpp:157
virtual std::string shapeType() const
Definition: ModelHighAPI_Selection.cpp:175
virtual void fillAttribute(const std::shared_ptr< ModelAPI_AttributeSelection > &theAttribute) const
Fill attribute values.
Definition: ModelHighAPI_Selection.cpp:87
virtual ResultSubShapePair resultSubShapePair() const
Definition: ModelHighAPI_Selection.cpp:151
virtual void appendToList(const std::shared_ptr< ModelAPI_AttributeSelectionList > &theAttribute) const
Append to list attribute.
Definition: ModelHighAPI_Selection.cpp:117
void setDeflection(double theValue)
Change result's deflection.
Definition: ModelHighAPI_Selection.cpp:236
void setColor(int theRed=0, int theGreen=0, int theBlue=0, bool random=false)
Change result's color.
Definition: ModelHighAPI_Selection.cpp:212
void setTransparency(double theValue)
Change result's transparency.
Definition: ModelHighAPI_Selection.cpp:248
virtual TypeWeakNamingPair typeWeakNamingPair() const
Definition: ModelHighAPI_Selection.cpp:169
ModelHighAPI_Selection()
Default constructor with empty selection.
Definition: ModelHighAPI_Selection.cpp:34