1 -- File: Extrema_GLocateExtCC2d.cdl
2 -- Created: Wed Jul 6 15:45:52 1994
3 -- Author: Laurent PAINNOT
5 ---Copyright: Matra Datavision 1994
7 generic class GLocateExtCC2d from Extrema (Curve1 as any;
12 ---Purpose: It calculates the distance between two curves with
13 -- a close point; these distances can be maximum or
16 uses POnCurv2d from Extrema,
19 HArray1OfPnt2d from TColgp
21 raises DomainError from Standard,
25 class LCCache2d instantiates CurveCache from Extrema (Curve1, Pnt2d from gp, HArray1OfPnt2d from TColgp);
27 class ELCC2d instantiates GenExtCC from Extrema
33 HArray1OfPnt2d from TColgp,
39 class LocECC2d instantiates GenLocateExtCC from Extrema
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
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.
59 -- if U0 and V0 are outside the definition ranges of the
62 IsDone (me) returns Boolean
63 ---Purpose: Returns True if the distance is found.
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.
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.