From: azv Date: Fri, 25 Dec 2015 09:11:38 +0000 (+0300) Subject: Correct processing parameters in "Multi" constraints X-Git-Tag: V_2.1.0~48 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5e2fa65b68341b718d7469fde02978b80d6abcea;p=modules%2Fshaper.git Correct processing parameters in "Multi" constraints --- diff --git a/src/SketchSolver/SketchSolver_ConstraintMulti.cpp b/src/SketchSolver/SketchSolver_ConstraintMulti.cpp index 8f9e8c046..a445fe7ba 100644 --- a/src/SketchSolver/SketchSolver_ConstraintMulti.cpp +++ b/src/SketchSolver/SketchSolver_ConstraintMulti.cpp @@ -9,6 +9,7 @@ void SketchSolver_ConstraintMulti::getEntitiesAndCopies( std::list< std::list >& theEntAndCopies) { + myAdjusted = false; DataPtr aData = myBaseConstraint->data(); // Lists of objects and number of copies @@ -30,6 +31,9 @@ void SketchSolver_ConstraintMulti::getEntitiesAndCopies( std::list anEntities; // list of transformed entities std::list anObjectList = aRefList->list(); std::list::iterator anObjIt = anObjectList.begin(); + if (myNumberOfCopies + 1 != aRefList->size()) // execute for the feature is not called yet + myNumberOfCopies = aRefList->size() - 1; + while (anObjIt != anObjectList.end()) { anEntities.clear(); for (int i = 0; i <= myNumberOfCopies && anObjIt != anObjectList.end(); ++i, ++anObjIt) { @@ -83,5 +87,6 @@ void SketchSolver_ConstraintMulti::adjustConstraint() for (; anIt != aConstraints.end(); ++anIt) aBuilder->adjustConstraint(*anIt); myStorage->addConstraint(myBaseConstraint, aConstraints); + myAdjusted = true; }