]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Inconsistency constraint maintenance (issue #1558)
authorazv <azv@opencascade.com>
Thu, 9 Jun 2016 10:19:26 +0000 (13:19 +0300)
committerazv <azv@opencascade.com>
Thu, 9 Jun 2016 10:19:26 +0000 (13:19 +0300)
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp
src/SketchSolver/SketchSolver_Group.cpp

index 2fc9185d289eca0e14d39633326e72f58620b502..40c524e9446d9c1bc57342fbe5c211d8876cbb6a 100644 (file)
@@ -149,8 +149,11 @@ bool PlaneGCSSolver_Storage::update(EntityWrapperPtr theEntity)
 
   if (theEntity->baseAttribute()) {
     isUpdated = updateValues(theEntity);
-    if (isUpdated)
+    if (isUpdated) {
       setNeedToResolve(true);
+      if (theEntity->type() == ENTITY_POINT && theEntity->group() != myGroupID)
+        updateCoincident(theEntity);
+    }
   }
 
   // update parameters
index 144adbfe3e40b3b4d2c42ec9f5f3a9f1af4a413f..a39aab6e6a535330fec2df414fbec7dfc3e6fd19 100644 (file)
@@ -254,6 +254,9 @@ void SketchSolver_Group::moveFeature(FeaturePtr theFeature)
   myStorage->blockEvents(true);
   myStorage->refresh(true);
 
+  // Secondly, search attributes of the feature in the list of the Multi constraints and update them
+  updateMultiConstraints(myConstraints, theFeature);
+
   // Then, create temporary Fixed constraint
   SolverConstraintPtr aConstraint = aBuilder->createMovementConstraint(theFeature);
   if (!aConstraint)
@@ -262,9 +265,6 @@ void SketchSolver_Group::moveFeature(FeaturePtr theFeature)
   if (aConstraint->error().empty())
     setTemporary(aConstraint);
 
-  // Secondly, search attributes of the feature in the list of the Multi constraints and update them
-  updateMultiConstraints(myConstraints, theFeature);
-
   // Workaround to process arcs.
   // When move unconstrained arc, add temporary constraint to fix radius.
   if (theFeature->getKind() == SketchPlugin_Arc::ID()) {