0023830: BRepExtrema_DistShapeShape does not find intersection of face with edge
[occt.git] / src / Extrema / Extrema_GExtCC.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
22
23generic class GExtCC from Extrema (Curve1 as any;
24 Tool1 as any;
25 Curve2 as any;
26 Tool2 as any)
27
28 ---Purpose: It calculates all the distance between two curves.
29 -- These distances can be maximum or minimum.
30
31uses POnCurv from Extrema,
32 SequenceOfPOnCurv from Extrema,
33 ExtElC from Extrema,
34 Pnt from gp,
35 HArray1OfPnt from TColgp,
36 SequenceOfReal from TColStd,
37 ListOfTransient from TColStd
38
39
40raises InfiniteSolutions from StdFail,
41 NotDone from StdFail,
42 OutOfRange from Standard
43
44 class CCache instantiates CurveCache from Extrema (Curve1, Pnt from gp, HArray1OfPnt from TColgp);
45
46 class ECC instantiates GenExtCC from Extrema
47 (Curve1,
48 Tool1,
49 Curve2,
50 Tool2,
51 CCache,
52 HArray1OfPnt from TColgp,
53 POnCurv,
54 Pnt,
55 Vec);
56
57
58is
59
60 Create (TolC1: Real = 1.0e-10; TolC2: Real = 1.0e-10) returns GExtCC;
61
62
63 Create (C1: Curve1; C2: Curve2;
64 TolC1: Real = 1.0e-10; TolC2: Real = 1.0e-10) returns GExtCC;
65 ---Purpose: It calculates all the distances.
66
67
68 Create (C1: Curve1;
69 C2: Curve2;
70 U1: Real from Standard;
71 U2: Real from Standard;
72 V1: Real from Standard;
73 V2: Real from Standard;
74 TolC1: Real = 1.0e-10;
75 TolC2: Real = 1.0e-10) returns GExtCC;
76 ---Purpose: It calculates all the distances.
77
78
79 SetCurve (me: in out; theRank: Integer; C: Curve1);
80 ---Purpose:
81
82 SetCurve (me: in out; theRank: Integer; C: Curve1; Uinf, Usup: Real);
83 ---Purpose:
84
85 SetRange (me: in out; theRank: Integer; Uinf, Usup: Real);
86 ---Purpose:
87
88 SetTolerance (me: in out; theRank: Integer; Tol: Real);
89 ---Purpose:
90
91 Perform(me: in out);
92
93
94 IsDone (me) returns Boolean
95 ---Purpose: Returns True if the distances are found.
96 is static;
97
98 NbExt (me) returns Integer
99 ---Purpose: Returns the number of extremum distances.
100 raises NotDone from StdFail,
101 -- if IsDone(me)=False.
102 InfiniteSolutions from StdFail
103 -- if IsParallel(me)= True.
104 is static;
105
106
107 IsParallel (me) returns Boolean
108 ---Purpose: Returns True if the two curves are parallel.
109 raises NotDone from StdFail
110 -- if IsDone(me)=False.
111 is static;
112
113
114 SquareDistance (me; N: Integer =1) returns Real
115 ---Purpose: Returns the value of the Nth extremum square distance.
116 raises NotDone from StdFail,
117 -- if IsDone(me)=False.
118 InfiniteSolutions from StdFail,
119 -- if IsParallel(me)= True and N > 1.
120 OutOfRange
121 -- if N < 1 or N > NbExt(me)
122 is static;
123
124 Points (me; N: Integer; P1,P2: out POnCurv)
125 ---Purpose: Returns the points of the Nth extremum distance.
126 -- P1 is on the first curve, P2 on the second one.
127 raises NotDone from StdFail,
128 -- if IsDone(me)=False.
129 InfiniteSolutions from StdFail,
130 -- if IsParallel(me)= True.
131 OutOfRange
132 -- if N < 1 or N > NbExt(me)
133 is static;
134
135 TrimmedSquareDistances(me; dist11, distP12, distP21, distP22: out Real;
136 P11, P12, P21, P22: out Pnt)
137 ---Purpose: if the curve is a trimmed curve,
138 -- dist11 is a square distance between the point on C1
139 -- of parameter FirstParameter and the point of
140 -- parameter FirstParameter on C2.
141
142 is static;
143
144 Results(me: in out; AlgExt: ExtElC from Extrema;
145 Ut11, Ut12, Ut21, Ut22: Real)
146
147 is static protected;
148
149 Results(me: in out;AlgExt: ECC;
150 Ut11, Ut12, Ut21, Ut22: Real)
151
152 is static protected;
153
154
155
156
157fields
158 myECC: ECC from Extrema;
159 myDone: Boolean;
160 myIsPar: Boolean;
161 mypoints: SequenceOfPOnCurv from Extrema;
162 mySqDist: SequenceOfReal from TColStd;
163 mynbext: Integer;
164 inverse: Boolean;
165 myC: Address from Standard [2];
166 myInf: Real [2];
167 mySup: Real [2];
168 myTol: Real [2];
169 myCacheLists: ListOfTransient from TColStd [2]; -- lists of Handle(Extrema_CCache)
170 P1f: Pnt;
171 P1l: Pnt;
172 P2f: Pnt;
173 P2l: Pnt;
174 mydist11: Real;
175 mydist12: Real;
176 mydist21: Real;
177 mydist22: Real;
178
179
180
181end GExtCC;