0023404: Create SquareConfusion function in Precision package for speed and convenience
[occt.git] / src / Extrema / Extrema_GLocateExtCC.cdl
CommitLineData
b311480e 1-- Created on: 1994-07-06
2-- Created by: Laurent PAINNOT
3-- Copyright (c) 1994-1999 Matra Datavision
4-- Copyright (c) 1999-2012 OPEN CASCADE SAS
5--
6-- The content of this file is subject to the Open CASCADE Technology Public
7-- License Version 6.5 (the "License"). You may not use the content of this file
8-- except in compliance with the License. Please obtain a copy of the License
9-- at http://www.opencascade.org and read it completely before using this file.
10--
11-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13--
14-- The Original Code and all software distributed under the License is
15-- distributed on an "AS IS" basis, without warranty of any kind, and the
16-- Initial Developer hereby disclaims all such warranties, including without
17-- limitation, any warranties of merchantability, fitness for a particular
18-- purpose or non-infringement. Please see the License for the specific terms
19-- and conditions governing the rights and limitations under the License.
20
7fd59977 21
22generic class GLocateExtCC from Extrema (Curve1 as any;
23 Tool1 as any;
24 Curve2 as any;
25 Tool2 as any)
26
27 ---Purpose: It calculates the distance between two curves with
28 -- a close point; these distances can be maximum or
29 -- minimum.
30
31uses POnCurv from Extrema,
32 Pnt from gp,
33 HArray1OfPnt from TColgp
34
35raises DomainError from Standard,
36 NotDone from StdFail
37
38
39 class LCCache instantiates CurveCache from Extrema (Curve1, Pnt from gp, HArray1OfPnt from TColgp);
40
41 class ELCC instantiates GenExtCC from Extrema
42 (Curve1,
43 Tool1,
44 Curve2,
45 Tool2,
46 LCCache,
47 HArray1OfPnt from TColgp,
48 POnCurv,
49 Pnt,
50 Vec);
51
52
53 class LocECC instantiates GenLocateExtCC from Extrema
54 (Curve1,
55 Tool1,
56 Curve2,
57 Tool2,
58 POnCurv,
59 Pnt,
60 Vec);
61
62
63is
64 Create (C1: Curve1; C2: Curve2; U0,V0: Real)
65 returns GLocateExtCC
66 ---Purpose: Calculates the distance with a close point. The
67 -- close point is defined by a parameter value on each
68 -- curve.
69 -- The function F(u,v)=distance(C1(u),C2(v)) has an
70 -- extremun when gradient(f)=0. The algorithm searchs
71 -- the zero near the close point.
72 raises DomainError;
73 -- if U0 and V0 are outside the definition ranges of the
74 -- curves.
75
76 IsDone (me) returns Boolean
77 ---Purpose: Returns True if the distance is found.
78 is static;
79
80 SquareDistance (me) returns Real
81 ---Purpose: Returns the value of the extremum square distance.
82 raises NotDone from StdFail
83 -- if IsDone(me)=False.
84 is static;
85
86 Point (me; P1,P2: out POnCurv)
87 ---Purpose: Returns the points of the extremum distance.
88 -- P1 is on the first curve, P2 on the second one.
89 raises NotDone from StdFail
90 -- if IsDone(me)=False.
91 is static;
92
93fields
94 myDone : Boolean;
95 mySqDist: Real;
96 myPoint1: POnCurv;
97 myPoint2: POnCurv;
98
99end GLocateExtCC;