]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #165 fix: Constraints don't work on feature editing (regression)
authorazv <azv@opencascade.com>
Thu, 25 Sep 2014 13:45:12 +0000 (17:45 +0400)
committerazv <azv@opencascade.com>
Thu, 25 Sep 2014 13:45:12 +0000 (17:45 +0400)
Sub-entities of entities used by constraints affect on constraint recomputing from now

src/SketchSolver/SketchSolver_ConstraintGroup.cpp

index 3fed0f5f95a6a0ba19c1d19079d5e75a8bd9b9d6..bfdc890603e37e5075faa34dd4d5e456020c81cc 100644 (file)
@@ -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;
   }