Salome HOME
Fit incorrect movement of a line which boundary coincident to a point from another...
[modules/shaper.git] / src / SketchSolver / SketchSolver_Storage.cpp
index d4a5171322ad5701bd990264cbe94c8185c8c901..40d1d281f55e1c7afd4f5c8808720c2143833162 100644 (file)
@@ -318,7 +318,7 @@ std::list<Slvs_Constraint> SketchSolver_Storage::getConstraintsByType(int theCon
 }
 
 
-void SketchSolver_Storage::addTemporaryConstraint(const Slvs_hConstraint& theConstraintID)
+void SketchSolver_Storage::addConstraintWhereDragged(const Slvs_hConstraint& theConstraintID)
 {
   if (myFixed != SLVS_E_UNKNOWN)
     return; // the point is already fixed
@@ -327,6 +327,22 @@ void SketchSolver_Storage::addTemporaryConstraint(const Slvs_hConstraint& theCon
     myFixed = theConstraintID;
 }
 
+void SketchSolver_Storage::addTemporaryConstraint(const Slvs_hConstraint& theConstraintID)
+{
+  myTemporaryConstraints.insert(theConstraintID);
+}
+
+void SketchSolver_Storage::removeTemporaryConstraints()
+{
+  myTemporaryConstraints.clear();
+}
+
+bool SketchSolver_Storage::isTemporary(const Slvs_hConstraint& theConstraintID) const
+{
+  return myTemporaryConstraints.find(theConstraintID) != myTemporaryConstraints.end();
+}
+
+
 void SketchSolver_Storage::getRemoved(
     std::set<Slvs_hParam>& theParameters,
     std::set<Slvs_hEntity>& theEntities,