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