1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: SketchAPI_MacroCircle.h
4 // Created: 09 June 2016
5 // Author: Dmitry Bobylev
7 #ifndef SketchAPI_MacroCircle_H_
8 #define SketchAPI_MacroCircle_H_
10 #include "SketchAPI.h"
11 #include "SketchAPI_SketchEntity.h"
13 #include <SketchPlugin_MacroCircle.h>
15 class ModelHighAPI_Selection;
17 /// \class SketchAPI_MacroCircle
18 /// \ingroup CPPHighAPI
19 /// \brief Interface for Circle feature.
20 class SketchAPI_MacroCircle: public SketchAPI_SketchEntity
23 /// Constructor without values.
25 explicit SketchAPI_MacroCircle(const std::shared_ptr<ModelAPI_Feature>& theFeature);
27 /// Constructor with values.
29 SketchAPI_MacroCircle(const std::shared_ptr<ModelAPI_Feature>& theFeature,
35 /// Constructor with values.
37 SketchAPI_MacroCircle(const std::shared_ptr<ModelAPI_Feature>& theFeature,
38 const std::shared_ptr<GeomAPI_Pnt2d>& theCenterPoint,
39 const std::shared_ptr<GeomAPI_Pnt2d>& thePassedPoint);
41 /// Constructor with values.
43 SketchAPI_MacroCircle(const std::shared_ptr<ModelAPI_Feature>& theFeature,
44 double theX1, double theY1,
45 double theX2, double theY2,
46 double theX3, double theY3);
48 /// Constructor with values.
50 SketchAPI_MacroCircle(const std::shared_ptr<ModelAPI_Feature>& theFeature,
51 const std::shared_ptr<GeomAPI_Pnt2d>& thePoint1,
52 const std::shared_ptr<GeomAPI_Pnt2d>& thePoint2,
53 const std::shared_ptr<GeomAPI_Pnt2d>& thePoint3);
57 virtual ~SketchAPI_MacroCircle();
59 INTERFACE_6(SketchPlugin_MacroCircle::ID(),
60 circleType, SketchPlugin_MacroCircle::CIRCLE_TYPE(),
61 ModelAPI_AttributeString, /** Circle type */,
62 centerPoint, SketchPlugin_MacroCircle::CENTER_POINT_ID(),
63 GeomDataAPI_Point2D, /** Center point */,
64 passedPoint, SketchPlugin_MacroCircle::PASSED_POINT_ID(),
65 GeomDataAPI_Point2D, /** Passed point */,
66 firstPoint, SketchPlugin_MacroCircle::FIRST_POINT_ID(),
67 GeomDataAPI_Point2D, /** First point */,
68 secondPoint, SketchPlugin_MacroCircle::SECOND_POINT_ID(),
69 GeomDataAPI_Point2D, /** Second point */,
70 thirdPoint, SketchPlugin_MacroCircle::THIRD_POINT_ID(),
71 GeomDataAPI_Point2D, /** Third point */)
73 /// Set by center and passed points.
75 void setByCenterAndPassedPoints(double theCenterX, double theCenterY,
76 double thePassedX, double thePassedY);
78 /// Set by center and passed points.
80 void setByCenterAndPassedPoints(const std::shared_ptr<GeomAPI_Pnt2d>& theCenterPoint,
81 const std::shared_ptr<GeomAPI_Pnt2d>& thePassedPoint);
83 /// Set by three points.
85 void setByThreePoints(double theX1, double theY1,
86 double theX2, double theY2,
87 double theX3, double theY3);
89 /// Set by three points.
91 void setByThreePoints(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint1,
92 const std::shared_ptr<GeomAPI_Pnt2d>& thePoint2,
93 const std::shared_ptr<GeomAPI_Pnt2d>& thePoint3);
97 void setCenterPoint(double theX, double theY);
101 void setCenterPoint(const std::shared_ptr<GeomAPI_Pnt2d>& theCenterPoint);
103 /// Set passed point.
105 void setPassedPoint(double theX, double theY);
107 /// Set passed point.
109 void setPassedPoint(const std::shared_ptr<GeomAPI_Pnt2d>& thePassedPoint);
113 void setFirstPoint(double theX, double theY);
117 void setFirstPoint(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint);
119 /// Set second point.
121 void setSecondPoint(double theX, double theY);
123 /// Set second point.
125 void setSecondPoint(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint);
129 void setThirdPoint(double theX, double theY);
133 void setThirdPoint(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint);
136 /// Pointer on Circle object.
137 typedef std::shared_ptr<SketchAPI_MacroCircle> MacroCirclePtr;
139 #endif // SketchAPI_MacroCircle_H_