]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for the issue #1051
authormpv <mpv@opencascade.com>
Wed, 16 Dec 2015 15:43:45 +0000 (18:43 +0300)
committermpv <mpv@opencascade.com>
Wed, 16 Dec 2015 15:43:45 +0000 (18:43 +0300)
src/Model/Model_BodyBuilder.cpp
src/SketchSolver/SketchSolver_Group.cpp
src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Storage.cpp

index b8ee2d52f97d2c61c851da5f166dab470c36d8b6..e8b3479d78b202275129ab0af0c1f5d21b38d82d 100755 (executable)
@@ -766,11 +766,6 @@ std::shared_ptr<GeomAPI_Shape> Model_BodyBuilder::shape()
     Handle(TNaming_NamedShape) aName;
     if (aShapeLab.FindAttribute(TNaming_NamedShape::GetID(), aName)) {
       TopoDS_Shape aShape = aName->Get();
-      if (aShape.IsNull())
-        std::cout<<"Model_BodyBuilder::shape returns empty shape "<<std::endl;
-      else 
-        std::cout<<"Model_BodyBuilder::shape returns shape "<<&(*(aShape.TShape()))<<" with type "
-          <<aShape.ShapeType()<<std::endl;
       if (!aShape.IsNull()) {
         std::shared_ptr<GeomAPI_Shape> aRes(new GeomAPI_Shape);
         aRes->setImpl(new TopoDS_Shape(aShape));
index fbd8bf5e0f5ee22b86cd708f1ef3566e42268bbd..ee4c2da05af6786761270d0ca593a3c23daec76e 100644 (file)
@@ -199,12 +199,6 @@ bool SketchSolver_Group::updateFeature(FeaturePtr theFeature)
 {
   if (!checkFeatureValidity(theFeature))
     return false;
-  // the external feature always should keep the up to date values, so, 
-  // refresh from the solver is never needed
-  std::shared_ptr<SketchPlugin_Feature> aSketchFeature = 
-    std::dynamic_pointer_cast<SketchPlugin_Feature>(theFeature);
-  if (aSketchFeature.get() && aSketchFeature->isExternal())
-    return false;
 
   myStorage->refresh(true);
   return myStorage->update(theFeature);
index 2a6fb95bf08fb7694c762431a8405c7c92f25b40..04d8fe663bd83c9ddcc48fc26ba3464344b9cb08 100644 (file)
@@ -1708,6 +1708,15 @@ void SolveSpaceSolver_Storage::refresh(bool theFixedOnly) const
   std::list<ParameterWrapperPtr> aParams;
   std::list<ParameterWrapperPtr>::const_iterator aParIt;
   for (; anIt != myAttributeMap.end(); ++anIt) {
+    // the external feature always should keep the up to date values, so, 
+    // refresh from the solver is never needed
+    if (anIt->first.get()) {
+      std::shared_ptr<SketchPlugin_Feature> aSketchFeature = 
+        std::dynamic_pointer_cast<SketchPlugin_Feature>(anIt->first->owner());
+      if (aSketchFeature.get() && aSketchFeature->isExternal())
+        continue;
+    }
+
     // update parameter wrappers and obtain values of attributes
     aParams = anIt->second->parameters();
     double aCoords[3];