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
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _gce_MakeCirc2d_HeaderFile
18 #define _gce_MakeCirc2d_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <gp_Circ2d.hxx>
25 #include <gce_Root.hxx>
26 #include <Standard_Real.hxx>
27 #include <Standard_Boolean.hxx>
28 class StdFail_NotDone;
35 //! This class implements the following algorithms used
36 //! to create Circ2d from gp.
38 //! * Create a Circ2d concentric with another and passing
40 //! * Create a Circ2d concentric with another at the distance
42 //! * Create a Circ2d passing through 3 points.
43 //! * Create a Circ2d with its center and radius.
44 //! * Create a Circ2d with its center and a point given
46 //! * Create a Circ2d with its axis and its radius.
47 class gce_MakeCirc2d : public gce_Root
55 //! The location point of XAxis is the center of the circle.
57 //! It is not forbidden to create a circle with Radius = 0.0
58 //! If Sense is true the local coordinate system of the solution
59 //! is direct and non direct in the other case.
60 //! The status is "NegativeRadius" if Radius < 0.0.
61 Standard_EXPORT gce_MakeCirc2d(const gp_Ax2d& XAxis, const Standard_Real Radius, const Standard_Boolean Sense = Standard_True);
64 //! The location point of Axis is the center of the circle.
66 //! It is not forbidden to create a circle with Radius = 0.0
67 Standard_EXPORT gce_MakeCirc2d(const gp_Ax22d& Axis, const Standard_Real Radius);
69 //! Makes a Circ2d from gp <TheCirc> concentric with another
70 //! circ2d <Circ> with a distance <Dist>.
71 //! If Dist is greater than zero the result encloses
72 //! the circle <Circ>, else the result is enclosed by the
74 //! The local coordinate system of the solution is the
76 Standard_EXPORT gce_MakeCirc2d(const gp_Circ2d& Circ, const Standard_Real Dist);
78 //! Makes a Circ2d from gp <TheCirc> concentric with another
79 //! circ2d <Circ> and passing through a Pnt2d <Point>.
80 //! The local coordinate system of the solution is the
82 Standard_EXPORT gce_MakeCirc2d(const gp_Circ2d& Circ, const gp_Pnt2d& Point);
84 //! Makes a Circ2d from gp <TheCirc> passing through 3
85 //! Pnt2d <P1>,<P2>,<P3>.
86 //! The local coordinate system of the solution is given
87 //! by the three points P1, P2, P3.
88 Standard_EXPORT gce_MakeCirc2d(const gp_Pnt2d& P1, const gp_Pnt2d& P2, const gp_Pnt2d& P3);
90 //! Makes a Circ2d from gp <TheCirc> with its center
91 //! <Center> and its radius <Radius>.
92 //! If Sense is true the local coordinate system of
93 //! the solution is direct and non direct in the other case.
94 Standard_EXPORT gce_MakeCirc2d(const gp_Pnt2d& Center, const Standard_Real Radius, const Standard_Boolean Sense = Standard_True);
96 //! Makes a Circ2d from gp <TheCirc> with its center
97 //! <Center> and a point giving the radius.
98 //! If Sense is true the local coordinate system of
99 //! the solution is direct and non direct in the other case.
100 Standard_EXPORT gce_MakeCirc2d(const gp_Pnt2d& Center, const gp_Pnt2d& Point, const Standard_Boolean Sense = Standard_True);
102 //! Returns the constructed circle.
103 //! Exceptions StdFail_NotDone if no circle is constructed.
104 Standard_EXPORT const gp_Circ2d& Value() const;
106 Standard_EXPORT const gp_Circ2d& Operator() const;
107 Standard_EXPORT operator gp_Circ2d() const;
133 #endif // _gce_MakeCirc2d_HeaderFile