From: azv Date: Thu, 9 Jun 2016 10:19:26 +0000 (+0300) Subject: Inconsistency constraint maintenance (issue #1558) X-Git-Tag: V_2.4.0~123 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0da601303c01e0d4f8d92e3afa8efe806ffd53df;p=modules%2Fshaper.git Inconsistency constraint maintenance (issue #1558) --- diff --git a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp index 2fc9185d2..40c524e94 100644 --- a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp +++ b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp @@ -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 diff --git a/src/SketchSolver/SketchSolver_Group.cpp b/src/SketchSolver/SketchSolver_Group.cpp index 144adbfe3..a39aab6e6 100644 --- a/src/SketchSolver/SketchSolver_Group.cpp +++ b/src/SketchSolver/SketchSolver_Group.cpp @@ -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()) {