]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Tuning the python console commands execution
authormpv <mikhail.ponikarov@opencascade.com>
Mon, 15 Sep 2014 07:42:15 +0000 (11:42 +0400)
committermpv <mikhail.ponikarov@opencascade.com>
Mon, 15 Sep 2014 07:42:15 +0000 (11:42 +0400)
src/Model/Model_Document.cpp
src/ModelAPI/ModelAPI.i
src/ModelAPI/ModelAPI_Validator.h

index 7a2ca8542a9ca14ef1ebd0337d6b68861e57cd3b..cb5d283942c06fad20d8fc8286e78db7b56dacc0 100644 (file)
@@ -417,6 +417,9 @@ FeaturePtr Model_Document::addFeature(std::string theID)
       // event: feature is added
       static Events_ID anEvent = Events_Loop::eventByName(EVENT_OBJECT_CREATED);
       ModelAPI_EventCreator::get()->sendUpdated(aFeature, anEvent);
+    } else { // feature must be executed
+       // no creation event => updater not working, problem with remove part
+      aFeature->execute();
     }
   }
   return aFeature;
index c8fddd2f80a00c3f695fb563f26e7fd0ce238616..dd78318e0dae2510ce5bea4d7ae57751274a19cb 100644 (file)
@@ -20,6 +20,8 @@
   #include "ModelAPI_AttributeRefList.h"
   #include "ModelAPI_Result.h"
   #include "ModelAPI_ResultConstruction.h"
+  #include "ModelAPI_ResultBody.h"
+  #include "ModelAPI_ResultPart.h"
   
   template<class T> boost::shared_ptr<T> castTo(boost::shared_ptr<ModelAPI_Result> theObject) 
   { 
@@ -58,6 +60,8 @@
 %shared_ptr(ModelAPI_AttributeRefList)
 %shared_ptr(ModelAPI_Result)
 %shared_ptr(ModelAPI_ResultConstruction)
+%shared_ptr(ModelAPI_ResultBody)
+%shared_ptr(ModelAPI_ResultPart)
 
 // all supported interfaces
 %include "GeomAPI_Interface.h"
 %include "ModelAPI_AttributeRefList.h"
 %include "ModelAPI_Result.h"
 %include "ModelAPI_ResultConstruction.h"
+%include "ModelAPI_ResultBody.h"
+%include "ModelAPI_ResultPart.h"
 
 %template(ObjectList) std::list<boost::shared_ptr<ModelAPI_Object> >;
 %template(ResultList) std::list<boost::shared_ptr<ModelAPI_Result> >;
 
 template<class T> boost::shared_ptr<T> castTo(boost::shared_ptr<ModelAPI_Result> theObject);
 %template(modelAPI_ResultConstruction) castTo<ModelAPI_ResultConstruction>;
+%template(modelAPI_ResultBody) castTo<ModelAPI_ResultBody>;
+%template(modelAPI_ResultPart) castTo<ModelAPI_ResultPart>;
index f4ecd19237962db93ece8d287c2bdc49358719c5..9c83a9d7e3f4c63e9dda372255a40dc0a70eaab2 100644 (file)
@@ -29,13 +29,6 @@ class MODELAPI_EXPORT ModelAPI_Validator
   virtual ~ModelAPI_Validator()
   {
   }
-
-  /// Returns true if feature and/or attributes are valid
-  /// \param theFeature the validated feature
-  /// \param theAttr the validated attribute ID, empty string of feature is validated
-  /// \param theArguments list of string, feature attribute names: dependent attributes
-  //virtual bool validate(const boost::shared_ptr<ModelAPI_Feature>& theFeature,
-  //  const std::string theAttr, std::list<std::string> theArguments) const = 0;
 };
 
 typedef boost::shared_ptr<ModelAPI_Validator> ValidatorPtr;