From 11e1edd09f71cb6095ee530297d0ae055845f59b Mon Sep 17 00:00:00 2001 From: azv Date: Tue, 11 Nov 2014 15:47:45 +0300 Subject: [PATCH] Issue #265: Conflicting constraints after aborting of constraint creation Changed procedure of finding appropriate group for constraints and entities in the solver --- src/SketchSolver/SketchSolver_ConstraintGroup.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) 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()); -- 2.39.2