1 -- Created on: 1995-07-18
2 -- Created by: Modelistation
3 -- Copyright (c) 1995-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
8 -- This library is free software; you can redistribute it and/or modify it under
9 -- the terms of the GNU Lesser General Public License version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class GenLocateExtPS from Extrema
19 ---Purpose: With a close point, it calculates the distance
20 -- between a point and a surface.
21 -- This distance can be a minimum or a maximum.
23 uses POnSurf from Extrema,
25 Surface from Adaptor3d
27 raises DomainError from Standard,
32 Create returns GenLocateExtPS;
34 Create (P: Pnt; S: Surface from Adaptor3d; U0,V0: Real; TolU,TolV: Real)
35 returns GenLocateExtPS
36 ---Purpose: Calculates the distance with a close point.
37 -- The close point is defined by the parameter values
39 -- The function F(u,v)=distance(S(u,v),p) has an
40 -- extremun when gradient(F)=0. The algorithm searchs
41 -- a zero near the close point.
43 -- if U0,V0 are outside the definition ranges of the
46 IsDone (me) returns Boolean
47 ---Purpose: Returns True if the distance is found.
50 SquareDistance (me) returns Real
51 ---Purpose: Returns the value of the extremum square distance.
52 raises NotDone from StdFail
53 -- if IsDone(me)=False.
56 Point (me) returns POnSurf
57 ---C++: return const &
58 ---Purpose: Returns the point of the extremum distance.
59 raises NotDone from StdFail
60 -- if IsDone(me)=False.
66 myPoint: POnSurf from Extrema;