b311480e |
1 | -- Created on: 1992-08-26 |
2 | -- Created by: Remi GILET |
3 | -- Copyright (c) 1992-1999 Matra Datavision |
4 | -- Copyright (c) 1999-2012 OPEN CASCADE SAS |
5 | -- |
6 | -- The content of this file is subject to the Open CASCADE Technology Public |
7 | -- License Version 6.5 (the "License"). You may not use the content of this file |
8 | -- except in compliance with the License. Please obtain a copy of the License |
9 | -- at http://www.opencascade.org and read it completely before using this file. |
10 | -- |
11 | -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
12 | -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
13 | -- |
14 | -- The Original Code and all software distributed under the License is |
15 | -- distributed on an "AS IS" basis, without warranty of any kind, and the |
16 | -- Initial Developer hereby disclaims all such warranties, including without |
17 | -- limitation, any warranties of merchantability, fitness for a particular |
18 | -- purpose or non-infringement. Please see the License for the specific terms |
19 | -- and conditions governing the rights and limitations under the License. |
20 | |
7fd59977 |
21 | |
22 | class MakeCirc2d from gce inherits Root from gce |
23 | |
24 | ---Purpose : This class implements the following algorithms used |
25 | -- to create Circ2d from gp. |
26 | -- |
27 | -- * Create a Circ2d concentric with another and passing |
28 | -- though a point. |
29 | -- * Create a Circ2d concentric with another at the distance |
30 | -- Dist. |
31 | -- * Create a Circ2d passing through 3 points. |
32 | -- * Create a Circ2d with its center and radius. |
33 | -- * Create a Circ2d with its center and a point given |
34 | -- the radius. |
35 | -- * Create a Circ2d with its axis and its radius. |
36 | |
37 | |
38 | uses Pnt2d from gp, |
39 | Circ2d from gp, |
40 | Real from Standard, |
41 | ErrorType from gce, |
42 | Ax2d from gp, |
43 | Ax22d from gp |
44 | |
45 | raises NotDone from StdFail |
46 | |
47 | is |
48 | |
49 | Create (XAxis : Ax2d from gp ; |
50 | Radius : Real from Standard ; |
51 | Sense : Boolean from Standard = Standard_True) returns MakeCirc2d; |
52 | --- Purpose : |
53 | -- The location point of XAxis is the center of the circle. |
54 | -- Warnings : |
55 | -- It is not forbidden to create a circle with Radius = 0.0 |
56 | -- If Sense is true the local coordinate system of the solution |
57 | -- is direct and non direct in the other case. |
58 | -- The status is "NegativeRadius" if Radius < 0.0. |
59 | |
60 | Create (Axis : Ax22d from gp ; |
61 | Radius : Real from Standard) returns MakeCirc2d; |
62 | --- Purpose : |
63 | -- The location point of Axis is the center of the circle. |
64 | -- Warnings : |
65 | -- It is not forbidden to create a circle with Radius = 0.0 |
66 | |
67 | Create(Circ : Circ2d from gp ; |
68 | Dist : Real from Standard) |
69 | returns MakeCirc2d; |
70 | ---Purpose : Makes a Circ2d from gp <TheCirc> concentric with another |
71 | -- circ2d <Circ> with a distance <Dist>. |
72 | -- If Dist is greater than zero the result encloses |
73 | -- the circle <Circ>, else the result is enclosed by the |
74 | -- circle <Circ>. |
75 | -- The local coordinate system of the solution is the |
76 | -- same as Circ. |
77 | |
78 | Create(Circ : Circ2d from gp; |
79 | Point : Pnt2d from gp) |
80 | returns MakeCirc2d; |
81 | ---Purpose : Makes a Circ2d from gp <TheCirc> concentric with another |
82 | -- circ2d <Circ> and passing through a Pnt2d <Point>. |
83 | -- The local coordinate system of the solution is the |
84 | -- same as Circ. |
85 | |
86 | Create(P1 : Pnt2d from gp; |
87 | P2 : Pnt2d from gp; |
88 | P3 : Pnt2d from gp) |
89 | returns MakeCirc2d; |
90 | ---Purpose : Makes a Circ2d from gp <TheCirc> passing through 3 |
91 | -- Pnt2d <P1>,<P2>,<P3>. |
92 | -- The local coordinate system of the solution is given |
93 | -- by the three points P1, P2, P3. |
94 | |
95 | Create(Center : Pnt2d from gp ; |
96 | Radius : Real from Standard ; |
97 | Sense : Boolean from Standard = Standard_True) |
98 | returns MakeCirc2d; |
99 | ---Purpose : Makes a Circ2d from gp <TheCirc> with its center |
100 | -- <Center> and its radius <Radius>. |
101 | -- If Sense is true the local coordinate system of |
102 | -- the solution is direct and non direct in the other case. |
103 | |
104 | Create(Center : Pnt2d from gp ; |
105 | Point : Pnt2d from gp ; |
106 | Sense : Boolean from Standard = Standard_True) |
107 | returns MakeCirc2d; |
108 | ---Purpose : Makes a Circ2d from gp <TheCirc> with its center |
109 | -- <Center> and a point giving the radius. |
110 | -- If Sense is true the local coordinate system of |
111 | -- the solution is direct and non direct in the other case. |
112 | |
113 | Value(me) returns Circ2d from gp |
114 | raises NotDone |
115 | is static; |
116 | ---C++: return const& |
117 | ---Purpose: Returns the constructed circle. |
118 | -- Exceptions StdFail_NotDone if no circle is constructed. |
119 | |
120 | Operator(me) returns Circ2d from gp |
121 | is static; |
122 | ---C++: return const& |
123 | ---C++: alias "Standard_EXPORT operator gp_Circ2d() const;" |
124 | |
125 | fields |
126 | |
127 | TheCirc2d : Circ2d from gp; |
128 | --The solution from gp. |
129 | |
130 | end MakeCirc2d; |