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