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
6 -- This file is part of Open CASCADE Technology software library.
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class LocateExtCC2d from Extrema
19 ---Purpose: It calculates the distance between two curves with
20 -- a close point; these distances can be maximum or
23 uses POnCurv2d from Extrema,
26 HArray1OfPnt2d from TColgp,
27 Curve2d from Adaptor2d,
28 Curve2dTool from Extrema,
29 LCCache2d from Extrema
31 raises DomainError from Standard,
35 Create (C1: Curve2d from Adaptor2d; C2: Curve2d from Adaptor2d; U0,V0: Real)
37 ---Purpose: Calculates the distance with a close point. The
38 -- close point is defined by a parameter value on each
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.
44 -- if U0 and V0 are outside the definition ranges of the
47 IsDone (me) returns Boolean
48 ---Purpose: Returns True if the distance is found.
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.
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.