From: azv Date: Thu, 2 Jun 2016 07:24:26 +0000 (+0300) Subject: Conflicting constraints when Translation (issue #1542) X-Git-Tag: V_2.3.1~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1befbb0b34eb487de4b738036260ae660552629c;p=modules%2Fshaper.git Conflicting constraints when Translation (issue #1542) --- diff --git a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp index 36e8bfc9c..0c00e3064 100644 --- a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp +++ b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp @@ -361,6 +361,10 @@ void PlaneGCSSolver_Storage::verifyFixed() void PlaneGCSSolver_Storage::processArc(const EntityWrapperPtr& theArc) { + // no need to constraint a fixed arc + if (theArc->group() == GID_OUTOFGROUP) + return; + // Calculate additional parameters necessary for PlaneGCS const std::list& aSubs = theArc->subEntities(); std::list::const_iterator aSubIt = aSubs.begin(); diff --git a/src/SketchSolver/SketchSolver_Group.cpp b/src/SketchSolver/SketchSolver_Group.cpp index ed6b91239..52ff77c13 100644 --- a/src/SketchSolver/SketchSolver_Group.cpp +++ b/src/SketchSolver/SketchSolver_Group.cpp @@ -328,7 +328,8 @@ bool SketchSolver_Group::resolveConstraints() { bool aResolved = false; bool isGroupEmpty = isEmpty() && myStorage->isEmpty(); - if (myStorage->isNeedToResolve() && (!isGroupEmpty || !myConflictingConstraints.empty())) { + if (myStorage->isNeedToResolve() && + (!isGroupEmpty || !myConflictingConstraints.empty() || myPrevResult == STATUS_FAILED)) { if (!mySketchSolver) mySketchSolver = SketchSolver_Manager::instance()->builder()->createSolver(); @@ -341,7 +342,7 @@ bool SketchSolver_Group::resolveConstraints() try { if (myStorage->hasDuplicatedConstraint()) aResult = STATUS_INCONSISTENT; - else { + else if (!isGroupEmpty) { // To avoid overconstraint situation, we will remove temporary constraints one-by-one // and try to find the case without overconstraint bool isLastChance = false;