]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Correct processing of the fixed arc in PlaneGCS (issue #1280)
authorazv <azv@opencascade.com>
Mon, 8 Feb 2016 14:22:29 +0000 (17:22 +0300)
committerazv <azv@opencascade.com>
Mon, 8 Feb 2016 14:22:29 +0000 (17:22 +0300)
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp

index 19d1b321b8b6f35603d6185783b1da7a52a55934..eb96bceff1145e6d70110c62769b424a4c03b1f1 100644 (file)
@@ -404,8 +404,20 @@ static void getParametersToMove(const EntityWrapperPtr& theEntity, std::set<doub
 
   const std::list<EntityWrapperPtr> aSubs = theEntity->subEntities();
   std::list<EntityWrapperPtr>::const_iterator aSIt = aSubs.begin();
-  for (; aSIt != aSubs.end(); ++aSIt)
-    getParametersToMove(*aSIt, theParamList);
+
+  if (theEntity->type() == ENTITY_ARC) {
+    // workaround for the arc processing, because the arc is fixed by a set of constraints,
+    // which will conflict with all parameters fixed:
+    // 1. take center
+    getParametersToMove(*aSIt++, theParamList);
+    // 2. take start point
+    getParametersToMove(*aSIt++, theParamList);
+    // 3. skip end point, radius and start angle, but take end angle parameter
+    getParametersToMove(*(++aSIt), theParamList);
+  } else {
+    for (; aSIt != aSubs.end(); ++aSIt)
+      getParametersToMove(*aSIt, theParamList);
+  }
 }
 
 void PlaneGCSSolver_Storage::toggleEntity(