Salome HOME
Add IntersectionPoint
[modules/shaper.git] / src / SketchAPI / SketchAPI_IntersectionPoint.h
1 // Name   : SketchAPI_IntersectionPoint.h
2 // Purpose: 
3 //
4 // History:
5 // 15/06/16 - Sergey POKHODENKO - Creation of the file
6
7 #ifndef SRC_SKETCHAPI_SKETCHAPI_INTERSECTIONPOINT_H_
8 #define SRC_SKETCHAPI_SKETCHAPI_INTERSECTIONPOINT_H_
9
10 //--------------------------------------------------------------------------------------
11 #include "SketchAPI.h"
12
13 #include <SketchPlugin_IntersectionPoint.h>
14
15 #include "SketchAPI_SketchEntity.h"
16 //--------------------------------------------------------------------------------------
17 class ModelHighAPI_Selection;
18 //--------------------------------------------------------------------------------------
19 /**\class SketchAPI_IntersectionPoint
20  * \ingroup CPPHighAPI
21  * \brief Interface for IntersectionPoint feature
22  */
23 class SketchAPI_IntersectionPoint : public SketchAPI_SketchEntity
24 {
25 public:
26   /// Constructor without values
27   SKETCHAPI_EXPORT
28   explicit SketchAPI_IntersectionPoint(const std::shared_ptr<ModelAPI_Feature> & theFeature);
29   /// Constructor with values
30   SKETCHAPI_EXPORT
31   SketchAPI_IntersectionPoint(const std::shared_ptr<ModelAPI_Feature> & theFeature,
32                  const ModelHighAPI_Selection & theExternal);
33   /// Constructor with values
34   SKETCHAPI_EXPORT
35   SketchAPI_IntersectionPoint(const std::shared_ptr<ModelAPI_Feature> & theFeature,
36                  const std::string & theExternalName);
37   /// Destructor
38   SKETCHAPI_EXPORT
39   virtual ~SketchAPI_IntersectionPoint();
40
41   INTERFACE_2(SketchPlugin_IntersectionPoint::ID(),
42               coordinates, SketchPlugin_IntersectionPoint::COORD_ID(), GeomDataAPI_Point2D, /** IntersectionPoint coordinates */,
43               externalLine, SketchPlugin_IntersectionPoint::EXTERNAL_LINE_ID(), ModelAPI_AttributeSelection, /** External line */
44   )
45
46   /// Set by external
47   SKETCHAPI_EXPORT
48   void setByExternalLine(const ModelHighAPI_Selection & theExternalLine);
49
50   /// Set by external name
51   SKETCHAPI_EXPORT
52   void setByExternalLineName(const std::string & theExternalLineName);
53 };
54
55 //! Pointer on IntersectionPoint object
56 typedef std::shared_ptr<SketchAPI_IntersectionPoint> IntersectionPointPtr;
57
58 //--------------------------------------------------------------------------------------
59 //--------------------------------------------------------------------------------------
60 #endif /* SRC_SKETCHAPI_SKETCHAPI_INTERSECTIONPOINT_H_ */