1 -- Created on: 1992-08-06
2 -- Created by: Laurent BUCHARD
3 -- Copyright (c) 1992-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
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.
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.
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.
23 class IntConicQuad from IntAna
25 ---Purpose: This class provides the analytic intersection between
26 -- a conic defined as an element of gp (Lin,Circ,Elips,
27 -- Parab,Hypr) and a quadric as defined in the class
28 -- Quadric from IntAna.
29 -- The intersection between a conic and a plane is treated
32 -- The result of the intersection are points (Pnt from
33 -- gp), associated with the parameter on the conic.
35 -- A call to an Intersection L:Lin from gp and
36 -- SPH: Sphere from gp can be written either :
37 -- IntAna_IntConicQuad Inter(L,IntAna_Quadric(SPH))
39 -- IntAna_IntConicQuad Inter(L,SPH) (it is necessary
40 -- to include IntAna_Quadric.hxx in this case)
55 raises NotDone from StdFail,
56 OutOfRange from Standard,
57 DomainError from Standard
64 ---Purpose: Empty constructor.
67 returns IntConicQuad from IntAna;
71 Create(L: Lin from gp; Q: Quadric from IntAna)
73 ---Purpose: Creates the intersection between a line and a quadric.
75 returns IntConicQuad from IntAna;
78 Perform(me:in out; L: Lin from gp; Q: Quadric from IntAna)
80 ---Purpose: Intersects a line and a quadric.
85 Create(C: Circ from gp; Q: Quadric from IntAna)
87 ---Purpose: Creates the intersection between a circle and a quadric.
89 returns IntConicQuad from IntAna;
92 Perform(me: in out; C: Circ from gp; Q: Quadric from IntAna)
94 ---Purpose: Intersects a circle and a quadric.
99 Create(E: Elips from gp; Q: Quadric from IntAna)
101 ---Purpose: Creates the intersection between an ellipse and a quadric.
103 returns IntConicQuad from IntAna;
106 Perform(me:in out; E: Elips from gp; Q: Quadric from IntAna)
108 ---Purpose: Intersects an ellipse and a quadric.
113 Create(P: Parab from gp; Q: Quadric from IntAna)
115 ---Purpose: Creates the intersection between a parabola and a quadric.
117 returns IntConicQuad from IntAna;
120 Perform(me:in out; P: Parab from gp; Q: Quadric from IntAna)
122 ---Purpose: Intersects a parabola and a quadric.
127 Create(H: Hypr from gp; Q: Quadric from IntAna)
129 ---Purpose: Creates the intersection between an hyperbola and
132 returns IntConicQuad from IntAna;
135 Perform(me:in out; H: Hypr from gp; Q: Quadric from IntAna)
137 ---Purpose: Intersects an hyperbola and a quadric.
141 ----------------------------------------------------------------------
142 -- Intersection between a Conic from gp and a Pln from IntAna
143 -- The intersection is computed with Tolerances.
144 ----------------------------------------------------------------------
146 Create(L : Lin from gp; P: Pln from gp;
147 Tolang: Real from Standard;
148 Tol : Real from Standard = 0;
149 Len : Real from Standard = 0)
151 ---Purpose: Intersection between a line and a plane.
152 -- Tolang is used to determine if the angle between two
154 -- Tol is used to check the distance between line and plane
155 -- on the distance <Len> from the origin of the line.
157 returns IntConicQuad from IntAna;
161 L : Lin from gp; P: Pln from gp; Tolang: Real from Standard;
162 Tol : Real from Standard = 0;
163 Len : Real from Standard = 0)
165 ---Purpose: Intersects a line and a plane.
166 -- Tolang is used to determine if the angle between two
168 -- Tol is used to check the distance between line and plane
169 -- on the distance <Len> from the origin of the line.
174 Create(C : Circ from gp; P: Pln from gp;
175 Tolang,Tol: Real from Standard)
177 ---Purpose: Intersection between a circle and a plane.
178 -- Tolang is used to determine if the angle between two
180 -- Tol is used to determine if a distance is null.
182 returns IntConicQuad from IntAna;
186 C : Circ from gp; P: Pln from gp; Tolang,Tol: Real from Standard)
188 ---Purpose: Intersects a circle and a plane.
189 -- Tolang is used to determine if the angle between two
191 -- Tol is used to determine if a distance is null.
196 Create(E : Elips from gp; P: Pln from gp;
197 Tolang,Tol: Real from Standard)
199 ---Purpose: Intersection between an ellipse and a plane.
200 -- Tolang is used to determine if the angle between two
202 -- Tol is used to determine if a distance is null.
204 returns IntConicQuad from IntAna;
208 E : Elips from gp; P: Pln from gp; Tolang,Tol: Real from Standard)
210 ---Purpose: Intersects an ellipse and a plane.
211 -- Tolang is used to determine if the angle between two
213 -- Tol is used to determine if a distance is null.
218 Create(Pb: Parab from gp; P: Pln from gp;
219 Tolang: Real from Standard)
221 ---Purpose: Intersection between a parabola and a plane.
222 -- Tolang is used to determine if the angle between two
225 returns IntConicQuad from IntAna;
229 Pb: Parab from gp; P: Pln from gp; Tolang: Real from Standard)
231 ---Purpose: Intersects a parabola and a plane.
232 -- Tolang is used to determine if the angle between two
238 Create(H : Hypr from gp; P: Pln from gp;
239 Tolang: Real from Standard)
241 ---Purpose: Intersection between an hyperbola and a plane.
242 -- Tolang is used to determine if the angle between two
245 returns IntConicQuad from IntAna;
249 H : Hypr from gp; P: Pln from gp; Tolang: Real from Standard)
251 ---Purpose: Intersects an hyperbola and a plane.
252 -- Tolang is used to determine if the angle between two
260 ---Purpose: Returns TRUE if the creation completed.
264 returns Boolean from Standard
270 ---Purpose: Returns TRUE if the conic is in the quadric.
274 returns Boolean from Standard
276 raises NotDone from StdFail
277 -- The exception NotDone is raised if IsDone returns False.
284 ---Purpose: Returns TRUE if the line is in a quadric which
285 -- is parallel to the quadric.
288 returns Boolean from Standard
290 raises NotDone from StdFail
291 -- The exception NotDone is raised if IsDone returns False.
298 ---Purpose: Returns the number of intersection point.
302 returns Integer from Standard
304 raises NotDone from StdFail,
305 DomainError from Standard
306 -- The exception NotDone is raised if IsDone returns False.
307 -- The exception DomainError is raised if IsInQuadric returns
308 -- True or IsParallel returns True.
314 Point(me; N: Integer from Standard)
316 ---Purpose: Returns the point of range N.
319 ---C++: return const&
323 raises NotDone from StdFail,
324 DomainError from Standard,
325 OutOfRange from Standard
326 -- The exception NotDone is raised if IsDone returns False.
327 -- The exception DomainError is raised if IsInQuadric returns
328 -- True or IsParallel returns true.
329 -- The exception OutOfRange is raised if N<=0 or N>NbPoints.
334 ParamOnConic(me; N: Integer from Standard)
336 ---Purpose: Returns the parameter on the line of the intersection
341 returns Real from Standard
343 raises NotDone from StdFail,
344 DomainError from Standard,
345 OutOfRange from Standard
346 -- The exception NotDone is raised if IsDone returns False.
347 -- The exception DomainError is raised if IsInQuadric returns
348 -- True or IsParallel returns true.
349 -- The exception OutOfRange is raised if N<=0 or N>NbPoints.
357 done : Boolean from Standard;
358 parallel : Boolean from Standard;
359 inquadric : Boolean from Standard;
361 nbpts : Integer from Standard;
363 pnts : Pnt from gp [4];
364 paramonc : Real from Standard [4];