20 #ifndef SRC_MODELHIGHAPI_MODELHIGHAPI_INTERFACE_H_
21 #define SRC_MODELHIGHAPI_MODELHIGHAPI_INTERFACE_H_
24 #include "ModelHighAPI.h"
39 typedef std::list<std::shared_ptr<GeomAPI_Shape> > ListOfShape;
57 std::shared_ptr<ModelAPI_Feature>
feature()
const;
62 std::shared_ptr<ModelHighAPI_Interface>
subFeature(
const int theIndex)
const;
66 const std::string&
getKind()
const;
71 void execute(
bool isForce =
false);
75 void setName(
const std::wstring& theName);
79 std::wstring
name()
const;
87 virtual std::list<ModelHighAPI_Selection>
results()
const;
91 virtual std::shared_ptr<ModelAPI_Result>
defaultResult()
const;
106 MODELHIGHAPI_EXPORT
virtual ListOfShape
107 vertices(
const bool theOnlyUnique =
false);
110 MODELHIGHAPI_EXPORT
virtual ListOfShape
111 edges(
const bool theOnlyUnique =
false);
114 MODELHIGHAPI_EXPORT
virtual ListOfShape
115 wires(
const bool theOnlyUnique =
false);
118 MODELHIGHAPI_EXPORT
virtual ListOfShape
119 faces(
const bool theOnlyUnique =
false);
122 MODELHIGHAPI_EXPORT
virtual ListOfShape
123 shells(
const bool theOnlyUnique =
false);
126 MODELHIGHAPI_EXPORT
virtual ListOfShape
127 solids(
const bool theOnlyUnique =
false);
136 typedef std::shared_ptr<ModelHighAPI_Interface> InterfacePtr;
Interface to the topological shape object.
Definition: GeomAPI_Shape.h:43
Feature function that represents the particular functionality of this operation.
Definition: ModelAPI_Feature.h:41
The result of a feature.
Definition: ModelAPI_Result.h:37
Dump engine for the model.
Definition: ModelHighAPI_Dumper.h:81
Base class for feature interfaces.
Definition: ModelHighAPI_Interface.h:46
const std::string & attributeGetter(const std::string &theAttrName)
Return name of getter for specified attribute.
Definition: ModelHighAPI_Interface.cpp:140
std::shared_ptr< ModelHighAPI_Interface > subFeature(const int theIndex) const
If feature is composite return intefrace for sub-feature by zero-based index, or empty pointer if fea...
Definition: ModelHighAPI_Interface.cpp:51
std::shared_ptr< ModelAPI_Feature > myFeature
feature of this interface
Definition: ModelHighAPI_Interface.h:130
std::shared_ptr< ModelAPI_Feature > feature() const
Return ModelAPI_Feature.
Definition: ModelHighAPI_Interface.cpp:46
std::map< std::string, std::string > myAttrGetter
names of attributes and their getters
Definition: ModelHighAPI_Interface.h:132
const std::string & getKind() const
Shortcut for feature()->getKind()
Definition: ModelHighAPI_Interface.cpp:67
ModelHighAPI_Interface(const std::shared_ptr< ModelAPI_Feature > &theFeature)
Constructor.
Definition: ModelHighAPI_Interface.cpp:33
virtual ListOfShape faces(const bool theOnlyUnique=false)
Returns all the faces produced by this feature.
Definition: ModelHighAPI_Interface.cpp:163
virtual ListOfShape wires(const bool theOnlyUnique=false)
Returns all the wires produced by this feature.
Definition: ModelHighAPI_Interface.cpp:157
virtual ModelHighAPI_Selection result() const
Return firts object of the feature.
Definition: ModelHighAPI_Interface.cpp:103
void setName(const std::wstring &theName)
Shortcut for feature()->data()->setName()
Definition: ModelHighAPI_Interface.cpp:89
virtual std::shared_ptr< ModelAPI_Result > defaultResult() const
Return default result. Default implementation feature()->lastResult()
Definition: ModelHighAPI_Interface.cpp:128
std::wstring name() const
Shortcut for feature()->data()->name()
Definition: ModelHighAPI_Interface.cpp:98
virtual void dump(ModelHighAPI_Dumper &) const
Dump wrapped feature.
Definition: ModelHighAPI_Interface.h:103
virtual ListOfShape edges(const bool theOnlyUnique=false)
Returns all the edges produced by this feature.
Definition: ModelHighAPI_Interface.cpp:151
virtual ~ModelHighAPI_Interface()
Destructor.
Definition: ModelHighAPI_Interface.cpp:40
virtual ListOfShape shells(const bool theOnlyUnique=false)
Returns all the shells produced by this feature.
Definition: ModelHighAPI_Interface.cpp:169
virtual std::list< ModelHighAPI_Selection > results() const
Return all objects of the feature.
Definition: ModelHighAPI_Interface.cpp:111
void throwException(const std::string &theDescription)
Throw exception to event loop.
Definition: ModelHighAPI_Interface.cpp:135
void execute(bool isForce=false)
Shortcut for feature()->execute()
Definition: ModelHighAPI_Interface.cpp:72
virtual ListOfShape vertices(const bool theOnlyUnique=false)
Returns all the vertices produced by this feature.
Definition: ModelHighAPI_Interface.cpp:145
virtual ListOfShape solids(const bool theOnlyUnique=false)
Returns all the solids produced by this feature.
Definition: ModelHighAPI_Interface.cpp:175
Class for filling ModelAPI_AttributeSelection.
Definition: ModelHighAPI_Selection.h:49