]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Solver.h
Salome HOME
Fix incorrect processing of the copied entities after the "Multi" constraint has...
[modules/shaper.git] / src / SketchSolver / PlaneGCSSolver / PlaneGCSSolver_Solver.h
index b019a314c0c16327afb1e738cd3cf3d3c5355013..19faa221b7571eb92d5306897b3d23f385fc9283 100644 (file)
@@ -7,8 +7,8 @@
 #ifndef PlaneGCSSolver_Solver_H_
 #define PlaneGCSSolver_Solver_H_
 
-#include <SketchSolver_IConstraintWrapper.h>
 #include <PlaneGCSSolver_Defs.h>
+#include <PlaneGCSSolver_ConstraintWrapper.h>
 
 #include <GCS.h>
 
@@ -32,16 +32,22 @@ public:
   void clear();
 
   /// \brief Add constraint to the system of equations
-  void addConstraint(GCSConstraintPtr theConstraint, const SketchSolver_ConstraintType theType);
+  void addConstraint(GCSConstraintPtr theConstraint);
 
   /// \brief Remove constraint from the system of equations
   void removeConstraint(ConstraintID theID);
 
   /// \brief Initialize memory for new solver's parameter
   double* createParameter();
+  /// \brief Add parameters created elsewhere
+  void addParameters(const GCS::SET_pD& theParams);
   /// \brief Release memory occupied by parameters
   void removeParameters(const GCS::SET_pD& theParams);
 
+  /// \brief Preliminary initialization of solver (useful for moving a feature).
+  ///        When called, the solve() method does not reinitialize a set of constraints.
+  void initialize();
+
   /// \brief Solve the set of equations
   /// \return identifier whether solution succeeded
   SolveStatus solve();
@@ -52,6 +58,9 @@ public:
   /// \brief Check the constraint is conflicted with others
   bool isConflicting(const ConstraintID& theConstraint) const;
 
+  /// \brief Check conflicting/redundant constraints and DoF
+  void diagnose();
+
   /// \brief Degrees of freedom
   int dof();
 
@@ -64,14 +73,11 @@ private:
   GCS::VEC_pD                  myParameters;     ///< list of unknowns
   ConstraintMap                myConstraints;    ///< list of constraints
 
-  /// IDs of constraints (coincidence, tangency) which will not be treated as conflicting
-  /// if they are reported as redundant
-  GCS::SET_I                   myConstraintIDsNotRedundant;
-
   std::shared_ptr<GCS::System> myEquationSystem; ///< set of equations for solving in FreeGCS
+  bool                         myDiagnoseBeforeSolve; ///< is the diagnostic necessary
+  bool                         myInitilized;     ///< is the system already initialized
 
   GCS::SET_I                   myConflictingIDs; ///< list of IDs of conflicting constraints
-
   /// specifies the conflicting constraints are already collected
   bool                         myConfCollected;