20 #ifndef ModelAPI_AttributeSelection_H_
21 #define ModelAPI_AttributeSelection_H_
23 #include "ModelAPI_Attribute.h"
24 #include <ModelAPI_Result.h>
52 const ObjectPtr& theContext,
const std::shared_ptr<GeomAPI_Shape>& theSubShape,
53 const bool theTemporarily =
false) = 0;
58 const ObjectPtr& theContext,
const std::shared_ptr<GeomAPI_Edge>& theEdge,
60 const bool theTemporarily =
false) = 0;
64 const std::shared_ptr<ModelAPI_AttributeSelection>& theSource) = 0;
70 virtual std::shared_ptr<GeomAPI_Shape>
value() = 0;
95 virtual std::wstring
namingName(
const std::wstring& theDefaultValue = L
"") = 0;
98 virtual void setId(
int theID) = 0;
101 virtual void selectSubShape(
const std::string& theType,
const std::wstring& theSubShapeName) = 0;
105 const std::shared_ptr<GeomAPI_Pnt>& thePoint) = 0;
109 const std::wstring& theContextName,
const int theIndex) = 0;
121 MODELAPI_EXPORT
virtual std::wstring
contextName(
const ResultPtr& theContext)
const = 0;
137 typedef std::shared_ptr<ModelAPI_AttributeSelection> AttributeSelectionPtr;
Interface to the edge object.
Definition: GeomAPI_Edge.h:38
3D point defined by three coordinates
Definition: GeomAPI_Pnt.h:38
Attribute that contains reference to the sub-shape of some result, the selected shape.
Definition: ModelAPI_AttributeSelection.h:35
virtual std::shared_ptr< GeomAPI_Shape > value()=0
Returns the selected subshape.
virtual void selectSubShape(const std::string &theType, const std::wstring &theContextName, const int theIndex)=0
Selects sub-shape by weak naming index.
virtual void removeTemporaryValues()=0
Reset temporary stored values.
virtual bool update()=0
Updates the selection due to the changes in the referenced objects.
virtual void setValueCenter(const ObjectPtr &theContext, const std::shared_ptr< GeomAPI_Edge > &theEdge, const CenterType theCenterType, const bool theTemporarily=false)=0
Same as SetValue, but it takes an edge (on circular or elliptic curve) and stores the vertex of the c...
virtual std::string attributeType()
Returns the type of this class of attributes, not static method.
Definition: ModelAPI_AttributeSelection.cpp:23
CenterType
Type of the center of the circular of elliptic edge.
Definition: ModelAPI_AttributeSelection.h:38
@ NOT_CENTER
this is not a center
Definition: ModelAPI_AttributeSelection.h:39
@ CIRCLE_CENTER
center of the circle
Definition: ModelAPI_AttributeSelection.h:40
@ ELLIPSE_SECOND_FOCUS
second focus point of the ellipse
Definition: ModelAPI_AttributeSelection.h:42
@ ELLIPSE_FIRST_FOCUS
first focus point of the ellipse
Definition: ModelAPI_AttributeSelection.h:41
virtual std::shared_ptr< ModelAPI_Feature > contextFeature()=0
Returns the context of the selection if the whole feature was selected.
virtual void combineGeometrical()=0
Makes the current local selection becomes all sub-shapes with same base geometry.
virtual void setId(int theID)=0
Defines an id of the selection.
ModelAPI_AttributeSelection()
Objects are created for features automatically.
Definition: ModelAPI_AttributeSelection.cpp:32
static std::string typeId()
Returns the type of this class of attributes.
Definition: ModelAPI_AttributeSelection.h:85
virtual ResultPtr context()=0
Returns the context of the selection (the whole shape owner)
virtual void updateInHistory(bool &theRemove)=0
Updates the arguments of selection if something was affected by creation or reorder of features upper...
virtual bool setValue(const ObjectPtr &theContext, const std::shared_ptr< GeomAPI_Shape > &theSubShape, const bool theTemporarily=false)=0
Defines the result and its selected sub-shape.
virtual std::wstring namingName(const std::wstring &theDefaultValue=L"")=0
Returns a textual string of the selection.
virtual void selectSubShape(const std::string &theType, const std::wstring &theSubShapeName)=0
Selects sub-shape by the textual Name.
virtual ~ModelAPI_AttributeSelection()
To virtually destroy the fields of successors.
Definition: ModelAPI_AttributeSelection.cpp:28
virtual std::wstring contextName(const ResultPtr &theContext) const =0
Returns the name by context. Adds the part name if the context is located in other document.
virtual bool isGeometricalSelection() const =0
Returns true if is geometrical selection.
virtual void selectValue(const std::shared_ptr< ModelAPI_AttributeSelection > &theSource)=0
Makes this selection attribute selects the same as in theSource selection.
virtual void selectSubShape(const std::string &theType, const std::shared_ptr< GeomAPI_Pnt > &thePoint)=0
Selects sub-shape by its inner point.
virtual bool isInvalid()=0
Returns true if recompute of selection become impossible.
virtual std::shared_ptr< ModelAPI_Object > contextObject()=0
Returns the context of the selection : result or feature.
Generic attribute of the Object.
Definition: ModelAPI_Attribute.h:34