]> SALOME platform Git repositories - modules/shaper.git/blob - src/SketchAPI/SketchAPI_MacroCircle.h
Salome HOME
Add copyright header according to request of CEA from 06.06.2017
[modules/shaper.git] / src / SketchAPI / SketchAPI_MacroCircle.h
1 // Copyright (C) 2014-2017  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
18 //
19
20 #ifndef SketchAPI_MacroCircle_H_
21 #define SketchAPI_MacroCircle_H_
22
23 #include "SketchAPI.h"
24 #include "SketchAPI_SketchEntity.h"
25
26 #include <SketchPlugin_MacroCircle.h>
27
28 class ModelHighAPI_Selection;
29
30 /// \class SketchAPI_MacroCircle
31 /// \ingroup CPPHighAPI
32 /// \brief Interface for Circle feature.
33 class SketchAPI_MacroCircle: public SketchAPI_SketchEntity
34 {
35 public:
36   /// Constructor without values.
37   SKETCHAPI_EXPORT
38   explicit SketchAPI_MacroCircle(const std::shared_ptr<ModelAPI_Feature>& theFeature);
39
40   /// Constructor with values.
41   SKETCHAPI_EXPORT
42   SketchAPI_MacroCircle(const std::shared_ptr<ModelAPI_Feature>& theFeature,
43                         double theCenterX,
44                         double theCenterY,
45                         double thePassedX,
46                         double thePassedY);
47
48   /// Constructor with values.
49   SKETCHAPI_EXPORT
50   SketchAPI_MacroCircle(const std::shared_ptr<ModelAPI_Feature>& theFeature,
51                         const std::shared_ptr<GeomAPI_Pnt2d>& theCenterPoint,
52                         const std::shared_ptr<GeomAPI_Pnt2d>& thePassedPoint);
53
54   /// Constructor with values.
55   SKETCHAPI_EXPORT
56   SketchAPI_MacroCircle(const std::shared_ptr<ModelAPI_Feature>& theFeature,
57                         double theX1, double theY1,
58                         double theX2, double theY2,
59                         double theX3, double theY3);
60
61   /// Constructor with values.
62   SKETCHAPI_EXPORT
63   SketchAPI_MacroCircle(const std::shared_ptr<ModelAPI_Feature>& theFeature,
64                         const std::shared_ptr<GeomAPI_Pnt2d>& thePoint1,
65                         const std::shared_ptr<GeomAPI_Pnt2d>& thePoint2,
66                         const std::shared_ptr<GeomAPI_Pnt2d>& thePoint3);
67
68   /// Destructor.
69   SKETCHAPI_EXPORT
70   virtual ~SketchAPI_MacroCircle();
71
72   INTERFACE_6(SketchPlugin_MacroCircle::ID(),
73               circleType, SketchPlugin_MacroCircle::CIRCLE_TYPE(),
74               ModelAPI_AttributeString, /** Circle type */,
75               centerPoint, SketchPlugin_MacroCircle::CENTER_POINT_ID(),
76               GeomDataAPI_Point2D, /** Center point */,
77               passedPoint, SketchPlugin_MacroCircle::PASSED_POINT_ID(),
78               GeomDataAPI_Point2D, /** Passed point */,
79               firstPoint, SketchPlugin_MacroCircle::FIRST_POINT_ID(),
80               GeomDataAPI_Point2D, /** First point */,
81               secondPoint, SketchPlugin_MacroCircle::SECOND_POINT_ID(),
82               GeomDataAPI_Point2D, /** Second point */,
83               thirdPoint, SketchPlugin_MacroCircle::THIRD_POINT_ID(),
84               GeomDataAPI_Point2D, /** Third point */)
85
86   /// Set by center and passed points.
87   SKETCHAPI_EXPORT
88   void setByCenterAndPassedPoints(double theCenterX, double theCenterY,
89                                   double thePassedX, double thePassedY);
90
91   /// Set by center and passed points.
92   SKETCHAPI_EXPORT
93   void setByCenterAndPassedPoints(const std::shared_ptr<GeomAPI_Pnt2d>& theCenterPoint,
94                                   const std::shared_ptr<GeomAPI_Pnt2d>& thePassedPoint);
95
96   /// Set by three points.
97   SKETCHAPI_EXPORT
98   void setByThreePoints(double theX1, double theY1,
99                         double theX2, double theY2,
100                         double theX3, double theY3);
101
102   /// Set by three points.
103   SKETCHAPI_EXPORT
104   void setByThreePoints(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint1,
105                         const std::shared_ptr<GeomAPI_Pnt2d>& thePoint2,
106                         const std::shared_ptr<GeomAPI_Pnt2d>& thePoint3);
107
108   /// Set center point.
109   SKETCHAPI_EXPORT
110   void setCenterPoint(double theX, double theY);
111
112   /// Set center point.
113   SKETCHAPI_EXPORT
114   void setCenterPoint(const std::shared_ptr<GeomAPI_Pnt2d>& theCenterPoint);
115
116   /// Set passed point.
117   SKETCHAPI_EXPORT
118   void setPassedPoint(double theX, double theY);
119
120   /// Set passed point.
121   SKETCHAPI_EXPORT
122   void setPassedPoint(const std::shared_ptr<GeomAPI_Pnt2d>& thePassedPoint);
123
124   /// Set first point.
125   SKETCHAPI_EXPORT
126   void setFirstPoint(double theX, double theY);
127
128   /// Set first point.
129   SKETCHAPI_EXPORT
130   void setFirstPoint(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint);
131
132   /// Set second point.
133   SKETCHAPI_EXPORT
134   void setSecondPoint(double theX, double theY);
135
136   /// Set second point.
137   SKETCHAPI_EXPORT
138   void setSecondPoint(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint);
139
140   /// Set third point.
141   SKETCHAPI_EXPORT
142   void setThirdPoint(double theX, double theY);
143
144   /// Set third point.
145   SKETCHAPI_EXPORT
146   void setThirdPoint(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint);
147 };
148
149 /// Pointer on Circle object.
150 typedef std::shared_ptr<SketchAPI_MacroCircle> MacroCirclePtr;
151
152 #endif // SketchAPI_MacroCircle_H_