From dae76b886f0048f06d154b7391d0f4715dea4af2 Mon Sep 17 00:00:00 2001 From: azv Date: Tue, 22 Dec 2015 11:41:40 +0300 Subject: [PATCH] Remove typo caused a limitation on a number of translated objects --- .../SketchSolver_ConstraintMultiTranslation.cpp | 9 +++++++++ .../SolveSpaceSolver/SolveSpaceSolver_Storage.cpp | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) 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(); -- 2.39.2