1 -- Created on: 1992-08-06
2 -- Created by: Laurent BUCHARD
3 -- Copyright (c) 1992-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
8 -- This library is free software; you can redistribute it and / or modify it
9 -- under the terms of the GNU Lesser General Public version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class QuadQuadGeo from IntAna
19 ---Purpose: Geometric intersections between two natural quadrics
20 -- (Sphere , Cylinder , Cone , Pln from gp).
21 -- The possible intersections are :
24 -- - 1 Point and 1 Line
28 -- - 1 or 2 hyperbola(s).
29 -- - Empty : there is no intersection between the two quadrics.
30 -- - Same : the quadrics are identical
31 -- - NoGeometricSolution : there may be an intersection, but it
32 -- is necessary to use an analytic algorithm to determine
33 -- it. See class IntQuadQuad from IntAna.
48 ResultType from IntAna
52 raises NotDone from StdFail,
53 DomainError from Standard,
54 OutOfRange from Standard
58 ---Purpose: Empty constructor.
59 returns QuadQuadGeo from IntAna;
62 Create(P1,P2 : Pln from gp;
63 TolAng, Tol : Real from Standard)
64 ---Purpose: Creates the intersection between two planes.
65 -- TolAng is the angular tolerance used to determine
66 -- if the planes are parallel.
67 -- Tol is the tolerance used to determine if the planes
68 -- are identical (only when they are parallel).
69 returns QuadQuadGeo from IntAna;
74 TolAng, Tol : Real from Standard)
75 ---Purpose: Intersects two planes.
76 -- TolAng is the angular tolerance used to determine
77 -- if the planes are parallel.
78 -- Tol is the tolerance used to determine if the planes
79 -- are identical (only when they are parallel).
83 Create(P : Pln from gp;
85 Tolang,Tol: Real from Standard;
86 H : Real from Standard = 0)
87 ---Purpose: Creates the intersection between a plane and a cylinder.
88 -- TolAng is the angular tolerance used to determine
89 -- if the axis of the cylinder is parallel to the plane.
90 -- Tol is the tolerance used to determine if the result
91 -- is a circle or an ellipse. If the maximum distance between
92 -- the ellipse solution and the circle centered at the ellipse
93 -- center is less than Tol, the result will be the circle.
94 -- H is the height of the cylinder <Cyl>. It is used to check
95 -- whether the plane and cylinder are parallel.
96 returns QuadQuadGeo from IntAna;
101 C : Cylinder from gp;
102 Tolang,Tol: Real from Standard;
103 H :Real from Standard = 0)
104 ---Purpose: Intersects a plane and a cylinder.
105 -- TolAng is the angular tolerance used to determine
106 -- if the axis of the cylinder is parallel to the plane.
107 -- Tol is the tolerance used to determine if the result
108 -- is a circle or an ellipse. If the maximum distance between
109 -- the ellipse solution and the circle centered at the ellipse
110 -- center is less than Tol, the result will be the circle.
111 -- H is the height of the cylinder <Cyl>. It is used to check
112 -- whether the plane and cylinder are parallel.
116 Create(P : Pln from gp;
118 ---Purpose: Creates the intersection between a plane and a sphere.
119 returns QuadQuadGeo from IntAna;
125 ---Purpose: Intersects a plane and a sphere.
129 Create(P : Pln from gp;
131 Tolang,Tol: Real from Standard)
132 ---Purpose: Creates the intersection between a plane and a cone.
133 -- TolAng is the angular tolerance used to determine
134 -- if the axis of the cone is parallel or perpendicular
135 -- to the plane, and if the generating line of the cone
136 -- is parallel to the plane.
137 -- Tol is the tolerance used to determine if the apex
138 -- of the cone is in the plane.
139 returns QuadQuadGeo from IntAna;
145 Tolang,Tol: Real from Standard)
146 ---Purpose: Intersects a plane and a cone.
147 -- TolAng is the angular tolerance used to determine
148 -- if the axis of the cone is parallel or perpendicular
149 -- to the plane, and if the generating line of the cone
150 -- is parallel to the plane.
151 -- Tol is the tolerance used to determine if the apex
152 -- of the cone is in the plane.
156 Create(Cyl1,Cyl2: Cylinder from gp;
157 Tol : Real from Standard)
158 ---Purpose: Creates the intersection between two cylinders.
159 returns QuadQuadGeo from IntAna;
163 Cyl1,Cyl2: Cylinder from gp;
164 Tol : Real from Standard)
165 ---Purpose: Intersects two cylinders
169 Create(Cyl: Cylinder from gp;
171 Tol: Real from Standard)
172 ---Purpose: Creates the intersection between a Cylinder and a Sphere.
173 returns QuadQuadGeo from IntAna;
177 Cyl: Cylinder from gp;
179 Tol: Real from Standard)
180 ---Purpose: Intersects a cylinder and a sphere.
184 Create(Cyl: Cylinder from gp;
186 Tol: Real from Standard)
187 ---Purpose: Creates the intersection between a Cylinder and a Cone
188 returns QuadQuadGeo from IntAna;
192 Cyl: Cylinder from gp;
194 Tol: Real from Standard)
195 ---Purpose: Intersects a cylinder and a cone.
199 Create(Sph1: Sphere from gp;
200 Sph2: Sphere from gp;
201 Tol : Real from Standard)
202 ---Purpose: Creates the intersection between two Spheres.
203 returns QuadQuadGeo from IntAna;
207 Sph1: Sphere from gp;
208 Sph2: Sphere from gp;
209 Tol : Real from Standard)
210 ---Purpose: Intersects a two spheres.
214 Create(Sph: Sphere from gp;
216 Tol: Real from Standard)
217 ---Purpose: Creates the intersection beween a Sphere and a Cone.
218 returns QuadQuadGeo from IntAna;
224 Tol: Real from Standard)
225 ---Purpose: Intersects a sphere and a cone.
229 Create(Con1: Cone from gp;
231 Tol : Real from Standard)
232 ---Purpose: Creates the intersection beween two cones.
233 returns QuadQuadGeo from IntAna;
239 Tol :Real from Standard)
240 ---Purpose: Intersects two cones.
244 Create(Pln : Pln from gp;
246 Tol : Real from Standard)
247 ---Purpose: Creates the intersection beween plane and torus.
248 returns QuadQuadGeo from IntAna;
254 Tol : Real from Standard)
255 ---Purpose: Intersects plane and torus.
259 Create(Cyl : Cylinder from gp;
261 Tol : Real from Standard)
262 ---Purpose: Creates the intersection beween cylinder and torus.
263 returns QuadQuadGeo from IntAna;
267 Cyl : Cylinder from gp;
269 Tol : Real from Standard)
270 ---Purpose: Intersects cylinder and torus.
274 Create(Con : Cone from gp;
276 Tol : Real from Standard)
277 ---Purpose: Creates the intersection beween cone and torus.
278 returns QuadQuadGeo from IntAna;
284 Tol : Real from Standard)
285 ---Purpose: Intersects cone and torus.
289 Create(Sph : Sphere from gp;
291 Tol : Real from Standard)
292 ---Purpose: Creates the intersection beween sphere and torus.
293 returns QuadQuadGeo from IntAna;
297 Sph : Sphere from gp;
299 Tol : Real from Standard)
300 ---Purpose: Intersects sphere and torus.
304 Create(Tor1 : Torus from gp;
305 Tor2 : Torus from gp;
306 Tol : Real from Standard)
307 ---Purpose: Creates the intersection beween two toruses.
308 returns QuadQuadGeo from IntAna;
312 Tor1 : Torus from gp;
313 Tor2 : Torus from gp;
314 Tol : Real from Standard)
315 ---Purpose: Intersects two toruses.
320 ---Purpose: Returns Standard_True if the computation was successful.
323 returns Boolean from Standard
328 ---Purpose: Returns the type of intersection.
331 returns ResultType from IntAna
332 raises NotDone from StdFail
333 -- The exception NotDone is raised if IsDone return Standard_False.
338 ---Purpose: Returns the number of interesections.
339 -- The possible intersections are :
342 -- - 1 Point and 1 Line
346 -- - 1 or 2 hyperbola(s).
349 returns Integer from Standard
350 raises NotDone from StdFail
351 -- The exception NotDone is raised if IsDone returns Standard_False.
355 Point(me; Num: Integer from Standard)
356 ---Purpose: Returns the point solution of range Num.
358 raises DomainError from Standard,
359 OutOfRange from Standard,
361 -- The exception NotDone is raised if IsDone return Standard_False.
362 -- The exception DomainError is raised if TypeInter does not return
363 -- IntAna_Point or TypeInter does not return IntAna_PointAndCircle.
364 -- The exception OutOfRange is raised if Num < 1 or Num > NbSolutions.
368 Line(me; Num: Integer from Standard)
369 ---Purpose: Returns the line solution of range Num.
371 raises DomainError from Standard,
372 OutOfRange from Standard,
374 -- The exception NotDone is raised if IsDone return Standard_False.
375 -- The exception DomainError is raised if TypeInter does not return
377 -- The exception OutOfRange is raised if Num < 1 or Num > NbSolutions.
381 Circle(me; Num: Integer from Standard)
382 ---Purpose: Returns the circle solution of range Num.
384 raises DomainError from Standard,
385 OutOfRange from Standard,
387 -- The exception NotDone is raised if IsDone return Standard_False.
388 -- The exception DomainError is raised if TypeInter does not return
389 -- IntAna_Circle or TypeInter does not return IntAna_PointAndCircle.
390 -- The exception OutOfRange is raised if Num < 1 or Num > NbSolutions.
394 Ellipse(me; Num: Integer from Standard)
395 ---Purpose: Returns the ellipse solution of range Num.
396 returns Elips from gp
397 raises DomainError from Standard,
398 OutOfRange from Standard,
400 -- The exception NotDone is raised if IsDone return Standard_False.
401 -- The exception DomainError is raised if TypeInter does not return
403 -- The exception OutOfRange is raised if Num < 1 or Num > NbSolutions.
407 Parabola(me; Num: Integer from Standard)
408 ---Purpose: Returns the parabola solution of range Num.
409 returns Parab from gp
410 raises DomainError from Standard,
411 OutOfRange from Standard,
413 -- The exception NotDone is raised if IsDone return Standard_False.
414 -- The exception DomainError is raised if TypeInter does not return
416 -- The exception OutOfRange is raised if Num < 1 or Num > NbSolutions.
420 Hyperbola(me; Num: Integer from Standard)
421 ---Purpose: Returns the hyperbola solution of range Num.
423 raises DomainError from Standard,
424 OutOfRange from Standard,
426 -- The exception NotDone is raised if IsDone return Standard_False.
427 -- The exception DomainError is raised if TypeInter does not return
429 -- The exception OutOfRange is raised if Num < 1 or Num > NbSolutions.
432 HasCommonGen(me) returns Boolean from Standard;
433 PChar(me) returns Pnt from gp;
434 ---C++: return const&
436 InitTolerances(me:out)
437 ---Purpose: Initialize the values of inner tolerances.
442 done : Boolean from Standard is protected;
444 nbint : Integer from Standard is protected;
445 typeres : ResultType from IntAna is protected;
447 pt1 : Pnt from gp is protected;
448 pt2 : Pnt from gp is protected;
449 pt3 : Pnt from gp is protected;
450 pt4 : Pnt from gp is protected;
452 dir1 : Dir from gp is protected;
453 dir2 : Dir from gp is protected;
454 dir3 : Dir from gp is protected;
455 dir4 : Dir from gp is protected;
457 param1 : Real from Standard is protected;
458 param2 : Real from Standard is protected;
459 param3 : Real from Standard is protected;
460 param4 : Real from Standard is protected;
461 param1bis : Real from Standard is protected;
462 param2bis : Real from Standard is protected;
464 myEPSILON_DISTANCE : Real from Standard is protected;
465 myEPSILON_ANGLE_CONE : Real from Standard is protected;
466 myEPSILON_MINI_CIRCLE_RADIUS : Real from Standard is protected;
467 myEPSILON_CYLINDER_DELTA_RADIUS : Real from Standard is protected;
468 myEPSILON_CYLINDER_DELTA_DISTANCE: Real from Standard is protected;
469 myEPSILON_AXES_PARA : Real from Standard is protected;
471 myCommonGen : Boolean from Standard is protected;
472 myPChar : Pnt from gp is protected;