Salome HOME
Pipe validator fix
[modules/shaper.git] / src / SketchSolver / SketchSolver_Group.h
index 7544fbaa2c7600d32348054ea90f37449e15ea96..89a14f49072f636f22721367182e52d385c498a5 100644 (file)
@@ -61,8 +61,11 @@ class SketchSolver_Group
     return mySketch->data() && mySketch->data()->isValid();
   }
 
-  /// \brief Verifies the constraint is complex, i.e. it needs another constraints to be created before
-  static bool isComplexConstraint(FeaturePtr theConstraint);
+  /// \brief Check the group has conflicting constraints
+  inline bool isFailed() const
+  {
+    return !myConflictingConstraints.empty();
+  }
 
   /** \brief Adds or updates a constraint in the group
    *  \param[in] theConstraint constraint to be changed
@@ -152,6 +155,10 @@ private:
   /// \brief Verifies is the feature valid
   bool checkFeatureValidity(FeaturePtr theFeature);
 
+  /// \brief Notify all interested constraints that coincidence appears or removed
+  /// \param[in] theCoincidence  coincidence constraint
+  void notifyCoincidenceChanged(SolverConstraintPtr theCoincidence);
+
 private:
   GroupID  myID; ///< Index of the group
   EntityID myWorkplaneID; ///< Index of workplane, the group is based on
@@ -165,6 +172,7 @@ private:
   SolverPtr mySketchSolver;  ///< Solver for set of equations obtained by constraints
 
   SketchSolver_SolveStatus myPrevResult; ///< Result of previous solution of the set of constraints
+  std::set<ObjectPtr>      myConflictingConstraints; ///< List of conflicting constraints
 };
 
 #endif