7fd59977 |
1 | -- File: ExtPElS.cdl |
2 | -- Created: Thu Feb 21 18:36:35 1991 |
3 | -- Author: Isabelle GRIGNON |
4 | -- <isg@topsn3> |
5 | ---Copyright: Matra Datavision 1991 |
6 | |
7 | |
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. |
12 | |
13 | uses POnSurf from Extrema, |
14 | Cone from gp, |
15 | Pln from gp, |
16 | Cylinder from gp, |
17 | Pnt from gp, |
18 | Sphere from gp, |
19 | Torus from gp |
20 | |
21 | raises NotDone from StdFail, |
22 | OutOfRange |
23 | |
24 | is |
25 | Create returns ExtPElS; |
26 | |
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. |
31 | |
32 | Perform(me: in out; P: Pnt; S: Cylinder; Tol: Real) |
33 | is static; |
34 | |
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. |
39 | |
40 | Perform(me: in out; P: Pnt; S: Pln; Tol: Real) |
41 | is static; |
42 | |
43 | |
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 |
48 | -- on the axis. |
49 | |
50 | Perform(me: in out;P: Pnt; S: Cone; Tol: Real) |
51 | is static; |
52 | |
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. |
57 | |
58 | Perform(me: in out; P: Pnt; S: Torus; Tol: Real) |
59 | is static; |
60 | |
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. |
65 | |
66 | Perform(me: in out; P: Pnt; S: Sphere; Tol: Real) |
67 | is static; |
68 | |
69 | |
70 | IsDone (me) returns Boolean |
71 | ---Purpose: Returns True if the distances are found. |
72 | is static; |
73 | |
74 | NbExt (me) returns Integer |
75 | ---Purpose: Returns the number of extremum distances. |
76 | raises NotDone from StdFail |
77 | -- if IsDone(me)=False. |
78 | is static; |
79 | |
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. |
84 | OutOfRange |
85 | -- if N < 1 or N > NbPoints(me). |
86 | is static; |
87 | |
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. |
92 | OutOfRange |
93 | -- if N < 1 or N > NbPoints(me). |
94 | is static; |
95 | |
96 | fields |
97 | myDone : Boolean; |
98 | myNbExt: Integer; |
99 | mySqDist: Real [4]; |
100 | myPoint: POnSurf from Extrema [4]; |
101 | |
102 | end ExtPElS; |