]> SALOME platform Git repositories - modules/shaper.git/blob - src/SketchPlugin/SketchPlugin_ConstraintCollinear.h
Salome HOME
Revert change for MacroArc attribute names
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintCollinear.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 // File:    SketchPlugin_ConstraintCollinear.h
4 // Created: 27 Jan 2016
5 // Author:  Artem ZHIDKOV
6
7 #ifndef SketchPlugin_ConstraintCollinear_H_
8 #define SketchPlugin_ConstraintCollinear_H_
9
10 #include "SketchPlugin.h"
11 #include <SketchPlugin_Sketch.h>
12 #include "SketchPlugin_ConstraintBase.h"
13
14 /** \class SketchPlugin_ConstraintCollinear
15  *  \ingroup Plugins
16  *  \brief Feature for creation of a new constraint collinearity of two lines
17  *
18  *  This constraint has two attributes:
19  *  SketchPlugin_Constraint::ENTITY_A() and SketchPlugin_Constraint::ENTITY_B()
20  */
21 class SketchPlugin_ConstraintCollinear : public SketchPlugin_ConstraintBase
22 {
23  public:
24   /// Parallel constraint kind
25   inline static const std::string& ID()
26   {
27     static const std::string MY_CONSTRAINT_COLLINEAR_ID("SketchConstraintCollinear");
28     return MY_CONSTRAINT_COLLINEAR_ID;
29   }
30   /// \brief Returns the kind of a feature
31   SKETCHPLUGIN_EXPORT virtual const std::string& getKind()
32   {
33     static std::string MY_KIND = SketchPlugin_ConstraintCollinear::ID();
34     return MY_KIND;
35   }
36
37   /// \brief Creates a new part document if needed
38   SKETCHPLUGIN_EXPORT virtual void execute();
39
40   /// \brief Request for initialization of data model of the feature: adding all attributes
41   SKETCHPLUGIN_EXPORT virtual void initAttributes();
42
43   /// Returns the AIS preview
44   SKETCHPLUGIN_EXPORT virtual AISObjectPtr getAISObject(AISObjectPtr thePrevious);
45
46   /// \brief Use plugin manager for features creation
47   SketchPlugin_ConstraintCollinear();
48 };
49
50 #endif