0023964: Extrema_ExtXX::Point methods might return constant reference instead of...
[occt.git] / src / Extrema / Extrema_ExtPRevS.cdl
1 -- Created on: 1999-09-21
2 -- Created by: Edward AGAPOV
3 -- Copyright (c) 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
21
22
23 class ExtPRevS from Extrema 
24                     
25         ---Purpose: It calculates all the extremum (minimum and
26         --          maximum) distances between a point and a surface
27         --          of revolution.
28                     
29 uses
30     POnSurf from Extrema,
31     GenExtPS from Extrema,
32
33     SurfaceOfRevolution from Adaptor3d,
34     SurfacePtr from Adaptor3d,
35     
36     Ax2 from gp,
37     Pnt from gp
38
39 raises 
40     NotDone from StdFail,
41     OutOfRange
42
43
44 is
45
46     Create returns ExtPRevS from Extrema;
47
48     Create (P: Pnt; S: SurfaceOfRevolution from Adaptor3d;
49                     Umin, Usup, Vmin, Vsup: Real; 
50                     TolU,TolV: Real) 
51                     returns ExtPRevS from Extrema;
52     ---Purpose: It calculates all the distances between a point 
53     --          from gp and a SurfacePtr from Adaptor3d.
54     
55     Create (P: Pnt; S: SurfaceOfRevolution from Adaptor3d; 
56                     TolU,TolV: Real) 
57                     returns ExtPRevS from Extrema;
58     ---Purpose: It calculates all the distances between a point 
59     --          from gp and a SurfacePtr from Adaptor3d.
60     
61     Initialize(me: in out; S: SurfaceOfRevolution from Adaptor3d; 
62                            Umin, Usup, Vmin, Vsup: Real; 
63                            TolU,TolV: Real)
64                     is static;
65     
66     Perform (me: in out; P: Pnt)
67                     is static;
68     
69     IsDone (me) returns Boolean
70     ---Purpose: Returns True if the distances are found.
71                     is static;
72     
73     NbExt (me) returns Integer
74     ---Purpose: Returns the number of extremum distances.
75                     raises  NotDone from StdFail
76                 -- if IsDone(me)=False.
77                     is static;
78
79     SquareDistance (me; N: Integer) returns Real
80     ---Purpose: Returns the value of the Nth resulting square distance.
81                     raises  NotDone from StdFail,
82                 -- if IsDone(me)=False.
83                 OutOfRange
84                 -- if N < 1 or N > NbPoints(me).
85                     is static;
86
87     Point (me; N: Integer) returns POnSurf
88     ---C++: return const &
89     ---Purpose: Returns the point of the Nth resulting distance.
90                     raises  NotDone from StdFail,
91                 -- if IsDone(me)=False.
92                 OutOfRange
93                 -- if N < 1 or N > NbPoints(me).
94                     is static;
95
96 fields
97     myS      : SurfacePtr from Adaptor3d;
98     myvinf   : Real       from Standard;
99     myvsup   : Real       from Standard;
100     mytolv   : Real       from Standard;
101     
102     myPosition  : Ax2      from gp;
103     myExtPS     : GenExtPS from Extrema;
104     
105     myIsAnalyticallyComputable : Boolean  from Standard;
106
107     myDone : Boolean;
108     myNbExt: Integer;
109     mySqDist: Real [8];
110     myPoint: POnSurf from Extrema [8];
111
112 end ExtPRevS;