0024510: Remove unused local variables
[occt.git] / src / Extrema / Extrema_ExtPS.cdl
1 -- Created on: 1994-02-01
2 -- Created by: Laurent PAINNOT
3 -- Copyright (c) 1994-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
9 -- under the terms of the GNU Lesser General Public 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 class ExtPS from Extrema
18                     
19         ---Purpose: It calculates all the extremum distances
20         --          between a point and a surface.
21         --          These distances can be minimum or maximum.
22                     
23 uses    
24     POnSurf           from Extrema,
25     ExtPElS           from Extrema,
26     Pnt               from gp,
27     SurfaceType       from GeomAbs,
28     SequenceOfPOnSurf from Extrema,
29     SequenceOfReal    from TColStd,
30     Surface           from Adaptor3d,
31     SurfacePtr        from Adaptor3d,
32     GenExtPS          from Extrema,
33     ExtFlag                       from Extrema,
34     ExtAlgo                       from Extrema
35 --    ExtPExtS from Extrema,
36 --    ExtPRevS from Extrema
37
38
39 raises  NotDone      from StdFail,
40     OutOfRange   from Standard,
41     TypeMismatch from Standard
42         
43         
44         
45 is
46     Create returns ExtPS;
47
48
49     Create (P: Pnt from gp; S: Surface from Adaptor3d; TolU,TolV: Real; 
50                         F : ExtFlag from Extrema = Extrema_ExtFlag_MINMAX; 
51                         A : ExtAlgo from Extrema = Extrema_ExtAlgo_Grad)
52         returns ExtPS;
53         ---Purpose: It calculates all the distances.
54         --          NbU and NbV are used to locate the close points
55         --          to find the zeros. They must be great enough
56         --          such that if there is N extrema, there will
57         --          be N extrema between P and the grid.
58         --          TolU et TolV are used to determine the conditions 
59         --          to stop the iterations; at the iteration number n:
60         --           (Un - Un-1) < TolU and (Vn - Vn-1) < TolV .
61     
62     Create (P: Pnt from gp; S: Surface from Adaptor3d;
63             Uinf, Usup, Vinf, Vsup: Real;
64             TolU,TolV: Real; 
65             F : ExtFlag from Extrema = Extrema_ExtFlag_MINMAX; 
66             A : ExtAlgo from Extrema = Extrema_ExtAlgo_Grad)
67         returns ExtPS;
68         ---Purpose: It calculates all the distances.
69         --          NbU and NbV are used to locate the close points
70         --          to find the zeros. They must be great enough
71         --          such that if there is N extrema, there will
72         --          be N extrema between P and the grid.
73         --          TolU et TolV are used to determine the conditions 
74         --          to stop the iterations; at the iteration number n:
75         --           (Un - Un-1) < TolU and (Vn - Vn-1) < TolV .
76     
77
78     Initialize(me: in out; S: Surface from Adaptor3d;
79                Uinf, Usup, Vinf, Vsup: Real;
80                TolU, TolV: Real)
81         ---Purpose: Initializes the fields of the algorithm.
82     
83     is static;
84     
85     Perform(me: in out; P: Pnt from gp)
86         ---Purpose: Computes the distances.
87         --          An exception is raised if the fieds have not been 
88         --          initialized.
89     
90     raises TypeMismatch from Standard
91     is static;
92     
93     
94     IsDone (me) returns Boolean
95         ---Purpose: Returns True if the distances are found.
96         is static;
97     
98     NbExt (me) returns Integer
99         ---Purpose: Returns the number of extremum distances.
100         raises  NotDone from StdFail
101                 -- if IsDone(me)=False.
102         is static;
103
104     SquareDistance (me; N: Integer) returns Real
105         ---Purpose: Returns the value of the Nth resulting square distance.
106         raises  NotDone from StdFail,
107                 -- if IsDone(me)=False.
108                 OutOfRange
109                 -- if N < 1 or N > NbPoints(me).
110         is static;
111
112     Point (me; N: Integer) returns POnSurf
113         ---C++: return const &
114         ---Purpose: Returns the point of the Nth resulting distance.
115         raises  NotDone from StdFail,
116                 -- if IsDone(me)=False.
117                 OutOfRange
118                 -- if N < 1 or N > NbPoints(me).
119         is static;
120
121     TrimmedSquareDistances(me; dUfVf, dUfVl, dUlVf, dUlVl: out Real;
122                      PUfVf, PUfVl, PUlVf, PUlVl: out Pnt)
123         ---Purpose: if the surface is a trimmed surface,
124         --          dUfVf is a square distance between <P> and the point
125         --          of parameter FirstUParameter and FirstVParameter <PUfVf>.
126         --          dUfVl is a square distance between <P> and the point
127         --          of parameter FirstUParameter and LastVParameter <PUfVl>.
128         --          dUlVf is a square distance between <P> and the point
129         --          of parameter LastUParameter and FirstVParameter <PUlVf>.
130         --          dUlVl is a square distance between <P> and the point
131         --          of parameter LastUParameter and LastVParameter <PUlVl>.
132     is static;
133     
134     SetFlag(me : in out; F : ExtFlag from Extrema)
135         is static;
136         
137     SetAlgo(me : in out; A : ExtAlgo from Extrema)
138         is static;
139
140
141     Bidon(me) returns SurfacePtr from Adaptor3d
142                     is static private;
143     
144 --  modified by NIZHNY-EAP Fri Oct 29 09:44:34 1999 ___BEGIN___
145     TreatSolution (me:in out; PS: POnSurf from Extrema;
146                               Val: Real from Standard)
147                     is static private;
148 --  modified by NIZHNY-EAP Fri Oct 29 09:44:37 1999 ___END___
149 fields
150     myS      : SurfacePtr        from Adaptor3d;
151     myDone   : Boolean           from Standard;
152     myExtPElS: ExtPElS           from Extrema;
153     myExtPS  : GenExtPS          from Extrema;
154     myPoints : SequenceOfPOnSurf from Extrema;
155     myuinf   : Real              from Standard;
156     myusup   : Real              from Standard;
157     myvinf   : Real              from Standard;
158     myvsup   : Real              from Standard;
159     mytolu   : Real              from Standard;
160     mytolv   : Real              from Standard;
161     d11      : Real              from Standard;
162     d12      : Real              from Standard;
163     d21      : Real              from Standard;
164     d22      : Real              from Standard;
165     P11      : Pnt               from gp;
166     P12      : Pnt               from gp;
167     P21      : Pnt               from gp;
168     P22      : Pnt               from gp;
169     mySqDist : SequenceOfReal    from TColStd;
170     mytype   : SurfaceType       from GeomAbs;
171
172 end ExtPS;