1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: SketchPlugin_ConstraintVertical.h
4 // Created: 16 Mar 2015
5 // Author: Artem ZHIDKOV
7 #ifndef SketchPlugin_ConstraintVertical_H_
8 #define SketchPlugin_ConstraintVertical_H_
10 #include "SketchPlugin.h"
11 #include <SketchPlugin_Sketch.h>
12 #include "SketchPlugin_ConstraintBase.h"
14 /** \class SketchPlugin_ConstraintVertical
16 * \brief Feature for creation of a new constraint verticality of a line
18 * This constraint has one attribute SketchPlugin_Constraint::ENTITY_A(),
19 * which specifies a line to be vertical
21 class SketchPlugin_ConstraintVertical : public SketchPlugin_ConstraintBase
24 /// Vertical constraint kind
25 inline static const std::string& ID()
27 static const std::string MY_CONSTRAINT_VERTICAL_ID("SketchConstraintVertical");
28 return MY_CONSTRAINT_VERTICAL_ID;
30 /// \brief Returns the kind of a feature
31 SKETCHPLUGIN_EXPORT virtual const std::string& getKind()
33 static std::string MY_KIND = SketchPlugin_ConstraintVertical::ID();
37 /// \brief Creates a new part document if needed
38 SKETCHPLUGIN_EXPORT virtual void execute();
40 /// \brief Request for initialization of data model of the feature: adding all attributes
41 SKETCHPLUGIN_EXPORT virtual void initAttributes();
43 /// Returns the AIS preview
44 SKETCHPLUGIN_EXPORT virtual AISObjectPtr getAISObject(AISObjectPtr thePrevious);
46 /// \brief Use plugin manager for features creation
47 SketchPlugin_ConstraintVertical();