0032696: Coding - get rid of unused forward declarations [StepSelect to Xw]
[occt.git] / src / gce / gce_MakeCirc.hxx
1 // Created on: 1992-08-26
2 // Created by: Remi GILET
3 // Copyright (c) 1992-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #ifndef _gce_MakeCirc_HeaderFile
18 #define _gce_MakeCirc_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <gp_Circ.hxx>
25 #include <gce_Root.hxx>
26 #include <Standard_Real.hxx>
27 class gp_Ax2;
28 class gp_Pnt;
29 class gp_Dir;
30 class gp_Pln;
31 class gp_Ax1;
32
33
34 //! This class implements the following algorithms used
35 //! to create Circ from gp.
36 //!
37 //! * Create a Circ coaxial to another and passing
38 //! though a point.
39 //! * Create a Circ coaxial to another at the distance
40 //! Dist.
41 //! * Create a Circ passing through 3 points.
42 //! * Create a Circ with its center and the normal of its
43 //! plane and its radius.
44 //! * Create a Circ with its center and its plane and its
45 //! radius.
46 //! * Create a Circ with its axis and radius.
47 //! * Create a Circ with two points giving its axis and
48 //! its radius.
49 //! * Create a Circ with is Ax2 and its Radius.
50 class gce_MakeCirc  : public gce_Root
51 {
52 public:
53
54   DEFINE_STANDARD_ALLOC
55
56   
57
58   //! A2 locates the circle and gives its orientation in 3D space.
59   //! Warnings :
60   //! It is not forbidden to create a circle with Radius = 0.0
61   //! The status is "NegativeRadius" if Radius < 0.0
62   Standard_EXPORT gce_MakeCirc(const gp_Ax2& A2, const Standard_Real Radius);
63   
64   //! Makes a Circ from gp <TheCirc> coaxial to another
65   //! Circ <Circ> at a distance <Dist>.
66   //! If Dist is greater than zero the result is encloses
67   //! the circle <Circ>, else the result is enclosed by the
68   //! circle <Circ>.
69   Standard_EXPORT gce_MakeCirc(const gp_Circ& Circ, const Standard_Real Dist);
70   
71   //! Makes a Circ from gp <TheCirc> coaxial to another
72   //! Circ <Circ> and passing through a Pnt2d <Point>.
73   Standard_EXPORT gce_MakeCirc(const gp_Circ& Circ, const gp_Pnt& Point);
74   
75   //! Makes a Circ from gp <TheCirc> passing through 3
76   //! Pnt2d <P1>,<P2>,<P3>.
77   Standard_EXPORT gce_MakeCirc(const gp_Pnt& P1, const gp_Pnt& P2, const gp_Pnt& P3);
78   
79   //! Makes a Circ from gp <TheCirc> with its center
80   //! <Center> and the normal of its plane <Norm> and
81   //! its radius <Radius>.
82   Standard_EXPORT gce_MakeCirc(const gp_Pnt& Center, const gp_Dir& Norm, const Standard_Real Radius);
83   
84   //! Makes a Circ from gp <TheCirc> with its center
85   //! <Center> and the normal of its plane <Plane> and
86   //! its radius <Radius>.
87   Standard_EXPORT gce_MakeCirc(const gp_Pnt& Center, const gp_Pln& Plane, const Standard_Real Radius);
88   
89   //! Makes a Circ from gp <TheCirc> with its center
90   //! <Center> and a point <Ptaxis> giving the normal
91   //! of its plane <Plane> and its radius <Radius>.
92   Standard_EXPORT gce_MakeCirc(const gp_Pnt& Center, const gp_Pnt& Ptaxis, const Standard_Real Radius);
93   
94   //! Makes a Circ from gp <TheCirc> with its center
95   //! <Center> and its radius <Radius>.
96   //! Warning
97   //! The MakeCirc class does not prevent the
98   //! construction of a circle with a null radius.
99   //! If an error occurs (that is, when IsDone returns
100   //! false), the Status function returns:
101   //! -   gce_Negative Radius if:
102   //! -   Radius is less than 0.0, or
103   //! -   Dist is less than 0.0 and the absolute value of
104   //! Dist is greater than the radius of Circ;
105   //! -   gce_IntersectionError if the points P1, P2 and
106   //! P3 are collinear, and the three are not coincident;
107   //! -   gce_ConfusedPoints if two of the three points
108   //! P1, P2 and P3 are coincident; or
109   //! -   gce_NullAxis if Center and Ptaxis are coincident.
110   Standard_EXPORT gce_MakeCirc(const gp_Ax1& Axis, const Standard_Real Radius);
111   
112   //! Returns the constructed circle.
113   //! Exceptions StdFail_NotDone if no circle is constructed.
114   Standard_EXPORT const gp_Circ& Value() const;
115   
116   Standard_EXPORT const gp_Circ& Operator() const;
117 Standard_EXPORT operator gp_Circ() const;
118
119
120
121
122 protected:
123
124
125
126
127
128 private:
129
130
131
132   gp_Circ TheCirc;
133
134
135 };
136
137
138
139
140
141
142
143 #endif // _gce_MakeCirc_HeaderFile