From: azv Date: Wed, 1 Jun 2016 13:34:59 +0000 (+0300) Subject: Update processing Mirror constraint X-Git-Tag: V_2.3.1~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=dc56a988584b4b797d33b8d1ad0ee325755af438;p=modules%2Fshaper.git Update processing Mirror constraint --- diff --git a/src/SketchSolver/SketchSolver_ConstraintMirror.cpp b/src/SketchSolver/SketchSolver_ConstraintMirror.cpp index 254c16853..4173be33b 100644 --- a/src/SketchSolver/SketchSolver_ConstraintMirror.cpp +++ b/src/SketchSolver/SketchSolver_ConstraintMirror.cpp @@ -121,14 +121,8 @@ void SketchSolver_ConstraintMirror::process() void SketchSolver_ConstraintMirror::update() { cleanErrorMsg(); - AttributeRefListPtr aMirroredRefList = std::dynamic_pointer_cast( - myBaseConstraint->attribute(SketchPlugin_Constraint::ENTITY_C())); - if (aMirroredRefList->size() != myNumberOfObjects) { - remove(); - process(); - return; - } - adjustConstraint(); + remove(); + process(); } void SketchSolver_ConstraintMirror::adjustConstraint() diff --git a/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Storage.cpp b/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Storage.cpp index 202779e19..e2c9f5d98 100644 --- a/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Storage.cpp +++ b/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Storage.cpp @@ -248,13 +248,12 @@ void SolveSpaceSolver_Storage::changeGroup(EntityWrapperPtr theEntity, const Gro for (; aSIt != aSubs.end(); ++aSIt) changeGroup(*aSIt, theGroup); - if (theEntity->group() != theGroup) { - theEntity->setGroup(theGroup); - int aPos = Search((Slvs_hEntity)theEntity->id(), myEntities); - if (aPos >= 0 && aPos < (int)myEntities.size()) { - myEntities[aPos].group = (Slvs_hGroup)theGroup; + theEntity->setGroup(theGroup); + int aPos = Search((Slvs_hEntity)theEntity->id(), myEntities); + if (aPos >= 0 && aPos < (int)myEntities.size()) { + if (myEntities[aPos].group != (Slvs_hGroup)theGroup) setNeedToResolve(true); - } + myEntities[aPos].group = (Slvs_hGroup)theGroup; } }