]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Update processing Mirror constraint
authorazv <azv@opencascade.com>
Wed, 1 Jun 2016 13:34:59 +0000 (16:34 +0300)
committerazv <azv@opencascade.com>
Wed, 1 Jun 2016 13:35:20 +0000 (16:35 +0300)
src/SketchSolver/SketchSolver_ConstraintMirror.cpp
src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Storage.cpp

index 254c16853aa839e087821ce876ade33d3f4032b5..4173be33b95136b36085828c58ac1c1a0ea4c583 100644 (file)
@@ -121,14 +121,8 @@ void SketchSolver_ConstraintMirror::process()
 void SketchSolver_ConstraintMirror::update()
 {
   cleanErrorMsg();
-  AttributeRefListPtr aMirroredRefList = std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(
-    myBaseConstraint->attribute(SketchPlugin_Constraint::ENTITY_C()));
-  if (aMirroredRefList->size() != myNumberOfObjects) {
-    remove();
-    process();
-    return;
-  }
-  adjustConstraint();
+  remove();
+  process();
 }
 
 void SketchSolver_ConstraintMirror::adjustConstraint()
index 202779e197ec04ca02630aa889f8505cf6abf70f..e2c9f5d98d3fc07d057e29a9d2d21b5a3cca3012 100644 (file)
@@ -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;
   }
 }