0024134: Wrong result of projection point on the face
[occt.git] / src / Extrema / Extrema_ExtSS.cdl
1 -- Created on: 1991-02-21
2 -- Created by: Isabelle GRIGNON
3 -- Copyright (c) 1991-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 ExtSS from Extrema 
24         ---Purpose: It calculates all the extremum distances
25         --          between two surfaces.
26         --          These distances can be minimum or maximum.
27
28 uses    POnSurf           from Extrema,
29         ExtElSS           from Extrema,
30         Pnt               from gp,
31         SurfaceType       from GeomAbs,
32         SequenceOfPOnSurf from Extrema,
33         SequenceOfReal    from TColStd,
34         Surface           from Adaptor3d,
35         SurfacePtr        from Adaptor3d
36         
37
38 raises  NotDone      from StdFail,
39         OutOfRange   from Standard,
40         TypeMismatch from Standard
41         
42         
43 is
44     Create returns ExtSS;
45
46
47     Create (S1, S2: Surface from Adaptor3d; TolS1, TolS2: Real)
48         returns ExtSS;
49         ---Purpose: It calculates all the distances between S1 and S2.
50     
51
52     Create (S1, S2: Surface from Adaptor3d;
53             Uinf1, Usup1, Vinf1, Vsup1: Real;
54             Uinf2, Usup2, Vinf2, Vsup2: Real;
55             TolS1, TolS2: Real)
56         returns ExtSS;
57         ---Purpose: It calculates all the distances between S1 and S2.
58     
59
60     Initialize(me: in out; S2: Surface from Adaptor3d;
61                Uinf2, Usup2, Vinf2, Vsup2: Real; TolS1: Real)
62         ---Purpose: Initializes the fields of the algorithm.
63     
64     is static;
65     
66     Perform(me: in out; S1: Surface from Adaptor3d; 
67             Uinf1, Usup1, Vinf1, Vsup1: Real; TolS1: Real)
68         ---Purpose: Computes the distances.
69         --          An exception is raised if the fieds have not been 
70         --          initialized.
71     
72     raises TypeMismatch from Standard
73     is static;
74     
75     
76     IsDone (me) returns Boolean
77         ---Purpose: Returns True if the distances are found.
78         is static;
79     
80     IsParallel (me) returns Boolean
81         ---Purpose: Returns True if the curve is on a parallel surface.
82         raises  NotDone from StdFail
83                 -- if IsDone(me)=False.
84         is static;
85
86
87     NbExt (me) returns Integer
88         ---Purpose: Returns the number of extremum distances.
89         raises  NotDone from StdFail
90                 -- if IsDone(me)=False.
91         is static;
92
93     SquareDistance (me; N: Integer) returns Real
94         ---Purpose: Returns the value of the Nth resulting square distance.
95         raises  NotDone from StdFail,
96                 -- if IsDone(me)=False.
97                 OutOfRange
98                 -- if N < 1 or N > NbPoints(me).
99         is static;
100
101     Points (me; N: Integer; P1: out POnSurf; P2: out POnSurf) 
102         ---Purpose: Returns the point of the Nth resulting distance.
103         raises  NotDone from StdFail,
104                 -- if IsDone(me)=False.
105                 OutOfRange from Standard
106                 -- if N < 1 or N > NbPoints(me).
107         is static;
108
109     Bidon(me) returns SurfacePtr from Adaptor3d
110     is static private;
111
112
113 fields
114     myS2     : SurfacePtr        from Adaptor3d;
115     myDone   : Boolean           from Standard;
116     myIsPar  : Boolean           from Standard;
117     myExtElSS: ExtElSS           from Extrema;
118     myPOnS1  : SequenceOfPOnSurf from Extrema;
119     myPOnS2  : SequenceOfPOnSurf from Extrema;
120     myuinf1  : Real              from Standard;
121     myusup1  : Real              from Standard;
122     myvinf1  : Real              from Standard;
123     myvsup1  : Real              from Standard;
124     myuinf2  : Real              from Standard;
125     myusup2  : Real              from Standard;
126     myvinf2  : Real              from Standard;
127     myvsup2  : Real              from Standard;
128     mytolS1  : Real              from Standard;
129     mytolS2  : Real              from Standard;
130     mySqDist : SequenceOfReal    from TColStd;
131     myStype  : SurfaceType       from GeomAbs;
132
133 end ExtSS;