]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Remove typo caused a limitation on a number of translated objects
authorazv <azv@opencascade.com>
Tue, 22 Dec 2015 08:41:40 +0000 (11:41 +0300)
committerazv <azv@opencascade.com>
Tue, 22 Dec 2015 08:42:05 +0000 (11:42 +0300)
src/SketchSolver/SketchSolver_ConstraintMultiTranslation.cpp
src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Storage.cpp

index 5a02f901c9a74e1b34f0e0d24d06ae59e45bcf23..dd4bbb0d8a9c4d71249081b28f8d2af3465c1c33 100644 (file)
@@ -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<ConstraintWrapperPtr> aTransConstraints;
 
@@ -56,6 +61,10 @@ void SketchSolver_ConstraintMultiTranslation::process()
         0.0, aStartPoint, aEndPoint, *anEntIt);
     aTransConstraints.insert(aTransConstraints.end(), aNewConstraints.begin(), aNewConstraints.end());
   }
+  std::list<ConstraintWrapperPtr>::iterator aTCIt = aTransConstraints.begin();
+  for (; aTCIt != aTransConstraints.end(); ++ aTCIt)
+    (*aTCIt)->setIsFullValue(myIsFullValue);
+
   myStorage->addConstraint(myBaseConstraint, aTransConstraints);
 
   myAdjusted = false;
index 6d7400ddf2d9902a8e0a6498ba3cc3678ac3a641..35b4cf0cc18db7c270ae1eda77cf2c0e33ca0889 100644 (file)
@@ -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();