1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: SketchPlugin_ConstraintTangent.h
4 // Created: 16 Mar 2015
5 // Author: Artem ZHIDKOV
7 #ifndef SketchPlugin_ConstraintTangent_H_
8 #define SketchPlugin_ConstraintTangent_H_
10 #include "SketchPlugin.h"
11 #include <SketchPlugin_Sketch.h>
12 #include "SketchPlugin_ConstraintBase.h"
14 /** \class SketchPlugin_ConstraintTangent
16 * \brief Feature for creation of a new constraint tangency between line and arc
17 * or between two circular arcs. The used features must have shared vertex
19 * This constraint has two attributes:
20 * SketchPlugin_Constraint::ENTITY_A() and SketchPlugin_Constraint::ENTITY_B()
22 class SketchPlugin_ConstraintTangent : public SketchPlugin_ConstraintBase
25 /// Equal constraint kind
26 inline static const std::string& ID()
28 static const std::string MY_CONSTRAINT_TANGENT_ID("SketchConstraintTangent");
29 return MY_CONSTRAINT_TANGENT_ID;
31 /// \brief Returns the kind of a feature
32 SKETCHPLUGIN_EXPORT virtual const std::string& getKind()
34 static std::string MY_KIND = SketchPlugin_ConstraintTangent::ID();
38 /// \brief Creates a new part document if needed
39 SKETCHPLUGIN_EXPORT virtual void execute();
41 /// \brief Request for initialization of data model of the feature: adding all attributes
42 SKETCHPLUGIN_EXPORT virtual void initAttributes();
44 /// Returns the AIS preview
45 SKETCHPLUGIN_EXPORT virtual AISObjectPtr getAISObject(AISObjectPtr thePrevious);
47 /// \brief Use plugin manager for features creation
48 SketchPlugin_ConstraintTangent();