From: azv Date: Thu, 25 Sep 2014 13:45:12 +0000 (+0400) Subject: Issue #165 fix: Constraints don't work on feature editing (regression) X-Git-Tag: V_0.4.4~12^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7c2d6d545cf1847ec26517b65bc62fe0f8f78042;p=modules%2Fshaper.git Issue #165 fix: Constraints don't work on feature editing (regression) Sub-entities of entities used by constraints affect on constraint recomputing from now --- diff --git a/src/SketchSolver/SketchSolver_ConstraintGroup.cpp b/src/SketchSolver/SketchSolver_ConstraintGroup.cpp index 3fed0f5f9..bfdc89060 100644 --- a/src/SketchSolver/SketchSolver_ConstraintGroup.cpp +++ b/src/SketchSolver/SketchSolver_ConstraintGroup.cpp @@ -322,6 +322,13 @@ bool SketchSolver_ConstraintGroup::changeConstraint( if (aConstrEnt[indAttr] != 0) { int aPos = Search(aConstrEnt[indAttr], myEntities); myEntOfConstr[aPos] = true; + // Sub-entities should be used implcitly + Slvs_hEntity* aEntPtr = myEntities[aPos].point; + while (*aEntPtr != 0) { + aPos = Search(*aEntPtr, myEntities); + myEntOfConstr[aPos] = true; + aEntPtr++; + } } checkConstraintConsistence(*aConstrIter); @@ -393,6 +400,8 @@ Slvs_hEntity SketchSolver_ConstraintGroup::changeEntity( if (isEntExists) { if (!myEntOfConstr[aEntPos]) // the entity is not used by constraints, no need to resolve them myNeedToSolve = isNeedToSolve; + else + myNeedToSolve = myNeedToSolve || isNeedToSolve; return aEntIter->second; }