2a4dbd4c6d9fe9e2fd8b93e2acf3ace60ccd1778
[occt.git] / src / Extrema / Extrema_LocateExtCC2d.cdl
1 -- Created on: 1994-07-06
2 -- Created by: Laurent PAINNOT
3 -- Copyright (c) 1994-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 under
9 -- the terms of the GNU Lesser General Public License 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 LocateExtCC2d from Extrema
18
19     ---Purpose: It calculates the distance between two curves with
20     --          a close point; these distances can be maximum or 
21     --          minimum.
22
23 uses   POnCurv2d   from Extrema,
24        Pnt2d       from gp,
25        Vec2d       from gp,
26        HArray1OfPnt2d from TColgp,
27        Curve2d     from Adaptor2d,
28        Curve2dTool from Extrema,
29        LCCache2d   from Extrema
30
31 raises  DomainError  from Standard,
32         NotDone      from StdFail
33
34 is
35     Create (C1: Curve2d from Adaptor2d; C2: Curve2d from Adaptor2d; U0,V0: Real)
36         returns LocateExtCC2d
37         ---Purpose: Calculates the distance with a close point. The
38         --          close point is defined by a parameter value on each 
39         --          curve.
40         --          The function F(u,v)=distance(C1(u),C2(v)) has an 
41         --          extremun when gradient(f)=0. The algorithm searchs
42         --          the zero near the close point.
43         raises  DomainError;
44                 -- if U0 and V0 are outside the definition ranges of the 
45                 -- curves.
46     
47     IsDone (me) returns Boolean
48         ---Purpose: Returns True if the distance is found.
49         is static;
50
51     SquareDistance (me) returns Real
52         ---Purpose: Returns the value of the extremum square distance.
53         raises  NotDone from StdFail
54                 -- if IsDone(me)=False.
55         is static;
56
57     Point (me; P1,P2: out POnCurv2d)
58         ---Purpose: Returns the points of the extremum distance. 
59         --          P1 is on the first curve, P2 on the second one.
60         raises  NotDone from StdFail
61                 -- if IsDone(me)=False.
62         is static;
63
64 fields
65     myDone  : Boolean;
66     mySqDist: Real;
67     myPoint1: POnCurv2d;
68     myPoint2: POnCurv2d;
69
70 end LocateExtCC2d;