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-Tag: V_2.2.0~150 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9ebdccfdfbd244f6518324b239b51f0e847e08c0;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(