## The constructor.
def __init__(self):
ModelAPI.ModelAPI_Feature.__init__(self)
+ ## Shape that will be exported (the compound if there are several exported bodies)
+ self.shape = None
+ ## BRep representation of the exported shape (a stream that will be sent to GEOM and converted to GEOM object)
+ self.brep = None
@staticmethod
## Export kind. Static.
EVENTS_EXPORT static void send(const std::string& theDescription, const void* theSender = 0);
/// Throws a C++ exception about using an empty AIS object
- /// \theDescription an exception information
+ /// \param theDescription an exception information
EVENTS_EXPORT static void throwException(const std::string& theDescription);
protected:
/// Returns true if the object with the shape are in list
/// \param theContext object where the sub-shape was selected
/// \param theSubShape selected sub-shape (if null, the whole context is selected)
+ /// \param theTemporarily if it is true, it checks also the temporary added item
/// \returns true if the pair is found in the attirbute
MODEL_EXPORT virtual bool isInList(
const ResultPtr& theContext, const std::shared_ptr<GeomAPI_Shape>& theSubShape,
return aFace;
}
-int ParseName(const std::string& theSubShapeName, std::list<std::string>& theList)
+size_t ParseName(const std::string& theSubShapeName, std::list<std::string>& theList)
{
std::string aName = theSubShapeName;
std::string aLastName;
- int n1(0), n2(0); // n1 - start position, n2 - position of the delimiter
+ size_t n1(0), n2(0); // n1 - start position, n2 - position of the delimiter
while ((n2 = aName.find('&', n1)) != std::string::npos) {
const std::string aName1 = aName.substr(n1, n2 - n1); //name of face
theList.push_back(aName1);
}
if(aSelection.IsNull()) {
std::list<std::string> aListofNames;
- int n = ParseName(theSubShapeName, aListofNames);
+ size_t n = ParseName(theSubShapeName, aListofNames);
if(n > 1 && n < 5) {
TopTools_ListOfShape aList;
std::list<std::string>::iterator it =aListofNames.begin();
}
if(aSelection.IsNull()) {
std::list<std::string> aListofNames;
- int n = ParseName(theSubShapeName, aListofNames);
+ size_t n = ParseName(theSubShapeName, aListofNames);
if(n > 1 && n < 4) { // 2 || 3
TopTools_ListOfShape aList;
std::list<std::string>::iterator it = aListofNames.begin();
const ModelAPI_ExecState theState);
/// On operation start/end/abort the "Just" fileds must be cleared and processed in the right way
- /// \param theFinish is true for start, close or abort transaction: all objects must be processed
//! \param theFlushRedisplay a boolean value if the redisplay signal should be flushed
void processFeatures(const bool theFlushRedisplay = true);
/// Returns true if the object with the shape are in list
/// \param theContext object where the sub-shape was selected
/// \param theSubShape selected sub-shape (if null, the whole context is selected)
+ /// \param theTemporarily if it is true, it checks also the temporary added item
/// \returns true if the pair is found in the attirbute
virtual bool isInList(
const ResultPtr& theContext, const std::shared_ptr<GeomAPI_Shape>& theSubShape,
MODELAPI_EXPORT void setObject(ObjectPtr theObject);
};
-
+/// Message that sends the sketch solver and sketcher GUI processes to show in the property panel
class ModelAPI_SolverFailedMessage : public Events_Message
{
public:
+ /// Creates an message
MODELAPI_EXPORT ModelAPI_SolverFailedMessage(const Events_ID theID, const void* theSender = 0);
+ /// Default destructor
MODELAPI_EXPORT virtual ~ModelAPI_SolverFailedMessage();
/// Sets list of conflicting constraints
/// Returns the feature is stable or not.
MODELAPI_EXPORT virtual bool isStable();
- /// Performs some functionality for the indes
- /// \param theAttributeId an action key
+ /// Performs some custom feature specific functionality (normally called by some GUI button)
+ /// \param theActionId an action key
/// \return a boolean value about it is performed
MODELAPI_EXPORT virtual bool customAction(const std::string& theActionId);
QAction* XGUI_MenuMgr::buildAction(const std::shared_ptr<Config_FeatureMessage>& theMessage,
const std::string& theWchName, const bool aUseSeparator) const
{
- QAction* anAction;
+ QAction* anAction = 0;
#ifdef HAVE_SALOME
XGUI_SalomeConnector* aSalomeConnector = myWorkshop->salomeConnector();