]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Store the rotated values also into the GCS solver. Partial fix for the issue #1184
authormpv <mpv@opencascade.com>
Mon, 28 Dec 2015 09:44:24 +0000 (12:44 +0300)
committermpv <mpv@opencascade.com>
Mon, 28 Dec 2015 09:44:24 +0000 (12:44 +0300)
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Builder.cpp

index 1045b5ecc908dfb872ccc4f05cf698e609220142..fccec67afe7f75637dd77c6c5b4635a50f5f44ef 100644 (file)
@@ -1155,6 +1155,11 @@ static void rotate(EntityWrapperPtr theSource, EntityWrapperPtr theDest,
       double aNewX = aVec->x() * theCos - aVec->y() * theSin;
       double aNewY = aVec->x() * theSin + aVec->y() * theCos;
       aDstAttr->setValue(theCenter->x() + aNewX, theCenter->y() + aNewY);
+      // set also parameters of the solver
+      double aCoord[2] = {aDstAttr->x(), aDstAttr->y()};
+      std::list<ParameterWrapperPtr>::const_iterator aDIt = theDest->parameters().begin();
+      for (int i = 0; aDIt != theDest->parameters().end(); ++aDIt, ++i)
+        (*aDIt)->setValue(aCoord[i]);
     }
     return;
   }