1 -- Created on: 1999-09-21
2 -- Created by: Edward AGAPOV
3 -- Copyright (c) 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 class ExtPRevS from Extrema
25 ---Purpose: It calculates all the extremum (minimum and
26 -- maximum) distances between a point and a surface
31 GenExtPS from Extrema,
33 SurfaceOfRevolution from Adaptor3d,
34 SurfacePtr from Adaptor3d,
46 Create returns ExtPRevS from Extrema;
48 Create (P: Pnt; S: SurfaceOfRevolution from Adaptor3d;
49 Umin, Usup, Vmin, Vsup: Real;
51 returns ExtPRevS from Extrema;
52 ---Purpose: It calculates all the distances between a point
53 -- from gp and a SurfacePtr from Adaptor3d.
55 Create (P: Pnt; S: SurfaceOfRevolution from Adaptor3d;
57 returns ExtPRevS from Extrema;
58 ---Purpose: It calculates all the distances between a point
59 -- from gp and a SurfacePtr from Adaptor3d.
61 Initialize(me: in out; S: SurfaceOfRevolution from Adaptor3d;
62 Umin, Usup, Vmin, Vsup: Real;
66 Perform (me: in out; P: Pnt)
69 IsDone (me) returns Boolean
70 ---Purpose: Returns True if the distances are found.
73 NbExt (me) returns Integer
74 ---Purpose: Returns the number of extremum distances.
75 raises NotDone from StdFail
76 -- if IsDone(me)=False.
79 SquareDistance (me; N: Integer) returns Real
80 ---Purpose: Returns the value of the Nth resulting square distance.
81 raises NotDone from StdFail,
82 -- if IsDone(me)=False.
84 -- if N < 1 or N > NbPoints(me).
87 Point (me; N: Integer) returns POnSurf
88 ---C++: return const &
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).
97 myS : SurfacePtr from Adaptor3d;
98 myvinf : Real from Standard;
99 myvsup : Real from Standard;
100 mytolv : Real from Standard;
102 myPosition : Ax2 from gp;
103 myExtPS : GenExtPS from Extrema;
105 myIsAnalyticallyComputable : Boolean from Standard;
110 myPoint: POnSurf from Extrema [8];