7fd59977 |
1 | -- File: ExtPSOfRev.cdl |
2 | -- Created: Wed Oct 9 10:48:48 1991 |
3 | -- Author: Michel CHAUVAT |
4 | -- <mca@topsn3> |
5 | ---Copyright: Matra Datavision 1991 |
6 | |
7 | |
8 | generic class ExtPSOfRev from Extrema (SurfaceOfRevolution as any; |
9 | Tool as any ; -- as ToolSurfaceOfRevolution(SurfaceOfRevolution) |
10 | Curve as any; |
11 | ToolCurve as any; -- as ToolCurve(Curve) |
12 | TheExtPC as any |
13 | ) |
14 | ---Purpose: It calculates all the extremum distances |
15 | -- between a point and a surface. |
16 | -- These distances can be minimum or maximum. |
17 | |
18 | uses POnSurf from Extrema, |
19 | SequenceOfPOnSurf from Extrema, |
20 | Pnt from gp, |
21 | SequenceOfReal from TColStd |
22 | |
23 | raises NotDone from StdFail, |
24 | OutOfRange from Standard |
25 | |
26 | is |
27 | Create (P: Pnt; S: SurfaceOfRevolution; Tol: Real; NbV: Integer; |
28 | TolV: Real) returns ExtPSOfRev; |
29 | ---Purpose: It calculates all the distances between a point |
30 | -- and a surface of revolution. |
31 | -- Tol is used to test if the point is on the axis. |
32 | -- NbV and TolV are used to compute the extrema on a |
33 | -- meridian (see ExtPC.cdl). |
34 | |
35 | IsDone (me) returns Boolean |
36 | ---Purpose: Returns True if the distances are found. |
37 | is static; |
38 | |
39 | NbExt (me) returns Integer |
40 | ---Purpose: Returns the number of extremum distances. |
41 | raises NotDone from StdFail |
42 | -- if IsDone(me)=False. |
43 | is static; |
44 | |
45 | SquareDistance (me; N: Integer) returns Real |
46 | ---Purpose: Returns the value of the Nth resulting square distance. |
47 | raises NotDone from StdFail, |
48 | -- if IsDone(me)=False. |
49 | OutOfRange |
50 | -- if N < 1 or N > NbPoints(me). |
51 | is static; |
52 | |
53 | Point (me; N: Integer) returns POnSurf |
54 | ---Purpose: Returns the point of the Nth resulting distance. |
55 | raises NotDone from StdFail, |
56 | -- if IsDone(me)=False. |
57 | OutOfRange |
58 | -- if N < 1 or N > NbPoints(me). |
59 | is static; |
60 | |
61 | fields |
62 | myDone : Boolean; |
63 | mySqDist: SequenceOfReal from TColStd; |
64 | myPoint: SequenceOfPOnSurf from Extrema; |
65 | |
66 | end ExtPSOfRev; |