]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for issue #1174
authorazv <azv@opencascade.com>
Thu, 24 Dec 2015 15:24:36 +0000 (18:24 +0300)
committerazv <azv@opencascade.com>
Thu, 24 Dec 2015 15:48:19 +0000 (18:48 +0300)
src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Storage.cpp

index 51699b90faae6d6d2ddd76a07a2f7ac919a64205..e2cd45ad5ab6af9bcb55fc9e395df8f0d6ac2f6a 100644 (file)
@@ -391,6 +391,13 @@ void SolveSpaceSolver_Storage::replaceInConstraints(
 
       std::shared_ptr<SolveSpaceSolver_ConstraintWrapper> aWrapper =
           std::dynamic_pointer_cast<SolveSpaceSolver_ConstraintWrapper>(*aCIt);
+      if (theSource->id() == theDest->id()) {
+        // No need to update SolveSpace constraint if the entities are the same
+        aWrapper->changeConstraint() = getConstraint((Slvs_hConstraint)aWrapper->id());
+        aWrapper->setEntities(aSubs);
+        continue;
+      }
+
       // change constraint entities
       Slvs_Constraint aConstr = aWrapper->constraint();
       if (aConstr.ptA == (Slvs_hEntity)theSource->id())