From dc56a988584b4b797d33b8d1ad0ee325755af438 Mon Sep 17 00:00:00 2001 From: azv Date: Wed, 1 Jun 2016 16:34:59 +0300 Subject: [PATCH] Update processing Mirror constraint --- src/SketchSolver/SketchSolver_ConstraintMirror.cpp | 10 ++-------- .../SolveSpaceSolver/SolveSpaceSolver_Storage.cpp | 11 +++++------ 2 files changed, 7 insertions(+), 14 deletions(-) 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; } } -- 2.39.2