Salome HOME
Redesign Tangency constraint processing to set the Angle constraint for tangent featu...
[modules/shaper.git] / src / SketchSolver / PlaneGCSSolver / PlaneGCSSolver_Solver.cpp
index e9be8a299f31ccd34f080f5eb6185b7489d27f8e..2be2d62b5ac9bc0472d6ecc262b4f4d06c8c9037 100644 (file)
@@ -29,26 +29,16 @@ void PlaneGCSSolver_Solver::clear()
   myDOF = 0;
 }
 
-void PlaneGCSSolver_Solver::addConstraint(GCSConstraintPtr theConstraint,
-                                          const SketchSolver_ConstraintType theType)
+void PlaneGCSSolver_Solver::addConstraint(GCSConstraintPtr theConstraint)
 {
   myEquationSystem->addConstraint(theConstraint.get());
   myConstraints[theConstraint->getTag()].insert(theConstraint);
   myDOF = -1;
-
-  // Workaround: avoid tangent constraint in the list of redundant
-  if (theType == CONSTRAINT_TANGENT_CIRCLE_LINE ||
-      theType == CONSTRAINT_TANGENT_CIRCLE_CIRCLE ||
-      theType == CONSTRAINT_PT_PT_COINCIDENT ||
-      theType == CONSTRAINT_PT_ON_CIRCLE ||
-      theType == CONSTRAINT_PT_ON_LINE)
-    myConstraintIDsNotRedundant.insert(theConstraint->getTag());
 }
 
 void PlaneGCSSolver_Solver::removeConstraint(ConstraintID theID)
 {
   myConstraints.erase(theID);
-  myConstraintIDsNotRedundant.erase(theID);
   if (myConstraints.empty()) {
     myEquationSystem->clear();
     myDOF = (int)myParameters.size();
@@ -132,12 +122,6 @@ void PlaneGCSSolver_Solver::collectConflicting()
   myConflictingIDs.insert(aConflict.begin(), aConflict.end());
 
   myEquationSystem->getRedundant(aConflict);
-  // Workaround: avoid conflicting tangent constraints
-  GCS::VEC_I aTemp = aConflict;
-  aConflict.clear();
-  for (GCS::VEC_I::iterator anIt = aTemp.begin(); anIt != aTemp.end(); ++anIt)
-    if (myConstraintIDsNotRedundant.find(*anIt) == myConstraintIDsNotRedundant.end())
-      aConflict.push_back(*anIt);
   myConflictingIDs.insert(aConflict.begin(), aConflict.end());
 
   myConfCollected = true;