]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Conflicting constraints when Translation (issue #1542)
authorazv <azv@opencascade.com>
Thu, 2 Jun 2016 07:24:26 +0000 (10:24 +0300)
committerazv <azv@opencascade.com>
Thu, 2 Jun 2016 07:25:03 +0000 (10:25 +0300)
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp
src/SketchSolver/SketchSolver_Group.cpp

index 36e8bfc9c7f20e9ca234368f2bda5e9578c24bea..0c00e30646dce550ea5eb2aabbf739e1499a12cf 100644 (file)
@@ -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<EntityWrapperPtr>& aSubs = theArc->subEntities();
   std::list<EntityWrapperPtr>::const_iterator aSubIt = aSubs.begin();
index ed6b912395e013736689a5437b6fce97c01773a8..52ff77c1345b7ea96900403e4ea4048619f0a26b 100644 (file)
@@ -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;