1 // Name : SketchAPI_Point.h
5 // 15/06/16 - Sergey POKHODENKO - Creation of the file
7 #ifndef SRC_SKETCHAPI_SKETCHAPI_POINT_H_
8 #define SRC_SKETCHAPI_SKETCHAPI_POINT_H_
10 //--------------------------------------------------------------------------------------
11 #include "SketchAPI.h"
13 #include <GeomDataAPI_Point2D.h>
15 #include <SketchPlugin_Point.h>
17 #include "SketchAPI_SketchEntity.h"
18 //--------------------------------------------------------------------------------------
19 class ModelHighAPI_Selection;
20 //--------------------------------------------------------------------------------------
21 /**\class SketchAPI_Point
23 * \brief Interface for Point feature
25 class SketchAPI_Point : public SketchAPI_SketchEntity
28 /// Constructor without values
30 explicit SketchAPI_Point(const std::shared_ptr<ModelAPI_Feature> & theFeature);
31 /// Constructor with values
33 SketchAPI_Point(const std::shared_ptr<ModelAPI_Feature> & theFeature,
34 double theX, double theY);
35 /// Constructor with values
37 SketchAPI_Point(const std::shared_ptr<ModelAPI_Feature> & theFeature,
38 const std::shared_ptr<GeomAPI_Pnt2d> & thePoint);
39 /// Constructor with values
41 SketchAPI_Point(const std::shared_ptr<ModelAPI_Feature> & theFeature,
42 const ModelHighAPI_Selection & theExternal);
43 /// Constructor with values
45 SketchAPI_Point(const std::shared_ptr<ModelAPI_Feature> & theFeature,
46 const std::string & theExternalName);
49 virtual ~SketchAPI_Point();
51 INTERFACE_2(SketchPlugin_Point::ID(),
52 coordinates, SketchPlugin_Point::COORD_ID(), GeomDataAPI_Point2D, /** Point coordinates */,
53 external, SketchPlugin_Point::EXTERNAL_ID(), ModelAPI_AttributeSelection, /** External */
56 /// Set by coordinates
58 void setCoordinates(double theX, double theY);
62 void setCoordinates(const std::shared_ptr<GeomAPI_Pnt2d> & thePoint);
66 void setByExternal(const ModelHighAPI_Selection & theExternal);
68 /// Set by external name
70 void setByExternalName(const std::string & theExternalName);
72 /// Dump wrapped feature
74 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
77 //! Pointer on Point object
78 typedef std::shared_ptr<SketchAPI_Point> PointPtr;
80 //--------------------------------------------------------------------------------------
81 //--------------------------------------------------------------------------------------
82 #endif /* SRC_SKETCHAPI_SKETCHAPI_POINT_H_ */