Salome HOME
First phase of SketchSolver refactoring
[modules/shaper.git] / src / SketchSolver / SketchSolver_ConstraintCoincidence.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:    SketchSolver_ConstraintCoincidence.h
4 // Created: 29 Mar 2015
5 // Author:  Artem ZHIDKOV
6
7 #ifndef SketchSolver_ConstraintCoincidence_H_
8 #define SketchSolver_ConstraintCoincidence_H_
9
10 #include "SketchSolver.h"
11 #include <SketchSolver_Constraint.h>
12
13 /** \class   SketchSolver_ConstraintCoincidence
14  *  \ingroup Plugins
15  *  \brief   Convert coincidence constraint to SolveSpace structure
16  */
17 class SketchSolver_ConstraintCoincidence : public SketchSolver_Constraint
18 {
19 public:
20   /// Constructor based on SketchPlugin constraint
21   SKETCHSOLVER_EXPORT SketchSolver_ConstraintCoincidence(ConstraintPtr theConstraint) :
22       SketchSolver_Constraint(theConstraint)
23   {}
24
25 ////  /// \brief Tries to remove constraint
26 ////  /// \return \c false, if current constraint contains another SketchPlugin constraints (like for multiple coincidence)
27 ////  virtual bool remove(ConstraintPtr theConstraint = ConstraintPtr());
28
29 ////  /// \brief Checks the constraint is used by current object
30 ////  virtual bool hasConstraint(ConstraintPtr theConstraint) const;
31 ////
32 ////  /// \brief Return list of SketchPlugin constraints attached to this object
33 ////  virtual std::list<ConstraintPtr> constraints() const;
34 ////
35 ////  /// \brief Verifies the two Coincidence constraints are intersects (have shared point)
36 ////  bool isCoincide(std::shared_ptr<SketchSolver_ConstraintCoincidence> theConstraint) const;
37 ////
38 ////  /// \brief Append all data of coincidence constraint to the current
39 ////  void attach(std::shared_ptr<SketchSolver_ConstraintCoincidence> theConstraint);
40
41 protected:
42 ////  /// \brief Converts SketchPlugin constraint to a list of SolveSpace constraints
43 ////  virtual void process();
44
45   /// \brief Generate list of attributes of constraint in order useful for constraints
46   /// \param[out] theValue      numerical characteristic of constraint (e.g. distance)
47   /// \param[out] theAttributes list of attributes to be filled
48   virtual void getAttributes(double& theValue, std::vector<EntityWrapperPtr>& theAttributes);
49
50 ////  /// \brief Generate list of attributes of constraint in order useful for SolveSpace constraints
51 ////  /// \param[out] theValue      numerical characteristic of constraint (e.g. distance)
52 ////  /// \param[out] theAttributes list of attributes to be filled
53 ////  virtual void getAttributes(double& theValue, std::vector<Slvs_hEntity>& theAttributes);
54 ////
55 ////private:
56 ////  /// \brief Creates new coincidence constraint
57 ////  Slvs_hConstraint addConstraint(Slvs_hEntity thePoint1, Slvs_hEntity thePoint2);
58 ////
59 ////  /// \brief Create full SolveSpace structure according to given constraint
60 ////  void addConstraint(ConstraintPtr theConstraint);
61 ////
62 ////  /// \brief Create constraint of point coincident to the line or circle
63 ////  Slvs_hConstraint addPointOnEntity(Slvs_hEntity thePoint, Slvs_hEntity theEntity);
64 ////
65 ////private:
66 ////  int myType; ///< type of constraint (applicable SLVS_C_POINTS_COINCIDENT or SLVS_C_PT_ON_LINE or SLVS_C_PT_ON_CIRCLE)
67 ////  std::map<ConstraintPtr, Slvs_hConstraint> myExtraCoincidence; ///< multiple coincidence of points
68 ////  std::set<AttributePtr> myCoincidentPoints; ///< list of points under the Coincidence constraint
69 };
70
71 #endif