0023022: This is desirable to access OpenGl extensions and core API (1.2+) in one...
[occt.git] / src / Extrema / Extrema_GLocateExtCC2d.cdl
1 -- File:        Extrema_GLocateExtCC2d.cdl
2 -- Created:     Wed Jul  6 15:45:52 1994
3 -- Author:      Laurent PAINNOT
4 --              <lpa@metrox>
5 ---Copyright:    Matra Datavision 1994
6
7 generic class GLocateExtCC2d from Extrema (Curve1    as any;
8                                            Tool1     as any;
9                                            Curve2    as any;
10                                            Tool2     as any)
11                                         
12         ---Purpose: It calculates the distance between two curves with
13         --          a close point; these distances can be maximum or 
14         --          minimum.
15
16 uses   POnCurv2d from Extrema,
17        Pnt2d     from gp,
18        Vec2d     from gp,
19        HArray1OfPnt2d from TColgp
20
21 raises  DomainError  from Standard,
22         NotDone      from StdFail
23
24
25     class LCCache2d instantiates CurveCache from Extrema (Curve1, Pnt2d from gp, HArray1OfPnt2d from TColgp);
26
27     class ELCC2d    instantiates GenExtCC      from Extrema
28         (Curve1,
29          Tool1,
30          Curve2,
31          Tool2,
32          LCCache2d,
33          HArray1OfPnt2d from TColgp,
34          POnCurv2d,
35          Pnt2d,
36          Vec2d);
37
38
39     class LocECC2d    instantiates GenLocateExtCC      from Extrema
40         (Curve1,
41          Tool1,
42          Curve2,
43          Tool2,
44          POnCurv2d,
45          Pnt2d,
46          Vec2d);
47
48
49 is
50     Create (C1: Curve1; C2: Curve2; U0,V0: Real)
51         returns GLocateExtCC2d
52         ---Purpose: Calculates the distance with a close point. The
53         --          close point is defined by a parameter value on each 
54         --          curve.
55         --          The function F(u,v)=distance(C1(u),C2(v)) has an 
56         --          extremun when gradient(f)=0. The algorithm searchs
57         --          the zero near the close point.
58         raises  DomainError;
59                 -- if U0 and V0 are outside the definition ranges of the 
60                 -- curves.
61     
62     IsDone (me) returns Boolean
63         ---Purpose: Returns True if the distance is found.
64         is static;
65
66     SquareDistance (me) returns Real
67         ---Purpose: Returns the value of the extremum square distance.
68         raises  NotDone from StdFail
69                 -- if IsDone(me)=False.
70         is static;
71
72     Point (me; P1,P2: out POnCurv2d)
73         ---Purpose: Returns the points of the extremum distance. 
74         --          P1 is on the first curve, P2 on the second one.
75         raises  NotDone from StdFail
76                 -- if IsDone(me)=False.
77         is static;
78
79 fields
80     myDone  : Boolean;
81     mySqDist: Real;
82     myPoint1: POnCurv2d;
83     myPoint2: POnCurv2d;
84
85 end GLocateExtCC2d;