0024043: Performance improvements: Modeling Algorithms
[occt.git] / src / Extrema / Extrema_ExtElC.cdl
CommitLineData
b311480e 1-- Created on: 1991-02-21
2-- Created by: Isabelle GRIGNON
3-- Copyright (c) 1991-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
23class ExtElC from Extrema
24 ---Purpose: It calculates all the distance between two elementary
25 -- curves.
26 -- These distances can be maximum or minimum.
27
28uses Circ from gp,
29 Elips from gp,
30 Hypr from gp,
31 Lin from gp,
32 Parab from gp,
33 POnCurv from Extrema
34
35raises InfiniteSolutions from StdFail,
36 NotDone from StdFail,
37 OutOfRange from Standard
38
39is
40 Create returns ExtElC;
41
42 Create (C1,C2: Lin; AngTol: Real) returns ExtElC;
43 ---Purpose: Calculates the distance between two lines.
44 -- AngTol is used to test if the lines are parallel:
45 -- Angle(C1,C2) < AngTol.
46
47 Create (C1: Lin; C2: Circ; Tol: Real) returns ExtElC;
48 ---Purpose: Calculates the distance between a line and a
49 -- circle.
50
51 Create (C1: Lin; C2: Elips) returns ExtElC;
52 ---Purpose: Calculates the distance between a line and an
53 -- elipse.
54
55 Create (C1: Lin; C2: Hypr) returns ExtElC;
56 ---Purpose: Calculates the distance between a line and a
57 -- hyperbola.
58
59 Create (C1: Lin; C2: Parab) returns ExtElC;
60 ---Purpose: Calculates the distance between a line and a
61 -- parabola.
62
63 Create (C1,C2: Circ) returns ExtElC;
64 ---Purpose: Calculates the distance between two circles.
65 -- The circles can be parallel or identical.
66
67 Create (C1: Circ; C2: Elips) returns ExtElC;
68 ---Purpose: Calculates the distance between a circle and an
69 -- elipse.
70
71 Create (C1: Circ; C2: Hypr) returns ExtElC;
72 ---Purpose: Calculates the distance between a circle and a
73 -- hyperbola.
74
75 Create (C1: Circ; C2: Parab) returns ExtElC;
76 ---Purpose: Calculates the distance between a circle and a
77 -- parabola.
78
79 Create (C1,C2: Elips) returns ExtElC;
80 ---Purpose: Calculates the distance between two elipses.
81 -- The elipses can be parallel or identical.
82
83 Create (C1: Elips; C2: Hypr) returns ExtElC;
84 ---Purpose: Calculates the distance between an elipse and a
85 -- hyperbola.
86
87 Create (C1: Elips; C2: Parab) returns ExtElC;
88 ---Purpose: Calculates the distance between an elipse and a
89 -- parabola.
90
91 Create (C1,C2: Hypr) returns ExtElC;
92 ---Purpose: Calculates the distance between two hyperbolas.
93 -- The hyperbolas can be parallel or identical.
94
95 Create (C1: Hypr; C2: Parab) returns ExtElC;
96 ---Purpose: Calculates the distance between a hyperbola and a
97 -- parabola.
98
99 Create (C1,C2: Parab) returns ExtElC;
100 ---Purpose: Calculates the distance between two parabolas
101 -- The parabolas can be parallel or identical.
102
103 IsDone (me) returns Boolean
104 ---Purpose: Returns True if the distances are found.
105 is static;
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 NbExt (me) returns Integer
114 ---Purpose: Returns the number of extremum distances.
115 raises NotDone from StdFail,
116 -- if IsDone(me)=False.
117 InfiniteSolutions from StdFail
118 -- if IsParallel(me)= True.
119 is static;
120
121 SquareDistance (me; N: Integer =1) returns Real
122 ---Purpose: Returns the value of the Nth extremum square distance.
123 raises NotDone from StdFail,
124 -- if IsDone(me)=False.
125 InfiniteSolutions from StdFail,
126 -- if IsParallel(me)= True and N > 1.
127 OutOfRange from Standard
128 -- if N < 1 or N > NbExt(me)
129 is static;
130
131 Points (me; N: Integer; P1,P2: out POnCurv)
132 ---Purpose: Returns the points of the Nth extremum distance.
133 -- P1 is on the first curve, P2 on the second one.
134 raises NotDone from StdFail,
135 -- if IsDone(me)=False.
136 InfiniteSolutions from StdFail,
137 -- if IsParallel(me)= True.
138 OutOfRange from Standard
139 -- if N < 1 or N > NbExt(me)
140 is static;
141
142fields
143 myDone : Boolean;
144 myIsPar: Boolean;
145 myNbExt: Integer;
146 --modified by NIZNHY-PKV Fri Nov 21 10:47:21 2008 ft
147 -- it was *[4]
148 mySqDist: Real [6];
149 myPoint: POnCurv from Extrema [6,2];
150
151end ExtElC;