0024157: Parallelization of assembly part of BO
[occt.git] / src / gp / gp_Circ2d.cdl
1 -- Copyright (c) 1991-1999 Matra Datavision
2 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
3 --
4 -- The content of this file is subject to the Open CASCADE Technology Public
5 -- License Version 6.5 (the "License"). You may not use the content of this file
6 -- except in compliance with the License. Please obtain a copy of the License
7 -- at http://www.opencascade.org and read it completely before using this file.
8 --
9 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
10 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
11 --
12 -- The Original Code and all software distributed under the License is
13 -- distributed on an "AS IS" basis, without warranty of any kind, and the
14 -- Initial Developer hereby disclaims all such warranties, including without
15 -- limitation, any warranties of merchantability, fitness for a particular
16 -- purpose or non-infringement. Please see the License for the specific terms
17 -- and conditions governing the rights and limitations under the License.
18
19
20
21
22
23 class Circ2d  from gp   inherits Storable
24         --- Purpose : Describes a circle in the plane (2D space).
25         -- A circle is defined by its radius and positioned in the
26         -- plane with a coordinate system (a gp_Ax22d object) as follows:
27         -- -   the origin of the coordinate system is the center of the circle, and
28         -- -   the orientation (direct or indirect) of the coordinate
29         --   system gives an implicit orientation to the circle (and
30         --   defines its trigonometric sense).
31         -- This positioning coordinate system is the "local
32         -- coordinate system" of the circle.
33         -- Note: when a gp_Circ2d circle is converted into a
34         -- Geom2d_Circle circle, some implicit properties of the
35         -- circle are used explicitly:
36         -- -   the implicit orientation corresponds to the direction in
37         --   which parameter values increase,
38         -- -   the starting point for parameterization is that of the "X
39         --   Axis" of the local coordinate system (i.e. the "X Axis" of the circle).
40         --   See Also
41         -- GccAna and Geom2dGcc packages which provide
42         -- functions for constructing circles defined by geometric constraints
43         -- gce_MakeCirc2d which provides functions for more
44         -- complex circle constructions
45         -- Geom2d_Circle which provides additional functions for
46         -- constructing circles and works, with the parametric
47         -- equations of circles in particular  gp_Ax22d
48
49
50
51 uses Ax2d   from gp,
52      Ax22d  from gp,
53      Pnt2d  from gp,
54      Trsf2d from gp,
55      Vec2d  from gp
56
57 raises ConstructionError  from Standard
58
59 is
60
61        
62   Create   returns Circ2d;
63         ---C++: inline
64         --- Purpose : creates an indefinite circle.
65
66   Create (XAxis  : Ax2d; 
67           Radius : Real;
68           Sense  : Boolean from Standard = Standard_True)   returns Circ2d
69         ---C++: inline
70         --- Purpose :
71         --  The location point of XAxis is the center of the circle.
72         --  Warnings :
73         --  It is not forbidden to create a circle with Radius = 0.0   Raises ConstructionError if Radius < 0.0.
74
75      raises ConstructionError;
76         --- Purpose : Raised if Radius < 0.0.
77
78   Create (Axis : Ax22d; Radius : Real)   returns Circ2d
79         ---C++: inline
80         --- Purpose :
81         --  Axis defines the Xaxis and Yaxis of the circle which defines 
82         --  the origin and the sense of parametrization.
83         --  The location point of Axis is the center of the circle.
84         --  Warnings :
85         --  It is not forbidden to create a circle with Radius = 0.0 Raises ConstructionError if Radius < 0.0.
86      raises ConstructionError;
87         --- Purpose : Raised if Radius < 0.0.
88
89   SetLocation (me : in out; P : Pnt2d)   is static;
90
91         --- Purpose : Changes the location point (center) of the circle.
92
93   SetXAxis (me : in out; A : Ax2d)  is static;
94         ---C++:inline
95         --- Purpose : Changes the X axis of the circle.
96
97   SetAxis  (me : in out; A : Ax22d)  is static;
98         ---C++:inline
99         --- Purpose : Changes the X axis of the circle.
100
101   SetYAxis (me : in out; A : Ax2d)  is static;
102         ---C++:inline
103         --- Purpose : Changes the Y axis of the circle.
104
105   SetRadius (me : in out; Radius : Real)
106         ---C++:inline
107         ---Purpose:    Modifies the radius of this circle.
108         -- This class does not prevent the creation of a circle where
109         -- Radius is null.
110         -- Exceptions
111         -- Standard_ConstructionError if Radius is negative.
112      raises ConstructionError
113      is static;
114
115   Area (me)  returns Real   is static;
116         ---C++: inline
117         --- Purpose : Computes the area of the circle.
118
119   Coefficients (me; A, B, C, D, E, F : out Real)   is static;
120         ---C++: inline
121         --- Purpose :
122         --  Returns the normalized coefficients from the implicit equation
123         --  of the circle :
124         --  A * (X**2) + B * (Y**2) + 2*C*(X*Y) + 2*D*X + 2*E*Y + F = 0.0
125
126   Contains (me; P : Pnt2d; LinearTolerance : Real)  returns Boolean
127      is static;
128         ---C++: inline
129         --- Purpose : Does <me> contain P ?
130         --  Returns True if the distance between P and any point on
131         --  the circumference of the circle is lower of equal to
132         --  <LinearTolerance>.
133
134   Distance (me; P : Pnt2d)   returns Real  is static;
135         ---C++: inline 
136         --- Purpose :
137         --  Computes the minimum of distance between the point P and any
138         --  point on the circumference of the circle.
139
140   SquareDistance (me; P : Pnt2d)   returns Real  is static;
141         ---C++: inline
142         --- Purpose : 
143         --  Computes the square distance between <me> and the point P.
144
145   Length (me)  returns Real    is static;
146         --- Purpose : computes the circumference of the circle.
147         ---C++: inline
148
149   Location (me)  returns Pnt2d   is static;
150         ---C++:inline
151         --- Purpose : Returns the location point (center) of the circle. 
152         ---C++: return const&
153
154   Radius (me)  returns Real  is static;
155         --- Purpose : Returns the radius value of the circle.
156         ---C++: inline
157        
158   Axis (me)  returns Ax22d   is static;
159         --- Purpose : returns the position of the circle.
160         ---C++: inline
161         ---C++: return const&
162
163   Position (me)  returns Ax22d   is static;
164         --- Purpose : returns the position of the circle. Idem Axis(me).
165         ---C++: inline
166         ---C++: return const&
167
168   XAxis (me)  returns Ax2d   is static;
169         ---C++: inline
170         --- Purpose : returns the X axis of the circle.
171
172   YAxis (me)  returns Ax2d  is static;
173         ---C++: inline
174         --- Purpose : Returns the Y axis of the circle.
175
176         --- Purpose : Reverses the direction of the circle.
177
178   Reverse (me : in out)         is static;
179         ---C++: inline
180         --- Purpose: Reverses the orientation of the local coordinate system
181         -- of this circle (the "Y Direction" is reversed) and therefore
182         --- changes the implicit orientation of this circle.
183         --   Reverse assigns the result to this circle, 
184   Reversed (me)  returns Circ2d  is static;
185         ---C++: inline
186         ---Purpose: Reverses the orientation of the local coordinate system
187         -- of this circle (the "Y Direction" is reversed) and therefore
188         -- changes the implicit orientation of this circle.
189         --   Reversed creates a new circle.
190
191   IsDirect (me)  returns Boolean  is static;
192         ---C++: inline
193         --- Purpose : Returns true if the local coordinate system is direct
194         -- and false in the other case.
195
196
197   Mirror (me : in out; P : Pnt2d)           is static;
198
199   Mirrored (me; P : Pnt2d)  returns Circ2d  is static;
200
201
202         --- Purpose :
203         --  Performs the symmetrical transformation of a circle with respect 
204         --  to the point P which is the center of the symmetry
205
206
207
208   Mirror (me : in out; A : Ax2d)           is static;
209
210   Mirrored (me; A : Ax2d)  returns Circ2d  is static;
211
212         --- Purpose :
213         --  Performs the symmetrical transformation of a circle with respect 
214         --  to an axis placement which is the axis of the symmetry.
215       
216   Rotate (me : in out; P : Pnt2d; Ang : Real)          is static;
217         ---C++: inline
218
219   Rotated (me; P : Pnt2d; Ang : Real)  returns Circ2d  is static;
220         ---C++: inline
221         --- Purpose :
222         --  Rotates a circle. P is the center of the rotation.
223         --  Ang is the angular value of the rotation in radians.
224
225
226   Scale (me : in out; P : Pnt2d; S : Real)          is static;
227         ---C++: inline
228         
229   Scaled (me; P : Pnt2d; S : Real)  returns Circ2d  is static;
230         ---C++: inline
231         --- Purpose : 
232         --  Scales a circle. S is the scaling value.
233         -- Warnings :
234         --  If S is negative the radius stay positive but
235         --  the "XAxis" and the "YAxis" are  reversed as for
236         --  an ellipse.
237
238   Transform (me : in out; T : Trsf2d)            is static;
239         ---C++: inline 
240   Transformed (me; T : Trsf2d)  returns Circ2d   is static;
241         ---C++: inline
242         --- Purpose :
243         --  Transforms a circle with the transformation T from class Trsf2d.
244
245
246
247
248   Translate (me : in out; V : Vec2d)           is static;
249         ---C++: inline
250         
251   Translated (me; V : Vec2d)   returns Circ2d  is static;
252         ---C++: inline
253         --- Purpose :
254         --  Translates a circle in the direction of the vector V.
255         --  The magnitude of the translation is the vector's magnitude.
256
257   
258
259   Translate (me : in out; P1, P2 : Pnt2d)           is static;
260         ---C++: inline
261         
262   Translated (me; P1, P2 : Pnt2d)   returns Circ2d  is static;
263         ---C++: inline
264         --- Purpose :
265         --  Translates a circle from the point P1 to the point P2.
266
267 fields
268
269   pos    : Ax22d;
270   radius : Real;  
271
272 end;