1 -- Created on: 1991-10-09
2 -- Created by: Michel CHAUVAT
3 -- Copyright (c) 1991-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
23 generic class ExtPSOfRev from Extrema (SurfaceOfRevolution as any;
24 Tool as any ; -- as ToolSurfaceOfRevolution(SurfaceOfRevolution)
26 ToolCurve as any; -- as ToolCurve(Curve)
29 ---Purpose: It calculates all the extremum distances
30 -- between a point and a surface.
31 -- These distances can be minimum or maximum.
33 uses POnSurf from Extrema,
34 SequenceOfPOnSurf from Extrema,
36 SequenceOfReal from TColStd
38 raises NotDone from StdFail,
39 OutOfRange from Standard
42 Create (P: Pnt; S: SurfaceOfRevolution; Tol: Real; NbV: Integer;
43 TolV: Real) returns ExtPSOfRev;
44 ---Purpose: It calculates all the distances between a point
45 -- and a surface of revolution.
46 -- Tol is used to test if the point is on the axis.
47 -- NbV and TolV are used to compute the extrema on a
48 -- meridian (see ExtPC.cdl).
50 IsDone (me) returns Boolean
51 ---Purpose: Returns True if the distances are found.
54 NbExt (me) returns Integer
55 ---Purpose: Returns the number of extremum distances.
56 raises NotDone from StdFail
57 -- if IsDone(me)=False.
60 SquareDistance (me; N: Integer) returns Real
61 ---Purpose: Returns the value of the Nth resulting square distance.
62 raises NotDone from StdFail,
63 -- if IsDone(me)=False.
65 -- if N < 1 or N > NbPoints(me).
68 Point (me; N: Integer) returns POnSurf
69 ---Purpose: Returns the point of the Nth resulting distance.
70 raises NotDone from StdFail,
71 -- if IsDone(me)=False.
73 -- if N < 1 or N > NbPoints(me).
78 mySqDist: SequenceOfReal from TColStd;
79 myPoint: SequenceOfPOnSurf from Extrema;