Salome HOME
Issue #725 - Translation with parameters - wrong coordinates
[modules/shaper.git] / src / SketchSolver / SketchSolver_ConstraintManager.h
index c37637a3968fba3568ce5d8abbbd810218e2aa85..a2d7ffaffe580a08ca944a71938b56dfae64092d 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
 // File:    SketchSolver_ConstraintManager.h
 // Created: 08 May 2014
 // Author:  Artem ZHIDKOV
@@ -7,7 +9,7 @@
 
 #include "SketchSolver.h"
 #include <SketchSolver_Solver.h>
-#include <SketchSolver_ConstraintGroup.h>
+#include <SketchSolver_Group.h>
 
 #include <Events_Listener.h>
 #include <SketchPlugin_Constraint.h>
@@ -21,7 +23,7 @@
 #include <set>
 
 /** \class   SketchSolver_ConstraintManager
- *  \ingroup DataModel
+ *  \ingroup Plugins
  *  \brief   Listens the changes of SketchPlugin features and transforms the Constraint
  *           feature into the format understandable by SolveSpace library.
  *
@@ -65,7 +67,7 @@ class SketchSolver_ConstraintManager : public Events_Listener
    *  \return \c true if the workplane changed successfully
    *  \remark Type of theSketch is not verified inside
    */
-  bool changeWorkplane(std::shared_ptr<ModelAPI_CompositeFeature> theSketch);
+  bool changeWorkplane(CompositeFeaturePtr theSketch);
 
   /** \brief Removes a workplane from the manager.
    *         All groups based on such workplane will be removed too.
@@ -74,14 +76,15 @@ class SketchSolver_ConstraintManager : public Events_Listener
    */
   bool removeWorkplane(std::shared_ptr<SketchPlugin_Sketch> theSketch);
 
-  /** \brief Updates entity which is neither workplane nor constraint
+  /** \brief Updates entity which is moved in GUI
    *  \param[in] theFeature entity to be updated
    */
-  void updateEntity(std::shared_ptr<SketchPlugin_Feature> theFeature);
+  void moveEntity(std::shared_ptr<SketchPlugin_Feature> theFeature);
 
   /** \brief Goes through the list of groups and solve the constraints
+   *  \param theForceUpdate flushes the update event in any case: something changed or not
    */
-  void resolveConstraints();
+  void resolveConstraints(const bool theForceUpdate);
 
  private:
   /** \brief Searches list of groups which interact with specified feature
@@ -100,7 +103,7 @@ class SketchSolver_ConstraintManager : public Events_Listener
 
  private:
   static SketchSolver_ConstraintManager* _self;  ///< Self pointer to implement singleton functionality
-  std::vector<SketchSolver_ConstraintGroup*> myGroups;  ///< Groups of constraints
+  std::vector<SketchSolver_Group*> myGroups;  ///< Groups of constraints
   /// true if computation is performed and all "updates" are generated by this algo
   /// and needs no recomputation
   bool myIsComputed;