1 -- File: ExtPSOfRev.cdl
2 -- Created: Wed Oct 9 10:48:48 1991
3 -- Author: Michel CHAUVAT
5 ---Copyright: Matra Datavision 1991
8 generic class ExtPSOfRev from Extrema (SurfaceOfRevolution as any;
9 Tool as any ; -- as ToolSurfaceOfRevolution(SurfaceOfRevolution)
11 ToolCurve as any; -- as ToolCurve(Curve)
14 ---Purpose: It calculates all the extremum distances
15 -- between a point and a surface.
16 -- These distances can be minimum or maximum.
18 uses POnSurf from Extrema,
19 SequenceOfPOnSurf from Extrema,
21 SequenceOfReal from TColStd
23 raises NotDone from StdFail,
24 OutOfRange from Standard
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).
35 IsDone (me) returns Boolean
36 ---Purpose: Returns True if the distances are found.
39 NbExt (me) returns Integer
40 ---Purpose: Returns the number of extremum distances.
41 raises NotDone from StdFail
42 -- if IsDone(me)=False.
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.
50 -- if N < 1 or N > NbPoints(me).
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.
58 -- if N < 1 or N > NbPoints(me).
63 mySqDist: SequenceOfReal from TColStd;
64 myPoint: SequenceOfPOnSurf from Extrema;