0024001: Stereographic rendering support
[occt.git] / src / Extrema / Extrema_GenLocateExtSS.cdl
1 -- Created on: 1996-01-22
2 -- Created by: Laurent PAINNOT
3 -- Copyright (c) 1996-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   GenLocateExtSS from Extrema
18                                          
19         ---Purpose: With two close points it calculates the distance 
20         --          between two surfaces.
21         --          This distance can be a minimum or a maximum.
22
23 uses    POnSurf from Extrema,
24         Pnt     from gp,
25         Surface from Adaptor3d
26  
27 raises  DomainError from Standard,
28         NotDone     from StdFail
29
30
31 is
32     Create returns GenLocateExtSS;
33
34     Create (S1, S2: Surface from Adaptor3d; U1,V1, U2,V2: Real; Tol1,Tol2: Real)
35         returns GenLocateExtSS
36         ---Purpose: Calculates the distance with two close points.
37         --          The close points are defined by the parameter values
38         --          (U1,V1) for S1 and (U2,V2) for S2.
39         --          The function F(u1,v1,u2,v2)=distance(S1(u1,v1),S2(u2,v2)) 
40         --          has an extremun when gradient(F)=0. The algorithm searchs
41         --          a zero near the close points.
42         raises  DomainError;
43                 -- if U1,V1,U2,V2 are outside the definition ranges of the 
44                 -- surfaces.
45     
46     Perform(me: in out; S1, S2: Surface from Adaptor3d; 
47             U1,V1, U2,V2: Real; Tol1,Tol2: Real) 
48     is static;
49     
50     
51     IsDone (me) returns Boolean
52         ---Purpose: Returns True if the distance is found.
53         is static;
54
55     SquareDistance (me) returns Real
56         ---Purpose: Returns the value of the extremum square distance.
57         raises  NotDone from StdFail
58                 -- if IsDone(me)=False.
59         is static;
60
61     PointOnS1 (me) returns POnSurf
62         ---Purpose: Returns the point of the extremum distance on S1.
63         ---C++: return const&
64         raises  NotDone from StdFail
65                 -- if IsDone(me)=False.
66         is static;
67
68
69     PointOnS2 (me) returns POnSurf
70         ---Purpose: Returns the point of the extremum distance on S2.
71         ---C++: return const&
72         raises  NotDone from StdFail
73                 -- if IsDone(me)=False.
74         is static;
75
76 fields
77     myDone  : Boolean;
78     mySqDist: Real;
79     myPoint1: POnSurf from Extrema;
80     myPoint2: POnSurf from Extrema;
81
82 end GenLocateExtSS;