From: azv Date: Fri, 10 Jun 2016 05:51:14 +0000 (+0300) Subject: Show conflicting constraints when fixing constrained entity X-Git-Tag: V_2.4.0~118 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0eb2fee4e4b538420dd56535518c4dfe2855c141;p=modules%2Fshaper.git Show conflicting constraints when fixing constrained entity --- diff --git a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Solver.cpp b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Solver.cpp index 97edb3194..997bc1f4a 100644 --- a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Solver.cpp +++ b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Solver.cpp @@ -71,6 +71,8 @@ SketchSolver_SolveStatus PlaneGCSSolver_Solver::solve() if (aParameters.find(*aPIt) != aParameters.end()) break; if (aPIt == aParams.end()) { + myConflictingIDs.push_back((*aConstrIt)->getTag()); + myConfCollected = true; aResult = GCS::Failed; } } @@ -148,11 +150,12 @@ bool PlaneGCSSolver_Solver::isConflicting(const ConstraintID& theConstraint) con void PlaneGCSSolver_Solver::collectConflicting() { + GCS::VEC_I aConflict; myEquationSystem.getConflicting(myConflictingIDs); + myConflictingIDs.insert(myConflictingIDs.end(), aConflict.begin(), aConflict.end()); - GCS::VEC_I aRedundantID; - myEquationSystem.getRedundant(aRedundantID); - myConflictingIDs.insert(myConflictingIDs.end(), aRedundantID.begin(), aRedundantID.end()); + myEquationSystem.getRedundant(aConflict); + myConflictingIDs.insert(myConflictingIDs.end(), aConflict.begin(), aConflict.end()); myConfCollected = true; } diff --git a/src/SketchSolver/SketchSolver_ConstraintFixed.cpp b/src/SketchSolver/SketchSolver_ConstraintFixed.cpp index 13c2fa50d..c048a8528 100644 --- a/src/SketchSolver/SketchSolver_ConstraintFixed.cpp +++ b/src/SketchSolver/SketchSolver_ConstraintFixed.cpp @@ -107,6 +107,7 @@ bool SketchSolver_ConstraintFixed::remove() } if (aFeature) myStorage->update(aFeature, myGroupID); + myStorage->setNeedToResolve(true); // Remove constraint or base feature if (myBaseConstraint) {