Salome HOME
#1721 Selecting arcs in mirror constraint is too long and removes other edges
[modules/shaper.git] / src / SketchSolver / SketchSolver_ConstraintMulti.h
index 16db54dbde8881cb2178a782c4515850705d8621..5dfc0c1a7a6446336e430fc6c34506e4f63efa7d 100644 (file)
@@ -24,7 +24,8 @@ public:
       SketchSolver_Constraint(theConstraint),
       myNumberOfObjects(0),
       myNumberOfCopies(0),
-      myAdjusted(false)
+      myAdjusted(false),
+      myIsFullValue(false)
   {}
 
   /// \brief Update constraint
@@ -32,6 +33,15 @@ public:
   /// \brief Update constraint
   void update(bool isForce);
 
+  /// \brief Tries to remove constraint
+  /// \return \c false, if current constraint contains another SketchPlugin constraints (like for multiple coincidence)
+  virtual bool remove();
+
+  /// \brief Check the feature is a source or a copy of Multi-constraint
+  virtual bool isUsed(FeaturePtr theFeature) const;
+  /// \brief Check the attribute is used in Multi-constraint
+  virtual bool isUsed(AttributePtr theAttribute) const;
+
 protected:
   /// \brief Converts SketchPlugin constraint to a list of SolveSpace constraints
   virtual void process()
@@ -66,8 +76,11 @@ protected:
 protected:
   int myNumberOfObjects; ///< number of previous initial objects
   int myNumberOfCopies;  ///< number of previous copies of initial objects
+  bool myIsFullValue;    ///< value whether the angle/distance is a full or single for objects
 
   bool myAdjusted; ///< the constraint is already adjusted (to not do it several times)
+
+  std::set<FeaturePtr> myFeatures; ///< list of features and their copies to find whether some of them are disappeared
 };
 
 #endif