2 -- Created: Thu Feb 21 18:36:35 1991
3 -- Author: Isabelle GRIGNON
5 ---Copyright: Matra Datavision 1991
8 class ExtPElS from Extrema
9 ---Purpose: It calculates all the extremum distances
10 -- between a point and a surface.
11 -- These distances can be minimum or maximum.
13 uses POnSurf from Extrema,
21 raises NotDone from StdFail,
25 Create returns ExtPElS;
27 Create (P: Pnt; S: Cylinder; Tol: Real) returns ExtPElS;
28 ---Purpose: It calculates all the distances between a point
29 -- and a cylinder from gp.
30 -- Tol is used to test if the point is on the axis.
32 Perform(me: in out; P: Pnt; S: Cylinder; Tol: Real)
35 Create (P: Pnt; S: Pln; Tol: Real) returns ExtPElS;
36 ---Purpose: It calculates all the distances between a point
37 -- and a plane from gp.
38 -- Tol is used to test if the point is on the plane.
40 Perform(me: in out; P: Pnt; S: Pln; Tol: Real)
44 Create (P: Pnt; S: Cone; Tol: Real) returns ExtPElS;
45 ---Purpose: It calculates all the distances between a point
46 -- and a cone from gp.
47 -- Tol is used to test if the point is at the apex or
50 Perform(me: in out;P: Pnt; S: Cone; Tol: Real)
53 Create (P: Pnt; S: Torus; Tol: Real) returns ExtPElS;
54 ---Purpose: It calculates all the distances between a point
55 -- and a torus from gp.
56 -- Tol is used to test if the point is on the axis.
58 Perform(me: in out; P: Pnt; S: Torus; Tol: Real)
61 Create (P: Pnt; S: Sphere; Tol: Real) returns ExtPElS;
62 ---Purpose: It calculates all the distances between a point
63 -- and a sphere from gp.
64 -- Tol is used to test if the point is at the center.
66 Perform(me: in out; P: Pnt; S: Sphere; Tol: Real)
70 IsDone (me) returns Boolean
71 ---Purpose: Returns True if the distances are found.
74 NbExt (me) returns Integer
75 ---Purpose: Returns the number of extremum distances.
76 raises NotDone from StdFail
77 -- if IsDone(me)=False.
80 SquareDistance (me; N: Integer) returns Real
81 ---Purpose: Returns the value of the Nth resulting square distance.
82 raises NotDone from StdFail,
83 -- if IsDone(me)=False.
85 -- if N < 1 or N > NbPoints(me).
88 Point (me; N: Integer) returns POnSurf
89 ---Purpose: Returns the point of the Nth resulting distance.
90 raises NotDone from StdFail,
91 -- if IsDone(me)=False.
93 -- if N < 1 or N > NbPoints(me).
100 myPoint: POnSurf from Extrema [4];