]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #265: Conflicting constraints after aborting of constraint creation
authorazv <azv@opencascade.com>
Tue, 11 Nov 2014 12:47:45 +0000 (15:47 +0300)
committerazv <azv@opencascade.com>
Tue, 11 Nov 2014 12:48:52 +0000 (15:48 +0300)
Changed procedure of finding appropriate group for constraints and entities in the solver

src/SketchSolver/SketchSolver_ConstraintGroup.cpp

index d6550ed528e699d3c4171e0310486326ffec8f92..d0e1d96ac401c354f1c4fe98b1504ba53ecf0845 100644 (file)
@@ -133,6 +133,14 @@ bool SketchSolver_ConstraintGroup::isInteract(
   if (isEmpty())
     return true;
 
+  // Check if the feature is already in the group
+  if (myEntityFeatMap.find(theFeature) != myEntityFeatMap.end())
+    return true;
+  boost::shared_ptr<SketchPlugin_Constraint> aConstr =
+      boost::dynamic_pointer_cast<SketchPlugin_Constraint>(theFeature);
+  if (aConstr && myConstraintMap.find(aConstr) != myConstraintMap.end())
+    return true;
+
   // Go through the attributes and verify if some of them already in the group
   std::list<boost::shared_ptr<ModelAPI_Attribute>> 
       anAttrList = theFeature->data()->attributes(std::string());