Salome HOME
#1095 line does not stop on arc end
[modules/shaper.git] / src / SketchSolver / SketchSolver_ConstraintMulti.cpp
index 0980dab4e5c460be9784fd595d22d727b414cd4a..5be0d2fe596ce718db4c4217312f6c009b6d74f9 100644 (file)
@@ -64,8 +64,8 @@ void SketchSolver_ConstraintMulti::update(ConstraintPtr theConstraint)
   if (!theConstraint || theConstraint == myBaseConstraint) {
     AttributeRefListPtr anInitialRefList = std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(
         myBaseConstraint->attribute(SketchPlugin_Constraint::ENTITY_A()));
-    AttributeIntegerPtr aNbCopies = myBaseConstraint->integer(nameNbCopies());
-    if (anInitialRefList->size() != myNumberOfObjects || aNbCopies->value() != myNumberOfCopies) {
+    AttributeIntegerPtr aNbObjects = myBaseConstraint->integer(nameNbObjects());
+    if (anInitialRefList->size() != myNumberOfObjects || aNbObjects->value()-1 != myNumberOfCopies) {
       remove(myBaseConstraint);
       process();
       return;
@@ -289,7 +289,11 @@ void SketchSolver_ConstraintMulti::checkCoincidence()
               }
           }
         } else {
-          bool isFixed[2] = {isFixed1, isFixed2};
+          bool isFixed[2] = {
+              myStorage->isPointFixed(*anIt1, aFixed1, true),
+              myStorage->isPointFixed(*anIt2, aFixed2, true)
+          };
+
           Slvs_hEntity aPoint[2] = {*anIt1, *anIt2};
           for (int i = 0; i < 2; i++)
             if (!isFixed[i]) {