1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: SketchPlugin_IntersectionPoint.h
4 // Created: 07 May 2014
5 // Author: Artem ZHIDKOV
7 #ifndef SketchPlugin_IntersectionPoint_H_
8 #define SketchPlugin_IntersectionPoint_H_
10 #include "SketchPlugin_Point.h"
12 /**\class SketchPlugin_IntersectionPoint
14 * \brief Feature for creation of external point as an intersection
15 * between external edge and a plane of the sketch.
17 class SketchPlugin_IntersectionPoint : public SketchPlugin_Point
20 /// Point feature kind
21 inline static const std::string& ID()
23 static const std::string MY_POINT_ID("SketchIntersectionPoint");
26 /// Returns the kind of a feature
27 virtual const std::string& getKind()
29 static std::string MY_KIND = SketchPlugin_IntersectionPoint::ID();
33 static const std::string& EXTERNAL_LINE_ID()
35 static std::string MY_LINE_ID("ExternalLine");
39 /// Returns true because intersection point is always external
40 virtual bool isFixed()
43 /// Creates a new part document if needed
44 SKETCHPLUGIN_EXPORT virtual void execute();
47 /// \param theDeltaX the delta for X coordinate is moved
48 /// \param theDeltaY the delta for Y coordinate is moved
49 SKETCHPLUGIN_EXPORT virtual void move(const double theDeltaX, const double theDeltaY);
51 /// Called on change of any argument-attribute of this object: for external point
52 SKETCHPLUGIN_EXPORT virtual void attributeChanged(const std::string& theID);
54 /// Use plugin manager for features creation
55 SketchPlugin_IntersectionPoint();
58 /// \brief Initializes attributes of derived class.
59 virtual void initDerivedClassAttributes();
62 /// \brief Find intersection between a line and a sketch plane