From 9ebdccfdfbd244f6518324b239b51f0e847e08c0 Mon Sep 17 00:00:00 2001 From: azv Date: Mon, 8 Feb 2016 17:22:29 +0300 Subject: [PATCH] Correct processing of the fixed arc in PlaneGCS (issue #1280) --- .../PlaneGCSSolver/PlaneGCSSolver_Storage.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) 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( -- 2.39.2