From: azv Date: Tue, 30 Aug 2016 08:10:15 +0000 (+0300) Subject: Optimize performance while editing sketch (case for issue #1692) X-Git-Tag: V_2.5.0~111 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=babf5d97fe0898a8fe0dd7390bceb5f861349ad1;p=modules%2Fshaper.git Optimize performance while editing sketch (case for issue #1692) Update only groups of entities which should be recalculated or consist of Fixed constraints only. --- diff --git a/src/SketchSolver/SketchSolver_Group.cpp b/src/SketchSolver/SketchSolver_Group.cpp index 2dbb20336..e8dfdc975 100644 --- a/src/SketchSolver/SketchSolver_Group.cpp +++ b/src/SketchSolver/SketchSolver_Group.cpp @@ -430,14 +430,15 @@ bool SketchSolver_Group::resolveConstraints() aResolved = true; } else if (!isGroupEmpty) { - // Check there are constraints Fixed. If they exist, update parameters by stored values + // Check if the group contains only constraints Fixed, update parameters by stored values + aResolved = true; ConstraintConstraintMap::iterator aCIt = myConstraints.begin(); for (; aCIt != myConstraints.end(); ++aCIt) - if (aCIt->first->getKind() == SketchPlugin_ConstraintRigid::ID()) { - aResolved = true; + if (aCIt->first->getKind() != SketchPlugin_ConstraintRigid::ID()) { + aResolved = false; break; } - if (aCIt != myConstraints.end()) + if (aCIt == myConstraints.end()) myStorage->refresh(); } removeTemporaryConstraints();