Salome HOME
bugfix for libSketchSolver.so: removing unresolved symbols from the SketchPlugin
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintParallel.h
1 // File:    SketchPlugin_ConstraintParallel.h
2 // Created: 26 May 2014
3 // Author:  Artem ZHIDKOV
4
5 #ifndef SketchPlugin_ConstraintParallel_H_
6 #define SketchPlugin_ConstraintParallel_H_
7
8 #include "SketchPlugin.h"
9 #include <SketchPlugin_Sketch.h>
10 #include "SketchPlugin_ConstraintBase.h"
11
12
13 #define PARALLEL_COLOR "#ffff00"
14
15 /** \class SketchPlugin_ConstraintParallel
16  *  \ingroup DataModel
17  *  \brief Feature for creation of a new constraint parallelism of two lines
18  *
19  *  These constraint has two attributes:
20  *  SketchPlugin_Constraint::ENTITY_A() and SketchPlugin_Constraint::ENTITY_B()
21  */
22 class SketchPlugin_ConstraintParallel: public SketchPlugin_ConstraintBase
23 {
24 public:
25   /// Parallel constraint kind
26   inline static const std::string& ID()
27   {
28     static const std::string MY_CONSTRAINT_PARALLEL_ID("SketchConstraintParallel");
29     return MY_CONSTRAINT_PARALLEL_ID;
30   }
31   /// \brief Returns the kind of a feature
32   SKETCHPLUGIN_EXPORT virtual const std::string& getKind() 
33   {static std::string MY_KIND = SketchPlugin_ConstraintParallel::ID(); return MY_KIND;}
34
35   /// \brief Creates a new part document if needed
36   SKETCHPLUGIN_EXPORT virtual void execute();
37
38   /// \brief Request for initialization of data model of the feature: adding all attributes
39   SKETCHPLUGIN_EXPORT virtual void initAttributes();
40
41   /// Returns the AIS preview
42   SKETCHPLUGIN_EXPORT virtual AISObjectPtr getAISObject(AISObjectPtr thePrevious);
43
44   /// Moves the feature
45   /// \param theDeltaX the delta for X coordinate is moved
46   /// \param theDeltaY the delta for Y coordinate is moved
47   SKETCHPLUGIN_EXPORT virtual void move(const double theDeltaX, const double theDeltaY);
48
49   /// \brief Use plugin manager for features creation
50   SketchPlugin_ConstraintParallel();
51 };
52
53 #endif