0024134: Wrong result of projection point on the face
[occt.git] / src / Extrema / Extrema_FuncExtSS.cdl
1 -- Created on: 1996-01-09
2 -- Created by: Laurent PAINNOT
3 -- Copyright (c) 1996-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 private class FuncExtSS from Extrema
23
24  inherits FunctionSetWithDerivatives from math
25     ---Purpose: Function to find extrema of the 
26     --          distance between two surfaces.
27
28 uses    POnSurf           from Extrema,
29         SequenceOfPOnSurf from Extrema,
30         SequenceOfReal    from TColStd,
31         Pnt               from gp,
32         Vector            from math,
33         Matrix            from math,
34         Surface           from Adaptor3d,
35         SurfacePtr        from Adaptor3d
36
37 raises  OutOfRange from Standard
38
39 is
40     Create returns FuncExtSS;
41
42     Create (S1, S2: Surface from Adaptor3d) returns FuncExtSS;
43         ---Purpose:
44
45     Initialize(me: in out; S1, S2: Surface from Adaptor3d)
46         ---Purpose: sets the field mysurf of the function.
47     is static;
48     
49     ------------------------------------------------------------
50     -- In all next methods, an exception is raised if the fields 
51     -- were not initialized.
52
53     NbVariables (me) returns Integer;
54
55     NbEquations (me) returns Integer;
56
57     Value (me: in out; UV: Vector; F: out Vector) returns Boolean;
58         ---Purpose: Calculate Fi(U,V).
59
60     Derivatives (me: in out; UV: Vector; DF: out Matrix)
61         returns Boolean;
62         ---Purpose: Calculate Fi'(U,V).
63
64     Values (me: in out; UV: Vector; F: out Vector; DF: out Matrix)
65         returns Boolean;
66         ---Purpose: Calculate Fi(U,V) and Fi'(U,V).
67
68     GetStateNumber (me: in out) returns Integer
69         ---Purpose: Save the found extremum.
70         is redefined;
71
72     NbExt (me) returns Integer;
73         ---Purpose: Return the number of found extrema.
74
75     SquareDistance (me; N: Integer) returns Real
76         ---Purpose: Return the value of the Nth distance.
77         raises  OutOfRange;
78                 -- if N < 1 or N > NbExt(me).
79
80     PointOnS1 (me; N: Integer) returns POnSurf
81         ---C++: return const &
82         ---Purpose: Return the Nth extremum on S1.
83         raises  OutOfRange;
84                 -- if N < 1 or N > NbExt(me).
85
86     PointOnS2 (me; N: Integer) returns POnSurf
87         ---C++: return const &
88         ---Purpose: Renvoie le Nieme extremum sur S2.
89         raises  OutOfRange;
90                 -- si N < 1 ou N > NbExt(me).
91
92     Bidon(me) returns SurfacePtr from Adaptor3d
93     is static private;
94
95
96 fields
97     myS1   : SurfacePtr from Adaptor3d;
98     myS2   : SurfacePtr from Adaptor3d;
99     
100     myP1   : Pnt from gp;
101     myP2   : Pnt from gp;
102
103     myU1    : Real;          -- current value of U on S1
104     myV1    : Real;          -- current value of V on S1
105     myU2    : Real;          -- current value of U on S2
106     myV2    : Real;          -- current value of V on S2
107
108     mySqDist:  SequenceOfReal    from TColStd;
109     myPoint1: SequenceOfPOnSurf from Extrema;
110     myPoint2: SequenceOfPOnSurf from Extrema;
111     
112     myS1init: Boolean;
113     myS2init: Boolean;
114
115 end FuncExtSS;