1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2 // Name : SketchAPI_Point.h
6 // 15/06/16 - Sergey POKHODENKO - Creation of the file
8 #ifndef SRC_SKETCHAPI_SKETCHAPI_POINT_H_
9 #define SRC_SKETCHAPI_SKETCHAPI_POINT_H_
11 //--------------------------------------------------------------------------------------
12 #include "SketchAPI.h"
14 #include <GeomDataAPI_Point2D.h>
16 #include <SketchPlugin_Point.h>
18 #include "SketchAPI_SketchEntity.h"
19 //--------------------------------------------------------------------------------------
20 class ModelHighAPI_Selection;
21 //--------------------------------------------------------------------------------------
22 /**\class SketchAPI_Point
24 * \brief Interface for Point feature
26 class SketchAPI_Point : public SketchAPI_SketchEntity
29 /// Constructor without values
31 explicit SketchAPI_Point(const std::shared_ptr<ModelAPI_Feature> & theFeature);
32 /// Constructor with values
34 SketchAPI_Point(const std::shared_ptr<ModelAPI_Feature> & theFeature,
35 double theX, double theY);
36 /// Constructor with values
38 SketchAPI_Point(const std::shared_ptr<ModelAPI_Feature> & theFeature,
39 const std::shared_ptr<GeomAPI_Pnt2d> & thePoint);
40 /// Constructor with values
42 SketchAPI_Point(const std::shared_ptr<ModelAPI_Feature> & theFeature,
43 const ModelHighAPI_Selection & theExternal);
44 /// Constructor with values
46 SketchAPI_Point(const std::shared_ptr<ModelAPI_Feature> & theFeature,
47 const std::string & theExternalName);
50 virtual ~SketchAPI_Point();
52 INTERFACE_2(SketchPlugin_Point::ID(),
53 coordinates, SketchPlugin_Point::COORD_ID(),
54 GeomDataAPI_Point2D, /** Point coordinates */,
55 external, SketchPlugin_Point::EXTERNAL_ID(),
56 ModelAPI_AttributeSelection, /** External */
59 /// Set by coordinates
61 void setCoordinates(double theX, double theY);
65 void setCoordinates(const std::shared_ptr<GeomAPI_Pnt2d> & thePoint);
69 void setByExternal(const ModelHighAPI_Selection & theExternal);
71 /// Set by external name
73 void setByExternalName(const std::string & theExternalName);
75 /// Dump wrapped feature
77 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
80 //! Pointer on Point object
81 typedef std::shared_ptr<SketchAPI_Point> PointPtr;
83 //--------------------------------------------------------------------------------------
84 //--------------------------------------------------------------------------------------
85 #endif /* SRC_SKETCHAPI_SKETCHAPI_POINT_H_ */