From: azv Date: Mon, 8 Feb 2016 14:22:29 +0000 (+0300) Subject: Correct processing of the fixed arc in PlaneGCS (issue #1280) X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bd0319f3ac0e135f8f5ec1d3a81167b004d825fe;p=modules%2Fshaper.git Correct processing of the fixed arc in PlaneGCS (issue #1280) --- diff --git a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp index 19d1b321b..eb96bceff 100644 --- a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp +++ b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp @@ -404,8 +404,20 @@ static void getParametersToMove(const EntityWrapperPtr& theEntity, std::set aSubs = theEntity->subEntities(); std::list::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(