From: azv Date: Tue, 22 Dec 2015 08:41:40 +0000 (+0300) Subject: Remove typo caused a limitation on a number of translated objects X-Git-Tag: V_2.1.0~112 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=dae76b886f0048f06d154b7391d0f4715dea4af2;p=modules%2Fshaper.git Remove typo caused a limitation on a number of translated objects --- diff --git a/src/SketchSolver/SketchSolver_ConstraintMultiTranslation.cpp b/src/SketchSolver/SketchSolver_ConstraintMultiTranslation.cpp index 5a02f901c..dd4bbb0d8 100644 --- a/src/SketchSolver/SketchSolver_ConstraintMultiTranslation.cpp +++ b/src/SketchSolver/SketchSolver_ConstraintMultiTranslation.cpp @@ -46,6 +46,11 @@ void SketchSolver_ConstraintMultiTranslation::process() if (!myErrorMsg.empty()) return; + AttributeStringPtr aMethodTypeAttr = + myBaseConstraint->data()->string(SketchPlugin_MultiTranslation::VALUE_TYPE()); + myIsFullValue = aMethodTypeAttr->value() != "SingleValue"; + + BuilderPtr aBuilder = SketchSolver_Manager::instance()->builder(); std::list aTransConstraints; @@ -56,6 +61,10 @@ void SketchSolver_ConstraintMultiTranslation::process() 0.0, aStartPoint, aEndPoint, *anEntIt); aTransConstraints.insert(aTransConstraints.end(), aNewConstraints.begin(), aNewConstraints.end()); } + std::list::iterator aTCIt = aTransConstraints.begin(); + for (; aTCIt != aTransConstraints.end(); ++ aTCIt) + (*aTCIt)->setIsFullValue(myIsFullValue); + myStorage->addConstraint(myBaseConstraint, aTransConstraints); myAdjusted = false; diff --git a/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Storage.cpp b/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Storage.cpp index 6d7400ddf..35b4cf0cc 100644 --- a/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Storage.cpp +++ b/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Storage.cpp @@ -77,7 +77,7 @@ bool SolveSpaceSolver_Storage::update(ConstraintWrapperPtr theConstraint) for (; anIt != anEntities.end(); ++anIt) { isUpdated = update(*anIt) || isUpdated; // do not update constrained entities for Multi constraints - if (aSlvsConstr.type == SLVS_C_MULTI_ROTATION || aSlvsConstr.type != SLVS_C_MULTI_TRANSLATION) + if (aSlvsConstr.type == SLVS_C_MULTI_ROTATION || aSlvsConstr.type == SLVS_C_MULTI_TRANSLATION) continue; Slvs_hEntity anID = (Slvs_hEntity)(*anIt)->id();