0023934: Compiler warnings in MS VC++ 10
[occt.git] / src / Extrema / Extrema_GenExtPS.cdl
CommitLineData
b311480e 1-- Created on: 1995-07-18
2-- Created by: Modelistation
3-- Copyright (c) 1995-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
23class GenExtPS from Extrema
24
25 ---Purpose: It calculates all the extremum distances
26 -- between a point and a surface.
27 -- These distances can be minimum or maximum.
28
29uses POnSurf from Extrema,
30 Pnt from gp,
7fd59977 31 FuncExtPS from Extrema,
32 Surface from Adaptor3d,
92d1589b
A
33 SurfacePtr from Adaptor3d,
34 HUBTreeOfSphere from Extrema,
35 ExtFlag from Extrema,
36 ExtAlgo from Extrema,
37 HArray1OfSphere from Bnd,
38 Vector from math,
6060dd1f 39 HArray1OfReal from TColStd,
40 POnSurfParams from Extrema,
41 HArray2OfPOnSurfParams from Extrema
7fd59977 42
43raises NotDone from StdFail,
44 OutOfRange from Standard,
45 TypeMismatch from Standard
46
47
48is
49
50 Create returns GenExtPS;
51
92d1589b 52 Create (P: Pnt; S: Surface from Adaptor3d; NbU,NbV: Integer; TolU,TolV: Real; F : ExtFlag from Extrema = Extrema_ExtFlag_MINMAX; A : ExtAlgo from Extrema = Extrema_ExtAlgo_Grad)
7fd59977 53 returns GenExtPS;
54 ---Purpose: It calculates all the distances.
55 -- The function F(u,v)=distance(P,S(u,v)) has an
56 -- extremum when gradient(F)=0. The algorithm searchs
57 -- all the zeros inside the definition ranges of the
58 -- surface.
59 -- NbU and NbV are used to locate the close points
60 -- to find the zeros. They must be great enough
61 -- such that if there is N extrema, there will
62 -- be N extrema between P and the grid.
63 -- TolU et TolV are used to determine the conditions
64 -- to stop the iterations; at the iteration number n:
65 -- (Un - Un-1) < TolU and (Vn - Vn-1) < TolV .
66
67
68 Create (P: Pnt; S: Surface from Adaptor3d; NbU,NbV: Integer;
92d1589b 69 Umin, Usup, Vmin, Vsup: Real; TolU,TolV: Real; F : ExtFlag from Extrema = Extrema_ExtFlag_MINMAX; A : ExtAlgo from Extrema = Extrema_ExtAlgo_Grad)
7fd59977 70 returns GenExtPS;
71 ---Purpose: It calculates all the distances.
72 -- The function F(u,v)=distance(P,S(u,v)) has an
73 -- extremum when gradient(F)=0. The algorithm searchs
74 -- all the zeros inside the definition ranges of the
75 -- surface.
76 -- NbU and NbV are used to locate the close points
77 -- to find the zeros. They must be great enough
78 -- such that if there is N extrema, there will
79 -- be N extrema between P and the grid.
80 -- TolU et TolV are used to determine the conditions
81 -- to stop the iterations; at the iteration number n:
82 -- (Un - Un-1) < TolU and (Vn - Vn-1) < TolV .
83
84
85 Initialize(me: in out; S: Surface from Adaptor3d; NbU, NbV: Integer; TolU, TolV: Real)
86 ---Pupose: sets the fields of the algorithm.
87 is static;
88
89
90 Initialize(me: in out; S: Surface from Adaptor3d; NbU, NbV: Integer;
91 Umin, Usup, Vmin, Vsup: Real; TolU, TolV: Real)
92 ---Pupose: sets the fields of the algorithm.
93 is static;
94
95
96 Perform(me: in out; P: Pnt from gp)
97 ---Purpose: the algorithm is done with the point P.
98 -- An exception is raised if the fields have not
99 -- been initialized.
100 raises TypeMismatch from Standard
101 is static;
92d1589b
A
102
103 SetFlag(me : in out; F : ExtFlag from Extrema)
104 is static;
105
106 SetAlgo(me : in out; A : ExtAlgo from Extrema)
107 is static;
7fd59977 108
109
110 IsDone (me) returns Boolean
111 ---Purpose: Returns True if the distances are found.
112 is static;
113
114 NbExt (me) returns Integer
115 ---Purpose: Returns the number of extremum distances.
116 raises NotDone from StdFail
117 -- if IsDone(me)=False.
118 is static;
119
120 SquareDistance (me; N: Integer) returns Real
121 ---Purpose: Returns the value of the Nth resulting square distance.
122 raises NotDone from StdFail,
123 -- if IsDone(me)=False.
124 OutOfRange
125 -- if N < 1 or N > NbPoints(me).
126 is static;
127
128 Point (me; N: Integer) returns POnSurf
129 ---Purpose: Returns the point of the Nth resulting distance.
130 raises NotDone from StdFail,
131 -- if IsDone(me)=False.
132 OutOfRange
133 -- if N < 1 or N > NbPoints(me).
134 is static;
135
136 Bidon(me) returns SurfacePtr from Adaptor3d
137 is static private;
92d1589b
A
138
139 BuildTree(me : in out)
140 is static private;
141
6060dd1f 142 FindSolution(me: in out; P : Pnt from gp;
143 theParams: POnSurfParams from Extrema)
92d1589b 144 is static private;
5368adff 145
146 GetGridPoints(me: in out; theSurf: Surface from Adaptor3d) is private;
147 ---Purpose: Selection of points to build grid, depending on the type of surface
148
6060dd1f 149 BuildGrid(me: in out; thePoint: Pnt from gp) is private;
5368adff 150 ---Purpose: Creation of grid of parametric points
7fd59977 151
152fields
153 myDone : Boolean;
154 myInit : Boolean;
155 myumin : Real;
156 myusup : Real;
157 myvmin : Real;
158 myvsup : Real;
159 myusample : Integer;
160 myvsample : Integer;
7fd59977 161 mytolu : Real;
162 mytolv : Real;
6060dd1f 163 myPoints : HArray2OfPOnSurfParams from Extrema;
92d1589b
A
164 mySphereUBTree : HUBTreeOfSphere from Extrema;
165 mySphereArray : HArray1OfSphere from Bnd;
7fd59977 166 myF : FuncExtPS from Extrema;
167 myS : SurfacePtr from Adaptor3d;
92d1589b
A
168 myFlag : ExtFlag from Extrema;
169 myAlgo : ExtAlgo from Extrema;
5368adff 170 myUParams : HArray1OfReal from TColStd;
171 myVParams : HArray1OfReal from TColStd;
6060dd1f 172 myFacePntParams : HArray2OfPOnSurfParams from Extrema;
7fd59977 173
174end GenExtPS;