From: azv Date: Tue, 11 Nov 2014 12:47:45 +0000 (+0300) Subject: Issue #265: Conflicting constraints after aborting of constraint creation X-Git-Tag: V_0.5~1^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=11e1edd09f71cb6095ee530297d0ae055845f59b;p=modules%2Fshaper.git Issue #265: Conflicting constraints after aborting of constraint creation Changed procedure of finding appropriate group for constraints and entities in the solver --- diff --git a/src/SketchSolver/SketchSolver_ConstraintGroup.cpp b/src/SketchSolver/SketchSolver_ConstraintGroup.cpp index d6550ed52..d0e1d96ac 100644 --- a/src/SketchSolver/SketchSolver_ConstraintGroup.cpp +++ b/src/SketchSolver/SketchSolver_ConstraintGroup.cpp @@ -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 aConstr = + boost::dynamic_pointer_cast(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> anAttrList = theFeature->data()->attributes(std::string());